Claude Code CLI orchestration layer. Telegram bridge, scheduling, planning, memory, and browser automation.
Part of the Ghost in the Shell ecosystem.
- Create a Telegram bot via @BotFather
- Initialize config:
shell init
- Set your bot token:
export TELEGRAM_BOT_TOKEN="your-token-here"
- Edit
~/.shell/config.json— add your Telegram user ID toallowed_users:(Find your user ID by messaging @userinfobot){ "telegram": { "token_env": "TELEGRAM_BOT_TOKEN", "allowed_users": [123456789] } } - Start the daemon:
shell daemon
- Telegram bridge — Each chat gets its own persistent Claude Code session
- Memory — Semantic memory via ghost with per-chat profiles and context injection
- Scheduling — Cron and one-shot schedules with quiet hours and heartbeat check-ins
- Planning — Execute-test-review loop with git worktree isolation
- Browser — Headless Chrome automation via shell-browser
- Image generation — AI image creation via shell-imagen
- Web search — Built-in Brave/Tavily/DuckDuckGo search
- Tunnels — Expose local ports via shell-tunnel
- Secrets — Encrypted secret store via shell-secrets
- Streaming — Live message edits as Claude responds
- Albums — Multi-photo support with 500ms debounce
- Reactions — Emoji-triggered actions (go, stop, cancel, status, retry)
shell init— Create config directory and default configshell daemon [--watch]— Start the Telegram bot daemonshell send "message"— One-shot test without Telegramshell status— Show active sessionsshell session list|kill <chat-id>— Session managementshell restart— Send SIGHUP to running daemonshell stop— Send SIGTERM to running daemonshell search "query"— Web search from CLI
/start— Initialize and show welcome message/new— Reset session, start fresh conversation/status— Show current session info/help— Show available commands/plan— Start a plan execution/schedule add|list|delete|enable|pause— Manage schedules/heartbeat <interval> <message>— Set up periodic check-ins/imagine <prompt>— Generate an image
make build # Build binary
make test # Run tests
make vet # Run go vet
make watch # Build and run with --watch for live reloadEach Telegram chat gets its own Claude Code session. Messages are forwarded to:
claude -p "message" --resume <session-id> --output-format stream-json
Claude's responses are parsed for artifact markers and [noop] directives. Bridge operations (pm, tunnel, schedule, relay, browser) use MCP tools or skill scripts invoked via Bash.
Sessions persist across restarts via SQLite. Memory context is injected via --append-system-prompt.
| Repo | Role |
|---|---|
| ghost | Persistent agent memory (the "ghost" — consciousness/personality) |
| shell | Main orchestration app (the "shell" — vessel/runtime) |
| shell-browser | Headless Chrome automation |
| shell-imagen | Image generation via Gemini |
| shell-search | Web search CLI |
| shell-secrets | Encrypted secret store |
| shell-tunnel | HTTP tunnels via cloudflared |
MIT