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.
# Add to your Claude Code skills
git clone https://github.com/grinev/opencode-telegram-botGuides for using ai agents skills like opencode-telegram-bot.
Last scanned: 5/11/2026
{
"issues": [
{
"type": "npm-audit",
"message": "ip-address: ip-address has XSS in Address6 HTML-emitting methods",
"severity": "medium"
}
],
"status": "PASSED",
"scannedAt": "2026-05-11T07:40:51.430Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}No comments yet. Be the first to share your thoughts!
OpenCode 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)/ls to browse files and directories inside the current project, open subdirectories, go back, and download files by tapping themPlanned 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 |
| /detach | Detach from the current session without stopping it |
| /sessions | Browse and switch between recent sessions |
| /messages | Browse user messages, revert or fork from a previous state |
| /projects | Switch between OpenCode projects |
| /worktree | Switch between existing git worktrees |
| /open | Add a project by browsing directories |
| /ls | List directory contents, then tap to open or download |
| /tts | Toggle audio replies |
| /rename | Rename the current session |
| /commands | Browse and run custom commands |
| /skills | Browse and run OpenCode skills |
| /mcps | Browse and toggle MCP servers |
| /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.
The /messages command displays all user messages in the current session, sorted by time (newest first). Select a message to view its full text and access the Revert and Fork actions.
Revert rolls back the session state to the selected message, discarding all subsequent messages and agent responses. This is useful when you want to retry a different approach from a specific point in the conversation.
Fork creates a new session that branches from the selected message. The original session remains unchanged, and you can continue working in the new forked session. This is useful when you want to explore an alternative approach without losing the original conversation history.