by alexei-led
Telegram ↔ tmux/herdr/agterm bridge for Claude Code, Codex CLI, and Pi Agent. Monitor output, respond to prompts, manage parallel sessions. Control AI coding agents from your phone.
# Add to your Claude Code skills
git clone https://github.com/alexei-led/ccgramLast scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T16:00:38.193Z",
"npmAuditRan": true,
"pipAuditRan": true
}See how ccgram compares with popular alternatives.
ccgram is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by alexei-led. Telegram ↔ tmux/herdr/agterm bridge for Claude Code, Codex CLI, and Pi Agent. Monitor output, respond to prompts, manage parallel sessions. Control AI coding agents from your phone. It has 278 GitHub stars.
Yes. ccgram passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/alexei-led/ccgram" and add it to your Claude Code skills directory (see the Installation section above).
ccgram is primarily written in Python. It is open-source under alexei-led on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ccgram against similar tools.
No comments yet. Be the first to share your thoughts!
30 days in the Featured rail · terms & refunds
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
Automated security scan — not a certification.
Control AI coding agents from your phone. Walk away mid-session. Keep monitoring and responding from Telegram—without losing terminal access.
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, herdr, or agterm), not any agent SDK. Your agent process stays exactly where it is—your session is the source of truth.
This means:
graph LR
subgraph phone["📱 Telegram Topics (Group or Private Chat)"]
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 / agterm)"]
B3["instant notifications\n(Claude hooks)"]
end
subgraph machine["🖥️ Your Machine — tmux / herdr / agterm"]
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 tmux window. With Herdr, it maps instead to one guarded agent session: agent.list is the sole identity source and CCGram persists only an opaque herdr-session-v1-… target, never a tab, pane, or terminal ID. Every Herdr agent topic is provider-prefixed and pane-qualified as <Provider> ▸ <workspace> ▸ <tab> ▸ <pane>, so Pi, Claude, Codex, and Gemini topics are easy to find while their labels remain stable when siblings join or leave the tab. Every action reads a fresh agent.list record and fails closed for missing, malformed, sessionless, or legacy bindings. Duplicate canonical targets are quarantined while unrelated sessions remain operational. Legacy locator bindings require explicit rebind and are never inferred from names. A session can still change after that guard and before Herdr dispatches, so delivery is not atomic and may be indeterminate after this post-guard race. With agterm, the primary topic retains the session UUID; split peers get separate foreground-guarded targets.
/send (glob, path, or substring search)Telegram shares its native slash-command suggestions across topics. CCGram keeps /commands, /sessions, /sync, and /upgrade in that list. /commands opens the current topic’s pinned panel with session-specific actions. See topic command panels.
Topic titles retain their status icon and show a short provider prefix: Pi · task, Claude · task, or Term · workspace. A confirmed automatic switch produces one silent notice; startup, repeated polling, and short-lived intermediate providers do not. Manual changes use the /agent reply instead of a second notice.
/agent shows the topic name, selected provider, and Auto or Manual mode. A manual choice is accepted only when it matches the live foreground process; it cannot launch, stop, or redirect an agent. Auto follows detection again. Manual selection filters out hooks from other providers. A switch reconciles the existing session-map entry against the live destination: matching entries are retained, mismatches removed, and later matching hooks are admitted while pinned. Auto rechecks and cleans the entry before releasing the pin. Manual mode excludes queued transcript replies from other providers, but keeps tail replies across /new or /clear within the selected provider; an already in-flight send may finish. An exited agent keeps its recovery flow rather than silently turning ordinary chat into shell commands.
CCGram losslessly combines only eligible consecutive transcript text deliveries for the same chat, topic, window, role, and source session. It preserves each item's formatting and keeps tool updates, media, status updates, and other boundaries separate. The status bubble shows queue progress; at a severe backlog (100 pending items or an oldest item aged 5 minutes), its inline Jump to live action requires confirmation and posts a skipped-range notice. The raw provider transcript is never deleted. Delivery is at-least-once, so a Telegram failure or restart before acknowledgement can repeat a transcript message rather than silently losing it.
Topics and their history are deleted as soon as CCGram confirms that the terminal session has closed. Set CCGRAM_AUTODELETE_DEAD_TOPICS=false to keep a dead session's topic and its binding instead: the recovery banner still answers the next message there, and a later restart can re-link the topic to a re-keyed session. Failed deletions survive restarts and are retried automatically. /sync immediately cleans up locally known stale and retired topics; active or rebound topics are protected. It cannot discover topics whose IDs CCGram no longer knows. See the Sync cleanup guide for retries and Telegram admin permissions.
Topics remain protected while their sessions are being created, including slow startup and recovery flows. Creation ownership is saved before remote operations; after a restart, CCGram checks the recorded target before binding or deleting its topic. An unavailable backend or an unresolved creation outcome never counts as a closed session.
Install:
uv tool install ccgram # recommended
# or: pipx install ccgram | brew install alexei-led/tap/ccgram
Telegram setup:
~/.ccgram/.env:TELEGRAM_BOT_TOKEN=your_bot_token_here
ALLOWED_USERS=your_telegram_user_id
# Group setup only:
CCGRAM_GROUP_ID=your_telegram_group_id
Get your user ID from @userinfobot. For a group, get its ID via @RawDataBot and prefix the Peer ID with -100.
Run:
ccgram
Open the configured group or private bot chat. Create a topic and send a message. The directory browser appears. Pick a project directory and an agent (Claude, Codex, Gemini, Pi, or Shell).
Prerequisites: Python 3.14+, tmux, herdr, or agterm, and one agent CLI. CCGram does not modify agent SDKs.
CCGram supports Herdr protocols 14–22 and uses the public socket API for operations, so a newer CLI can coexist with an older running server. Set HERDR_SOCKET_PATH for an explicit endpoint; otherwise herdr status --json discovers it. Future protocol numbers are attempted with a warning, extra response fields are tolerated, and required session identities remain strictly validated. Telegram rate limiting uses a protected PTB adapter seam and is therefore tested against and constrained to python-telegram-bot>=22.8,<22.9. Install Herdr's integration before launching an agent that needs a native session identity:
herdr integration install pi
herdr integration install antigravity-cli
Restart an already-running agent after installation. Antigravity receives a native Herdr session identity after its first prompt creates a conversation.
Start new agents, or restart already-running agents, after installing the integration so they publish their agent_session identity. Then set CCGRAM_MULTIPLEXER=herdr and run ccgram hook --install as usual.
agterm is macOS-native. Install [agterm](https: