CCGram — Control AI Coding Agents from Telegram
Control AI coding agents from your phone. Walk away mid-session. Keep monitoring and responding from Telegram—without losing terminal access.
Why CCGram?
AI coding agents run in your terminal. Other Telegram bots wrap agent SDKs into isolated API sessions you can't resume in your terminal. CCGram is different. It sits on top of your terminal multiplexer (tmux or herdr), not any agent SDK. Your agent process stays exactly where it is—your session is the source of truth.
This means:
- Desktop to phone, mid-conversation — walk away and keep monitoring from Telegram
- Phone back to desktop, anytime — attach to your terminal and you're back with full scrollback
- Multiple sessions in parallel — each Telegram topic maps to a separate window, each running a different agent
How It Works
graph LR
subgraph phone["📱 Telegram Group (Forum Topics)"]
direction TB
T1["💬 api — Claude"]
T2["💬 ui — Codex"]
T3["💬 data — Gemini"]
T4["💬 ops — Shell"]
T5["💬 lab — Pi"]
end
subgraph bridge["⚡ CCGram"]
direction TB
B1["read output\n(transcripts + terminal)"]
B2["send keystrokes\n(tmux / herdr)"]
B3["instant notifications\n(Claude hooks)"]
end
subgraph machine["🖥️ Your Machine — tmux / herdr"]
direction TB
W1["window @0 · claude"]
W2["window @1 · codex"]
W3["window @2 · gemini"]
W4["window @3 · bash"]
W5["window @4 · pi"]
end
phone -- "messages / voice" --> bridge
bridge -- "responses / live view" --> phone
bridge <--> machine
style phone fill:#e8f4fd,stroke:#0088cc,stroke-width:2px,color:#333
style bridge fill:#fff8e1,stroke:#f9a825,stroke-width:2px,color:#333
style machine fill:#f0faf0,stroke:#2ea44f,stroke-width:2px,color:#333
Each Telegram topic maps to one multiplexer window. Type in Telegram → keystrokes to pane → agent output back to Telegram.
What You Can Do
- Bind agents to topics — one agent per Telegram topic; create via directory browser
- Auto-detect providers — Supports Claude Code, Codex, Gemini, Pi, and Shell simultaneously
- Monitor live — Terminal screenshots on demand or auto-refresh every 5 seconds
- Send commands — Slash commands, voice messages (transcribed via Whisper), or raw shell input
- Run multiple agents in parallel — each topic independent; run different agents at once
- Recover gracefully — Resume, continue, or start fresh if a session crashes
- Send workspace files — Share files to Telegram via
/send(glob, path, or substring search) - Action toolbar — Provider-specific buttons for common actions (Screenshot, Mode, Esc, Enter, etc.)
Quick Start
Install:
uv tool install ccgram # recommended
# or: pipx install ccgram | brew install alexei-led/tap/ccgram
Telegram setup:
- Create a bot via @BotFather — full instructions
- Add bot to a Telegram group with Topics enabled; promote to Admin
- Create
~/.ccgram/.env:
TELEGRAM_BOT_TOKEN=your_bot_token_here
ALLOWED_USERS=your_telegram_user_id
CCGRAM_GROUP_ID=your_telegram_group_id
Get user ID from @userinfobot. Get group ID via @RawDataBot (prefix Peer ID with -100).
Run:
ccgram
Open your Telegram group, create a topic, send a message — directory browser appears. Pick a project directory, choose your agent (Claude, Codex, Gemini, Pi, or Shell), and you're connected.
Prerequisites: Python 3.14+, tmux or herdr (CCGram controls a terminal multiplexer; no agent SDK modifications needed), and one agent CLI (claude, codex, gemini, pi installed and authenticated, or use shell with no extra install).
Documentation
- Guides — CLI reference, configuration, voice transcription, multi-instance setup, session recovery, testing
- Providers — Claude Code, Codex, Gemini, Pi, Shell; session modes, LLM config, custom commands, git worktrees
Optional Features
Web Dashboard — Live terminal (xterm.js), transcript search, multi-pane grid in Telegram. Disabled by default. Enable here.
Development
git clone https://github.com/alexei-led/ccgram.git && cd ccgram
uv sync --extra dev
make check # lint, format, typecheck, test
make test-e2e # end-to-end tests (requires agent CLIs; see docs/guides.md#e2e-tests)
License
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 ccgram-4.3.9.tar.gz.
File metadata
- Download URL: ccgram-4.3.9.tar.gz
- Upload date:
- Size: 16.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d91cf89acfc40bf5b8462f56eb7834fd7c5e2fc2853c0ab802cc08292d37aaf
|
|
| MD5 |
a52ccfc55b2ac17c289713f1d139da7a
|
|
| BLAKE2b-256 |
f649ceee8c96f0e3d3e698372ff2862f06f6ba8975662ac09cfcf76b29969427
|
Provenance
The following attestation bundles were made for ccgram-4.3.9.tar.gz:
Publisher:
release.yml on alexei-led/ccgram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccgram-4.3.9.tar.gz -
Subject digest:
4d91cf89acfc40bf5b8462f56eb7834fd7c5e2fc2853c0ab802cc08292d37aaf - Sigstore transparency entry: 2135940584
- Sigstore integration time:
-
Permalink:
alexei-led/ccgram@827f68ec0ffd715bc6f01bd5158a5277557d031f -
Branch / Tag:
refs/tags/v4.3.9 - Owner: https://github.com/alexei-led
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@827f68ec0ffd715bc6f01bd5158a5277557d031f -
Trigger Event:
push
-
Statement type:
File details
Details for the file ccgram-4.3.9-py3-none-any.whl.
File metadata
- Download URL: ccgram-4.3.9-py3-none-any.whl
- Upload date:
- Size: 15.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf9b11194367ca86f7204254d57c67a0f9208b39e58c4cb3076c94aef1a637f3
|
|
| MD5 |
1aa3134d348c552aed17997e271f032a
|
|
| BLAKE2b-256 |
d83143cb2e4354ff40edf34473517d3cd3d933f5759d6ad54200ce1ebe77b78b
|
Provenance
The following attestation bundles were made for ccgram-4.3.9-py3-none-any.whl:
Publisher:
release.yml on alexei-led/ccgram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccgram-4.3.9-py3-none-any.whl -
Subject digest:
cf9b11194367ca86f7204254d57c67a0f9208b39e58c4cb3076c94aef1a637f3 - Sigstore transparency entry: 2135940642
- Sigstore integration time:
-
Permalink:
alexei-led/ccgram@827f68ec0ffd715bc6f01bd5158a5277557d031f -
Branch / Tag:
refs/tags/v4.3.9 - Owner: https://github.com/alexei-led
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@827f68ec0ffd715bc6f01bd5158a5277557d031f -
Trigger Event:
push
-
Statement type: