From 7bb9c7b81ab2b82414fefe620842466492982d5f Mon Sep 17 00:00:00 2001
From: alexanxin
+ opencode-dispatch
+
+ Control opencode from Telegram — like Claude's Dispatch, but for opencode. +
-> I deeply appreciate what the opencode team is building. This project is my small contribution to their already awesome work — making opencode accessible from anywhere, just like Claude's Dispatch. + -opencode-dispatch bridges your Telegram bot to the opencode CLI. Send messages from your phone, and opencode processes them just like it would in a terminal. Perfect for when you're away from your desk but still want AI assistance. ++ Setup · How It Works · Use Cases · Security · Troubleshooting +
+ +--- + +> I deeply appreciate what the opencode team is building. This is my small contribution to their already awesome work — making opencode accessible from anywhere via Telegram. + +Bridge your Telegram bot to the [opencode CLI](https://opencode.ai). Send messages from your phone, opencode processes them just like it would in a terminal. Perfect for when you're away from your desk but still want AI assistance. ## What You Need @@ -102,10 +118,9 @@ Your Phone → Telegram → bot.py → opencode API (port 5050) → response → ``` You: "What does the auth middleware in @middleware.ts do?" -opencode: "The auth middleware in middleware.ts checks for a valid JWT token - in the Authorization header. It extracts the user ID from the token - and attaches it to the request object. If the token is missing or - expired, it returns a 401 response." +opencode: "The auth middleware checks for a valid JWT token + in the Authorization header. It extracts the user ID + and attaches it to the request object." ``` ### 2. Start a Task @@ -176,16 +191,6 @@ OPENCODE_SERVER_PASSWORD=your-secret The server only listens on `127.0.0.1` (localhost) by default. It's not accessible from other machines on your network. Never use `--hostname 0.0.0.0` unless you know what you're doing. -## What's Included - -| File | Purpose | -|------|---------| -| `bot.py` | Python bot — receives Telegram messages and forwards to opencode | -| `bot.js` | Node.js bot — same as bot.py but for Node users | -| `requirements.txt` | Python dependencies | -| `package.json` | Node.js dependencies | -| `.env.example` | Template for your configuration | - ## Troubleshooting **"Can't connect to opencode"**