by op7418
Host-agnostic bridge connecting Claude Code SDK to IM platforms (Telegram, Discord, Feishu)
# Add to your Claude Code skills
git clone https://github.com/op7418/Claude-to-IMEnglish | 中文
Claude-to-IM is a host-agnostic bridge library that connects Claude Code SDK to IM platforms, allowing users to interact with Claude through Telegram, Discord, and Feishu (Lark).
This library handles all IM-side complexity — message routing, streaming previews, permission approval flows, Markdown rendering, chunking, retry, rate limiting — while delegating persistence, LLM calls, and permission resolution to the host application through a set of dependency injection interfaces.
If you want a ready-to-use desktop application without writing any integration code, check out CodePilot — a desktop GUI client for Claude Code with built-in IM bridge support. CodePilot implements all the host interfaces for you and provides a complete UI for managing sessions, settings, and bridge connections.
Claude-to-IM was extracted from CodePilot as a standalone library for developers who want to embed the IM bridge capability in their own applications.
No comments yet. Be the first to share your thoughts!
IM Platform (Telegram / Discord / Feishu)
|
| InboundMessage
v
+-----------+ +------------------+
| Adapter |---->| Bridge Manager | (orchestrator)
+-----------+ | |- Channel Router -> session binding
| |- Conversation Engine -> LLM streaming
| |- Permission Broker -> tool approval flow
| |- Delivery Layer -> chunking, retry, dedup
+------------------+
|
| Host Interfaces (DI)
v
+------------------+
| Host Application | (implements BridgeStore,
| | LLMProvider, etc.)
+------------------+
All bridge modules access...