Claude Code <-> Telegram bridge
Project description
claude-tg
Claude Code CLI <-> Telegram bridge. Seamless terminal experience through Telegram.
Quick Start
pip install -e .
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"
export CLAUDE_WORK_DIR="/path/to/project"
claude-tg
Commands
| Command | Description |
|---|---|
/clear |
Reset session |
/compact |
Compact conversation context |
/cancel |
Stop current task |
/cost |
Show session cost |
/model <name> |
Switch model |
Regular messages go directly to Claude Code.
Configuration
| Env var | Default | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
required | Bot token from @BotFather |
TELEGRAM_CHAT_ID |
required | Your chat ID |
CLAUDE_WORK_DIR |
cwd |
Working directory for Claude |
CLAUDE_TG_VERBOSE |
0 |
Show tool results (1 to enable) |
CLAUDE_TG_MODEL |
— | Override Claude model |
CLAUDE_TG_MAX_BUDGET |
— | Max budget in USD |
CLAUDE_TG_SESSION_TIMEOUT |
3600 |
Auto-reset after N seconds of inactivity |
CLAUDE_TG_UPDATE_INTERVAL |
2.0 |
Telegram message update interval (seconds) |
CLI flags
claude-tg --work-dir /path/to/project --verbose
Features
- Token-level streaming with adaptive rate limiting
- Automatic message chaining for long outputs
- Photo and file uploads (passed to Claude via file references)
- Inline cancel button
- Session auto-reset after inactivity
- Compact tool call display (verbose mode available)
Requirements
- Python 3.11+
- Claude Code CLI installed and authenticated
- Telegram bot token
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_tg-0.1.4.2.tar.gz.
File metadata
- Download URL: claude_tg-0.1.4.2.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1bf3bf61dc0de8f5a4a3f2e24a2b5a717019ddc30a463d2c22b91f75fc72ae9
|
|
| MD5 |
d9823c6cc1fef6b875b8098a1b30bf94
|
|
| BLAKE2b-256 |
6c735da04a36ee6df7aeec6f5e5a34c8592c4ec48434f80ccd8881b6057e23fd
|
Provenance
The following attestation bundles were made for claude_tg-0.1.4.2.tar.gz:
Publisher:
publish.yml on MerkulovDaniil/claude-tg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_tg-0.1.4.2.tar.gz -
Subject digest:
c1bf3bf61dc0de8f5a4a3f2e24a2b5a717019ddc30a463d2c22b91f75fc72ae9 - Sigstore transparency entry: 927172763
- Sigstore integration time:
-
Permalink:
MerkulovDaniil/claude-tg@e5929fab9379c96667de2565f604201643083a16 -
Branch / Tag:
refs/tags/v0.1.4.2 - Owner: https://github.com/MerkulovDaniil
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e5929fab9379c96667de2565f604201643083a16 -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_tg-0.1.4.2-py3-none-any.whl.
File metadata
- Download URL: claude_tg-0.1.4.2-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87810f32eee595ce8d5b58485dbcb723c89a6ee43d5434203ebcfffe1ef27f61
|
|
| MD5 |
7fb07ffaea75a8a170842ccbd348cdd2
|
|
| BLAKE2b-256 |
2a6b2ede55a314ffd8714882158fa8e23eafa9ff2167f538cd7818f6dbd03211
|
Provenance
The following attestation bundles were made for claude_tg-0.1.4.2-py3-none-any.whl:
Publisher:
publish.yml on MerkulovDaniil/claude-tg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_tg-0.1.4.2-py3-none-any.whl -
Subject digest:
87810f32eee595ce8d5b58485dbcb723c89a6ee43d5434203ebcfffe1ef27f61 - Sigstore transparency entry: 927172769
- Sigstore integration time:
-
Permalink:
MerkulovDaniil/claude-tg@e5929fab9379c96667de2565f604201643083a16 -
Branch / Tag:
refs/tags/v0.1.4.2 - Owner: https://github.com/MerkulovDaniil
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e5929fab9379c96667de2565f604201643083a16 -
Trigger Event:
push
-
Statement type: