Imolatte/claude-cli-telegram
A self-hosted Telegram bot that runs the native Claude Code CLI remotely
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
A single Node.js ESM worker polls Telegram. worker/index.mjs handles commands, queues tasks, and relays progress. worker/executor.mjs starts the installed Claude Code CLI and parses its stream-json events. The CLI operates on the host's working tree with its native tools; the worker is not an Anthropic API wrapper. worker/sessions.mjs manages session state and supports continuing conversations with --resume.
approval-hook.mjs and stop-hook.mjs connect Claude Code's PreToolUse and Stop events to approval forwarding and completion notices. Hooks and the worker communicate through files under /tmp/. The separate worker/mcp-telegram.mjs module exposes outbound text and file delivery to Claude; MCP is not the inbound command path.
Key Capabilities & Differentiators
The bot accepts text, forwarded messages, photos, files, and voice. Voice input goes through Groq Whisper speech-to-text, with a local Whisper fallback. While Claude runs, the bot reports tool activity, can show inline edit diffs, and reports token usage. Sessions can be named, switched, or detached; the working directory can be changed, and the model selector lists Sonnet, Opus, and Haiku.
The Git panel covers status, diff, log, staging, commits, push, and pull. Some commands bypass Claude entirely, including shell execution and clipboard or file access. Terminal, hybrid, and Telegram modes route replies and approvals differently. The approval timeout defaults to five minutes, and a Claude task has a default limit of 30 minutes. The bot UI supports English and Russian.
Trade-offs & Limitations
Compared with Anthropic's official three-tool Telegram MCP bridge, this bot adds persistent sessions, live tool activity, approval routing, and Git controls. That breadth also makes it a remote operations surface: shell commands, file downloads, and clipboard access cross the chat-to-host boundary. The owner ID and group allowlist restrict who can interact, and selected dangerous operations are gated, but neither replaces OS-level isolation. Use a narrowly privileged account and limit which files and credentials it can reach.
Terminal handoff works best with tmux, which lets Telegram answer the native permission prompt without interrupting the process. Without tmux, takeover stops the terminal process and resumes saved session context, losing in-memory plans or to-dos. A Linux primary keeps the bot reachable when the Mac sleeps, but separate host-local sessions mean switching hosts does not migrate an active conversation.
Hardware & Deployment Guide
Run the worker on macOS or Linux with Node.js 20+, Claude Code installed and on PATH, and a Telegram bot token and owner ID in config.json. Install dependencies under worker/ with npm install, then start node index.mjs. Configure the Claude Code hooks for terminal approval forwarding and completion notices. The configuration calls for a Groq API key for voice transcription; FFmpeg is optional for the voice fallback. Self-hosting the worker does not make it an offline system.
For persistence, use a macOS LaunchAgent or run the Linux worker under systemd as a regular user. The optional Linux-primary/Mac-standby topology needs passwordless SSH from the Mac and hands off Telegram polling, not conversation state. The Node worker does not serve model weights; size the host for the CLI and the jobs it runs, with extra headroom if using local transcription or optional Puppeteer screenshots. The March 20, 2026 v1.0.0 release highlights native CLI execution, live progress, and session management.
Developers and small teams that want to monitor, resume, or approve Claude Code work from a phone on a trusted Mac or Linux host.
You need offline operation, strong isolation between untrusted users, or seamless session migration between hosts.
Quick Start & Installation
git clone https://github.com/Imolatte/claude-cli-telegram.git cd tg-claude && cp config.example.json config.json # Edit config.json — add bot token, chat ID, Groq API key cd worker && npm install && node index.mjs
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| claude-cli-telegram ★ | 37 | — | JavaScript | MIT | A self-hosted Telegram bot that runs the native Claude Code CLI remotely |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| claude-code-router | 38.5k | +101 | TypeScript | MIT | Local model gateway for routing coding agents across providers |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Imolatte/claude-cli-telegram.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about claude-cli-telegram
Does Telegram control Claude Code through MCP?
How much hardware does the worker need?
Can a company self-host it for commercial work?
When is this a better fit than Anthropic's official Telegram plugin?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy