CCGram

Drive Claude Code, Codex and other terminal AI agents from Telegram while your session stays in tmux/herdr/agterm.

Stars
★ 289
Last updated
1d ago v4.25.0
FARS reviewed
Nov 30, 2026
License
MIT
Primary language
Python

At a glance

How it runs
CLIChat bot
Works with
Portable with changesCodex · Claude Code
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.14+tmux, herdr, or agtermTelegram bot tokenAn agent CLI (Claude Code, Codex, Gemini, Pi, or shell)Shell / CLINetwork accessLocal filesystem
Typical use
A developer who leaves the desk during a long build or test run and checks the agent's output and presses Enter from a phone.
Not a fit if
  • Users who need to run natively on Windows (only Linux/macOS/WSL2)
  • Teams unwilling to route terminal sessions and output through Telegram
  • Individuals who don't already use a tmux/herdr/agterm multiplexer
Maintenance
Commits in the last 30 dayslast commit 2026-11-30latest release v4.25.0 (2026-11-18)

What does this agent do, and when should you use it?

CCGram is a bridge between Telegram and a terminal multiplexer (tmux, herdr, or agterm) that lets you keep monitoring and steering AI coding agents after you walk away from the desk. Its distinguishing design is that it sits on top of the multiplexer rather than wrapping an agent SDK, so the agent process stays exactly where it was and your terminal session remains the source of truth — you can move between desktop and phone without losing scrollback. Each Telegram topic maps to one tmux window, one guarded Herdr agent session, or one agterm agent pane, in a group or a private chat. CCGram reads agent transcripts and terminal output, forwards keystrokes back, and gets instant events through provider hooks, supporting Claude Code, Codex, Gemini, Pi and Shell side by side with parallel sessions. It ships as a Python package installed via uv, pipx or Homebrew, runs locally, and requires Python 3.14+, a multiplexer and at least one agent CLI.

CCGram runs a long-lived ccgram process that reads TELEGRAM_BOT_TOKEN and ALLOWED_USERS from ~/.ccgram/.env (plus CCGRAM_GROUP_ID in group mode), connects to the Telegram Bot API, and binds topics to terminal targets. A single typed line of the form <agent>[:<mode>] <project|path> [@branch] <instruction...> makes CCGram resolve the project under CCGRAM_PROJECTS_ROOTS (default ~/Workspace), start the agent in a tmux window, Herdr guarded session or agterm pane, name the topic after the line and forward the instruction; /bind adopts an already-running window instead. At runtime it continuously reads agent transcripts and terminal screens and pushes replies, tool updates and status back to Telegram, using async hooks installed with ccgram hook --install (Claude Code SessionStart/Stop, native async hooks for Codex and Pi, a detached worker for Gemini) for instant notifications. Incoming messages, slash commands, voice notes transcribed via Whisper, or raw shell input are converted into keystrokes for the target session; it also provides on-demand or 5-second-refresh terminal screenshots, provider-specific action buttons, one-tap answers to numbered and yes/no prompts, and /send for glob, path or substring file search. Topics are deleted once the terminal session is confirmed closed, failed deletions are persisted and retried, and /sync cleans up stale known topics.

  1. A developer who leaves the desk during a long build or test run and checks the agent's output and presses Enter from a phone.
  2. An engineer running Claude Code, Codex and Gemini in parallel who wants one Telegram topic per window without cross-talk.
  3. Someone whose Claude Code session already lives in tmux and doesn't want to restart elsewhere — /bind adopts the existing window.
  4. A team running agents on a remote dev box or server who wants Telegram instead of ad-hoc SSH to check progress and answer YOLO-mode prompts.
  5. A mobile user who dictates instructions by voice (Whisper transcription) or taps buttons for common actions like Screenshot, Mode, Esc and Enter.
  6. A developer who wants to share a log or build artifact from the workspace into the chat via /send search.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • uv tool install ccgram
Environment variables
TELEGRAM_BOT_TOKEN CCGRAM_GROUP_ID
Config files
~/.ccgram/.env
Runtime
Python 3.14+
Install notes cover
Windows · macOS · WSL

How do you install or deploy this agent?

Install with uv (recommended), pipx, or Homebrew:

uv tool install ccgram
# or: pipx install ccgram | brew install alexei-led/tap/ccgram

Prerequisites: Python 3.14+, tmux or herdr or agterm, and one agent CLI. For the Herdr or agterm backends, install integrations first:

herdr integration install pi
herdr integration install antigravity-cli

Create a bot via @BotFather; for a private chat enable Topics for the bot, for a group add the bot and promote it to Admin. Then create the config file:

TELEGRAM_BOT_TOKEN=your_bot_token_here
ALLOWED_USERS=your_telegram_user_id
# Group setup only:
CCGRAM_GROUP_ID=your_telegram_group_id

Place it at ~/.ccgram/.env. Install hooks:

ccgram hook --install

On Windows, run everything inside WSL2; native Windows is not supported.

How do you use this agent?

Start the service:

ccgram

In the configured group or private bot chat, create a topic and type one line to create the session, bind the topic and forward the instruction:

codex ccgram fix the hook timeout
claude:safe ccgram refactor the parser
pi archfit @perf-sweep profile the scan stage

To adopt an already-running tmux window, use /bind. Use /commands for the current topic's pinned panel. Switch backends with environment variables, for example:

CCGRAM_MULTIPLEXER=herdr
CCGRAM_MULTIPLEXER=agterm

To create automatic topics only for explicitly marked targets:

CCGRAM_TOPIC_DISCOVERY=marked
ccgram topic status
ccgram topic mark TARGET

Send workspace files with /send, clean up stale topics with /sync, and answer the recovery banner in a dead topic to resume.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Bridges at the terminal multiplexer, not an agent SDK, so the session stays the source of truth and you can move phone↔desktop without losing scrollback.
  • Handles Claude Code, Codex, Gemini, Pi and Shell together, with one Telegram topic per window or guarded session for independent parallel work.
  • The Herdr backend treats agent.list as the sole identity source and fails closed on missing, malformed, sessionless or legacy bindings, quarantining duplicate targets.
  • Delivery queue losslessly merges eligible consecutive transcript text for the same topic while keeping tool updates and media separate, with a backlog 'Jump to live' confirmation.
  • Low mobile friction: one-line session creation, /bind adoption, voice transcription, terminal screenshots on a 5-second refresh, and provider-specific action buttons.
Limitations
  • Native Windows is unsupported and requires WSL2; the agterm backend is macOS-only.
  • Heavy prerequisites: Python 3.14+, one of tmux/herdr/agterm, an agent CLI, and Telegram bot configuration.
  • Delivery is at-least-once, so a Telegram failure or restart before acknowledgement can repeat a transcript message.
  • Herdr/agterm guards are not atomic with input dispatch, so delivery can be indeterminate after a post-guard race; avoid rearranging agterm panes during a send.
  • Topics and their history are deleted once the session is confirmed closed (unless CCGRAM_AUTODELETE_DEAD_TOPICS=false), and /sync cannot find topics whose IDs CCGram no longer knows.

How does this agent compare with similar options?

The README contrasts CCGram with other Telegram bots that wrap agent SDKs into isolated API sessions you cannot resume in your terminal, arguing that CCGram keeps the terminal session as the source of truth.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
CCGram This agent 59 · Major gaps CLIFree + model costs ★ 289 1d ago Python Codex · Claude Code
agterm 75 · Some gaps Desktop appFree ★ 781 today Swift Codex · Claude Code
CCB Multi-Agent Terminal Workspace 79 · Good CLIFree + model costs ★ 3.6k 7d ago Python Codex · Claude Code
wmux Agent Workspace 75 · Good Desktop app ★ 472 1d ago TypeScript Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
59/ 100 5-point scale 3.0 / 5
Trust 17/29
Reliability 8/14
Adaptability 12/18
Convention 11/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

README and api/server.py show loopback-only binding, pairing-code length checks, rate limiting, body size caps, and remote clients unable to raise approval mode (non-normal mode returns 422) — positive least-privilege and confirmation evidence. However, agents start in YOLO mode by default, ALLOWED_USERS is the sole access control, and the Telegram token plus Whisper keys live in .env with only documentation-level guidance and no encryption/redaction mechanism, so sensitive_data_handling is deducted to 1. Dependencies have upper/lower bounds (PTB 22.8–22.9, libtmux 0.62–0.63) but no lockfile or vulnerability-scan evidence, so dependency_security is 2 not 3. Rollback has /sync, failed-deletion retries, recovery banners, and CHANGELOG rollback notes but no automated rollback. source_attribution only mentions the original project six-ddc in LICENSE; README does not state the derivative relationship, deducted to 1.

Reliability8 / 14 · 2.9/5

README describes Herdr protocols 14–22, fail-closed behavior, duplicate-target quarantine, and at-least-once delivery concretely, consistent with server.py rate limiting/validation, so self_consistency is 2. But it requires Python 3.14+ and external tmux/herdr/agterm binaries with no compatibility matrix, so dependency_availability is deducted to 1. Failure messages have explicit ProtocolError codes and text in code, so failure_messages is 2.

Adaptability12 / 18 · 3.3/5

README clearly supports Linux/macOS/WSL2, excludes native Windows, and notes agterm is macOS-only; scenarios cover phone monitoring, parallel sessions, voice, and file sending, so audience_and_scenarios and environment_fit are 2. capability_boundaries are explicit (/agent manual mode cannot launch/stop/redirect an agent; split topics cannot close the shared session), so 2. trigger_precision has topic discovery modes, mark/unmark, and /sync unflagged preview confirmation, so 2.

