A Telegram bot that provides access to Claude CLI with streaming responses, session management, and parallel task support.
- Streaming responses - See Claude's response as it generates
- Multi-session support - Work on multiple projects simultaneously
- Session persistence - Resume conversations with
--resume - Smart compaction - Auto-summarizes context when hitting limits
- Long message chunking - Splits long responses into multiple messages
- Parallel tasks - Run tasks in different sessions concurrently
- Question handling - Interactive buttons for Claude's questions
- Photo & file uploads - Send images and files for Claude to analyze (up to 50MB)
| Command | Description |
|---|---|
/new <project> |
Start new session in ~/project |
/sessions |
List all sessions |
/resume |
Pick a session to resume |
/switch <name> |
Switch to session by name |
/reset |
Clear conversation history (fresh start) |
/delete <name> |
Delete a session |
/status |
Show current session info |
/cancel |
Cancel current task |
/plan |
Ask Claude to enter plan mode |
/approve |
Approve current plan |
/reject |
Reject current plan |
-
Clone the repo
-
Create virtual environment:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Create
.envfile:TELEGRAM_TOKEN=your_bot_token ALLOWED_CHAT_IDS=your_chat_id PROJECTS_DIR=/home/user -
Run:
python bot.py
Use the setup script to automatically install as a service:
./setup.shOr manually:
sudo systemctl enable claude-telegram-bot
sudo systemctl start claude-telegram-bot| Variable | Description | Default |
|---|---|---|
TELEGRAM_TOKEN |
Bot token from @BotFather | Required |
ALLOWED_CHAT_IDS |
Comma-separated allowed user IDs | All users |
PROJECTS_DIR |
Base directory for projects | ~ |
CLAUDE_ALLOWED_TOOLS |
Tools Claude can use | All tools |
The bot uses your system's Claude CLI configuration. Set model with:
claude config set model claude-opus-4-5-20250514MIT