Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_tg-0.1.2.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_tg-0.1.2-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file claude_tg-0.1.2.tar.gz.

File metadata

  • Download URL: claude_tg-0.1.2.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_tg-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6f56a43bdc7d687f2f9b031f80c45ccaafd277e0493dc8b0068ac1ba321107f6
MD5 e0b7a031b01731f19357e5d5d3ff1ac8
BLAKE2b-256 529ffa8da2a6f0686d0c358e66007b015438cede2cc1b8490f52ef6108a0ddcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_tg-0.1.2.tar.gz:

Publisher: publish.yml on MerkulovDaniil/claude-tg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_tg-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: claude_tg-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_tg-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 49684ffccce41320d8a73f8f5bbdc4fa1274f3654aecfbc5797537eb322e8fb9
MD5 1d4250450d0fbbcab1061eba0dbefc6f
BLAKE2b-256 40c2f4a9d6c2c28cf86e29d48c9500e0b2aaa6d243f84096080affd1134add76

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_tg-0.1.2-py3-none-any.whl:

Publisher: publish.yml on MerkulovDaniil/claude-tg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page