pocketagent

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT

README

pocketagent

Your coding agent in your pocket. Drive Claude Code (and soon Codex, Gemini, Kiro, Aider and any other CLI agent) from Telegram with text, voice notes and images. Approve risky actions with a tap.

Work in progress. See the releases for what's shipped.

Quick start

go install github.com/c0sm0thecoder/pocketagent/cmd/pocketagent@latest
mkdir -p ~/.pocketagent && cp config.example.yaml ~/.pocketagent/config.yaml   # then edit it
pocketagent run

You need a bot token from @BotFather and your numeric Telegram user id (from @userinfobot).

Development

go test ./...                                   # unit tests
go test -tags integration ./internal/agent/...  # against real agent CLIs (costs a few cents)

License

MIT

Directories

Path Synopsis
cmd
pocketagent command
Command pocketagent drives coding agents (Claude Code, Codex, Gemini, Kiro, Aider and anything else) from Telegram.
Command pocketagent drives coding agents (Claude Code, Codex, Gemini, Kiro, Aider and anything else) from Telegram.
internal
agent
Package agent defines the interface every coding agent backend implements.
Package agent defines the interface every coding agent backend implements.
agent/claude
Package claude runs the Claude Code CLI headless with stream-json I/O. Approvals arrive through the pocketagent MCP bridge, which Claude Code calls as its --permission-prompt-tool.
Package claude runs the Claude Code CLI headless with stream-json I/O. Approvals arrive through the pocketagent MCP bridge, which Claude Code calls as its --permission-prompt-tool.
bridge
Package bridge runs a localhost MCP server that agent processes connect to.
Package bridge runs a localhost MCP server that agent processes connect to.
config
Package config loads pocketagent's YAML config file.
Package config loads pocketagent's YAML config file.
core
Package core runs conversations: it picks the agent, queues prompts, applies the permission policy, tracks cost and takes git checkpoints.
Package core runs conversations: it picks the agent, queues prompts, applies the permission policy, tracks cost and takes git checkpoints.
gitcp
Package gitcp takes git snapshots of a working tree before each agent turn, so changes can be shown (/diff) and rolled back (/undo) without touching the user's branch, index or stash.
Package gitcp takes git snapshots of a working tree before each agent turn, so changes can be shown (/diff) and rolled back (/undo) without touching the user's branch, index or stash.
store
Package store persists per-conversation state as a JSON file.
Package store persists per-conversation state as a JSON file.
stt
Package stt turns voice notes into text.
Package stt turns voice notes into text.
telegram
Package telegram is the Telegram frontend: it turns updates into core calls and implements core.UI.
Package telegram is the Telegram frontend: it turns updates into core calls and implements core.UI.
tts
Package tts turns replies into voice notes.
Package tts turns replies into voice notes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL