Run OpenCode and Claude Code coding agents on your own machine or VPS, driven from Telegram on your phone.
TelegramCode is a self-hosted Telegram bot that turns Telegram into a terminal
for agentic coding CLIs. It runs on your own machine or server and connects out
to Telegram only, so there are no open inbound ports. You bind each forum topic
(or the bot's own DM) to a project folder, and each topic runs its own isolated
OpenCode or Claude Code session that you drive by chat, voice, or file. Topics
work like terminal tabs: one topic is one project, and two topics can share a
folder for parallel work.
What it does
Both agents. OpenCode over its native HTTP+SSE server, and Claude Code via tmux or json-stream.
From your phone. Type, send a voice note (transcribed with Whisper), or drop in a photo, file, or PDF.
No open ports. Outbound-only to Telegram, so it is comfortable to leave on a VPS.
Pinned question alerts. When the agent asks something, the bot pins it so even a muted topic notifies you once.
Scheduled and self-driving runs. Cron, one-shot, or N-times jobs per topic, and the agent can schedule itself.
Restart-safe. Sessions survive both a bot restart and an agent-server restart.
Raw terminal./terminal binds a topic to a real shell in the project folder.
Agent-facing MCP. The agent sends files, images, and video back to you, posts multiple messages, and schedules itself.
12 UI languages. MIT licensed, Node 22+.
Install
npm install -g telegramcode
Put your bot token in one .env, launch from your projects folder, and bind a topic. Full quick start is in the README.