Control your AI coding sessions from Telegram.
omo-tg is a self-hosted Telegram Mini App and bot that connects to OpenCode and omo-pulse. Check live session status, send prompts, abort stuck tasks, and track token usage from your phone or desktop without touching your IDE.
- Telegram Mini App - Full dashboard inside Telegram with responsive UI
- Bot Commands -
/start,/status,/sessionsfor quick access - Session Interaction - Send prompts, answer questions, abort sessions directly from Telegram
- Real-time Status Monitoring - Live updates from omo-pulse API
- Pinned Status Message - Automatic notifications via omo-pulse notification module
┌─────────────────────────────────────────────────────────────┐
│ Telegram │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Mini App (Webview) │ Bot Commands │ Notifications│ │
│ └─────────────────────────────────────────────────────┘ │
└──────────────────────────────┬──────────────────────────────┘
│ HTTPS (Webhook)
▼
┌─────────────────────────────────────────────────────────────┐
│ omo-tg (:4400) │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Hono Server │ React UI │ Bot Handler │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────┬────────────────────────────┬──────────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────┐
│ omo-pulse (:4300) │ │ OpenCode (:4096) │
│ Monitoring API │ │ Session API │
└──────────────────────┘ └──────────────────────┘
- Bun >= 1.1.0 (
bun --version) - omo-pulse running (see omo-pulse repository)
- OpenCode server running (
opencode serveon port 4096) - Telegram Bot Token from @BotFather
- HTTPS for production (Cloudflare Tunnel, ngrok, or VPS with SSL)
-
Clone and install
git clone https://github.com/ezotoff/omo-tg.git cd omo-tg bun install -
Configure environment
cp .env.example .env # Edit .env with your Telegram bot token -
Start omo-pulse (in separate terminal)
# In omo-pulse directory bun run dev -
Start omo-tg
bun run dev
-
Set up HTTPS (see below)
-
Configure BotFather (see below)
| Environment Variable | Default | Description |
|---|---|---|
OMO_PULSE_URL |
http://localhost:4300 |
omo-pulse API URL for monitoring data |
OPENCODE_URL |
http://localhost:4096 |
OpenCode server URL for session interaction |
TELEGRAM_BOT_TOKEN |
(required) | Telegram bot token from @BotFather |
TELEGRAM_CHAT_ID |
(optional) | Specific chat ID for bot commands |
OMO_TG_PORT |
4400 |
omo-tg server port |
OMO_TG_PUBLIC_URL |
(required for production) | Public HTTPS URL for Telegram webhook |
OPENCODE_USERNAME |
(optional) | OpenCode server username (if password-protected) |
OPENCODE_PASSWORD |
(optional) | OpenCode server password (if password-protected) |
Telegram Mini Apps require HTTPS in production. Choose one option:
-
Install cloudflared:
# macOS brew install cloudflare/cloudflare/cloudflared # Linux wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb sudo dpkg -i cloudflared-linux-amd64.deb
-
Authenticate:
cloudflared tunnel login
-
Create tunnel:
bun run tunnel # Or manually: cloudflared tunnel create omo-tg -
Route DNS:
cloudflared tunnel route dns omo-tg your-subdomain.example.com
-
Run tunnel:
cloudflared tunnel run omo-tg
-
Set
OMO_TG_PUBLIC_URL=https://your-subdomain.example.comin.env
- Install ngrok: https://ngrok.com/download
- Start tunnel:
ngrok http 4400
- Use the provided HTTPS URL (note: free URLs change on restart)
- Set
OMO_TG_PUBLIC_URLto the ngrok URL
- Deploy omo-tg to a VPS
- Configure reverse proxy (nginx example):
server { server_name your-domain.example.com; location / { proxy_pass http://localhost:4400; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } listen 443 ssl; ssl_certificate /path/to/fullchain.pem; ssl_certificate_key /path/to/privkey.pem; }
- Set
OMO_TG_PUBLIC_URL=https://your-domain.example.com
To configure the Telegram Mini App menu button:
- Send
/mybotsto @BotFather - Select your bot → Bot Settings → Menu Button
- Choose Configure menu button
- Enter your public HTTPS URL (from Cloudflare/ngrok/VPS)
- Save changes
Users will now see a "Open Dashboard" button in your bot's chat.
omo-tg and omo-pulse work together but serve different purposes:
| Component | Purpose | Required? |
|---|---|---|
| omo-tg | Telegram interface for interaction | Yes (this project) |
| omo-pulse | Monitoring dashboard + API | Yes (for monitoring data) |
| OpenCode | AI coding sessions | Yes (for session interaction) |
Key points:
- omo-tg provides the Telegram Mini App and bot commands
- omo-pulse provides monitoring data via API (
/api/projects) - Both use the same Telegram bot token (no conflict)
- omo-tg connects directly to OpenCode for session interaction
- Pinned status notifications come from omo-pulse, not omo-tg
- Mini App Pausing: Telegram Mini Apps pause when the Telegram app is minimized (no background updates)
- Notifications: Pinned status notifications are handled by omo-pulse, not omo-tg
- HTTPS Required: Production Telegram Mini Apps require HTTPS
- Network Access: OpenCode server must be reachable from omo-tg server
- Bot Token: One bot token shared between omo-tg and omo-pulse notifications
| Layer | Technology |
|---|---|
| Runtime | Bun >= 1.1.0 |
| Language | TypeScript (strict mode) |
| UI Framework | React 18 |
| Build Tool | Vite 5 |
| Server Framework | Hono |
| CSS | Plain CSS (no frameworks) |
| Package Manager | Bun |
# Development server (UI + API)
bun run dev
# UI-only development
bun run dev:ui
# Production build
bun run build
# Production server
bun run start
# Cloudflare Tunnel setup
bun run tunnelMIT