Convention11 / 18 · 3.1/5

README is well structured with complete install steps (uv/pipx/brew), examples and FAQ-style notes, and explicit known limitations (non-atomic delivery, no Windows), so 2. License is MIT and consistent with pyproject, and versioning is backed by hatch-vcs and CHANGELOG, so 2. maintenance_responsibility is deducted to 1 because the publisher is unverified, there is a single author, and no governance is described.

Effectiveness7 / 13 · 2.7/5

Output usability is high (topic panels, screenshots, commands, recovery flows) and marginal_value lies in preserving terminal sessions rather than SDK isolation, so 2. But it requires creating a Bot, configuring .env, and installing external multiplexers and agent CLIs, so cost_benefit is deducted to 1.

Verifiability4 / 8 · 2.5/5

README claims largely map to code/CI (ruff/pyright/deptry/pytest, tmux checksum verification), but some claims (Herdr protocol compatibility, at-least-once delivery) lack independent evidence, so claim_traceability and cross_source_corroboration are 1. The docs distinguish facts from inferences (e.g., 'delivery is not atomic'), so fact_inference_separation is 2.

Risks and how to mitigate them
  • Agents start in YOLO mode by default and ALLOWED_USERS is the sole access control; a leaked token equals terminal control.
  • Telegram Bot Token and Whisper keys are stored in plaintext .env with no encryption or redaction mechanism.
  • Requires Python 3.14+ and external tmux/herdr/agterm binaries; install and compatibility cost is high and no lockfile evidence is present.
  • Publisher identity is unverified; maintenance responsibility and update path are unclear.
  • Some README behavior claims (Herdr protocol compatibility, at-least-once delivery) lack independent corroboration.
Evidence confidence: Low Reviewed Nov 30, 2026 Reviewed revision ce4c307ac22a
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/ccgram.svg)](https://followagents.com/en/agents/ccgram)
<a href="https://followagents.com/en/agents/ccgram"><img src="https://followagents.com/badge/ccgram.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v4.25.0
    Release notes excerpt
    Fixed - Advance the delivery checkpoint after a merged Telegram send completes, even when several messages share one receipt. This prevents a stuck checkpoint from replaying already delivered transcript output after a restart ([#395](https://github.com/alexei-led/ccgram/issues/395)). - Retry transient Telegram photo and document downloads up to three attempts total. Only completed files are saved, existing uploads are not overwritten, and Telegram reports the saved path even if the agent could not be notified ([#397](https://github.com/alexei-led/ccgram/issues/397)). …
    View on GitHub ↗
  2. v4.24.0
    Release notes excerpt
    Flag-driven topic lifecycle - In marked discovery mode, unflagging a markable primary pauses forwarding and closes its Telegram topic without deleting messages or stopping the terminal. Reflagging reopens the same topic without replaying paused transcript output. - Persist paused bindings and source-generation-qualified resume frontiers across restarts; transcript rotation cannot leave a stale cutoff suppressing fresh replies. Fence queued retries, tool batches, drafts and live views against pause/resume generations. …
    View on GitHub ↗
  3. v4.23.0
    Release notes excerpt
    Marked-only topic discovery - Opt in with CCGRAM_TOPIC_DISCOVERY=marked or ccgram run --topic-discovery marked. Automatic discovery remains the default on agterm, Herdr, and tmux. - Select a terminal with ccgram topic mark TARGET; inspect exact target IDs, native owners, and unfinished operations with ccgram topic status. These commands do not need Telegram credentials. In marked mode, unmark TARGET stops future automatic admission without interrupting existing topics. …
    View on GitHub ↗

FAQ

Do I have to pay for CCGram?
No — it is MIT-licensed and free to install. You still supply the model/API costs of whichever agent CLI you run and need a Telegram bot.
Where does my code and terminal output go?
The agent runs on your own machine; CCGram is a local process that pushes transcripts and terminal screens onto Telegram and receives instructions there. Suitability depends on whether you accept that traffic passing through Telegram.
What happens when an agent crashes or the terminal restarts?
CCGram offers resume, continue or start-fresh recovery. The topic is deleted by default when the session closes, but CCGRAM_AUTODELETE_DEAD_TOPICS=false keeps the topic and binding so a later restart can re-link a re-keyed session.
Should I use a group or a private chat?
Both work: a private chat needs Topics enabled for the bot in BotFather, with topic 1 as the control topic; a group needs the bot added to a Topics-enabled group, promoted to Admin, and CCGRAM_GROUP_ID set.
Can the same message arrive twice?
Yes, occasionally — delivery is at-least-once, so a failure or restart before acknowledgement may repeat a transcript message, though the raw transcript is never deleted.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts