by grinev
OpenCode mobile client via Telegram: run and monitor AI coding tasks from your phone while everything runs locally on your machine. Scheduled tasks support. Can be used as lightweight OpenClaw alternative.
# Add to your Claude Code skills
git clone https://github.com/grinev/opencode-telegram-botOpenCode Telegram Bot is a secure Telegram client for OpenCode CLI that runs on your local machine.
Run AI coding tasks, monitor progress, switch models, and manage sessions from your phone.
No open ports, no exposed APIs. The bot communicates with your local OpenCode server and the Telegram Bot API only.
Scheduled tasks support. Turns the bot into a lightweight OpenClaw alternative for OpenCode users.
Platforms: macOS, Windows, Linux
Languages: English (en), Deutsch (de), Español (es), Français (fr), Русский (ru), 简体中文 (zh)
init/review) from an inline menu with confirmation/tts/worktreeBOT_LOCALE)Planned features currently in development are listed in Current Task List.
/newbot123456:ABC-DEF1234...)You'll also need your Telegram User ID — send any message to @userinfobot and it will reply with your numeric ID.
Run the OpenCode server on the same machine where the bot runs:
opencode serve
The bot connects to the local OpenCode API at
http://localhost:4096by default.
After the bot is configured, you can also start and stop the local OpenCode server from Telegram with
/opencode_startand/opencode_stop.
The fastest way — run directly with npx:
npx @grinev/opencode-telegram-bot@latest
Note: This README tracks the
mainbranch, which may include unreleased changes. The latest npm release may not include every feature described here yet. See recent commits onmain.
Quick start is for npm usage. You do not need to clone this repository. If you run this command from the source directory (repository root), it may fail with
opencode-telegram: not found. To run from sources, use the Development section.
On first launch, an interactive wizard will guide you through the configuration — it asks for interface language first, then your bot token, user ID, OpenCode API URL, and optional OpenCode server credentials (username/password). After that, you're ready to go. Open your bot in Telegram and start sending tasks.
npm install -g @grinev/opencode-telegram-bot
opencode-telegram start
start runs in the foreground by default. This is the recommended mode for systemd, Docker, local debugging, and other external process managers.
To run the bot in the built-in background mode instead:
opencode-telegram start --daemon
opencode-telegram status
opencode-telegram stop
Built-in daemon mode is intended for standalone npm installs without an external supervisor. For
systemd,pm2, or Docker, keep usingopencode-telegram startwithout--daemon.
For Linux systemd setup, see docs/LINUX_SYSTEMD_SETUP.md.
To reconfigure at any time:
opencode-telegram config
| Platform | Status | | -------- | -------------------------------------------- | | macOS | Fully supported | | Windows | Fully supported | | Linux | Fully supported (tested on Ubuntu 24.04 LTS) |
| Command | Description |
| ----------------- | ------------------------------------------------------- |
| /status | Server health, current project, session, and model info |
| /new | Create a new session |
| /abort | Abort the current task |
| /sessions | Browse and switch between recent sessions |
| /projects | Switch between OpenCode projects |
| /worktree | Switch between existing git worktrees |
| /open | Add a project by browsing directories |
| /tts | Toggle audio replies |
| /rename | Rename the current session |
| /commands | Browse and run custom commands |
| /skills | Browse and run OpenCode skills |
| /task | Create a scheduled task |
| /tasklist | Browse and delete scheduled tasks |
| /opencode_start | Start the local OpenCode server on the bot machine |
| /opencode_stop | Stop the local OpenCode server on the bot machine |
| /help | Show available commands |
Any regular text message is sent as a prompt to the coding agent only when no blocking interaction is active. Voice/audio messages are transcribed and then sent as prompts when STT is configured.
When the current project is a git repository, /worktree shows the existing worktrees for that repository. Status and pinned updates display the main project path with the active branch, and show a separate Worktree line when a linked worktree is selected.
Scheduled tasks let you prepare prompts in advance and run them automatically later or on a recurring schedule. This is useful for periodic checks, routine code maintenance, or tasks you want OpenCode to execute while you are away from your computer. Use /task to create a scheduled task and /tasklist to review or delete existing ones.
build agentSCHEDULED_TASK_EXECUTION_TIMEOUT_MINUTES if neededTASK_LIMIT in your .enven, de, es, fr, ru, zhBOT_LOCALEWhen installed via npm, the configuration wizard handles the initial setup. The .env file is stored in your platform's app data directory:
~/Library/Application Support/opencode-telegram-bot/.env%APPDATA%\opencode-telegram-bot\.env~/.config/opencode-telegram-bot/.env| Variable | Description
No comments yet. Be the first to share your thoughts!