11# Codex Bridge Desktop
22
3+ Control your local Codex threads from Telegram. Keep working while away from your Mac. 🚀
4+
5+ ![ App Icon] ( ./apps/desktop/electron/assets/cab-brand-icon.png )
6+
7+ ![ GitHub release] ( https://img.shields.io/github/v/release/tonyHu08/CodeX_Bridge?display_name=tag&sort=semver )
8+ ![ macOS] ( https://img.shields.io/badge/platform-macOS-111827 )
9+ ![ License] ( https://img.shields.io/github/license/tonyHu08/CodeX_Bridge )
10+ ![ Stars] ( https://img.shields.io/github/stars/tonyHu08/CodeX_Bridge?style=social )
11+
312[ English] ( #english ) | [ 中文] ( #中文 )
413
14+ Quick links: [ Download] ( https://github.com/tonyHu08/CodeX_Bridge/releases ) · [ Commands] ( ./docs/COMMANDS.md ) · [ Troubleshooting] ( ./docs/TROUBLESHOOTING.md ) · [ Report issue] ( https://github.com/tonyHu08/CodeX_Bridge/issues )
15+
16+ ---
17+
518## English
619
7- Control your local Codex threads from Telegram in under 2 minutes.
20+ ### What is this?
821
9- Codex Bridge is built for the exact pain point many people hit today: Codex is powerful on desktop, but your work stalls the moment you step away from your machine. This project keeps your real Codex thread alive on your phone, with status, approvals, and results in one chat .
22+ Codex is great on desktop, but it is not remote-first: your work stalls the moment you step away from your machine.
1023
11- ![ App Icon ] ( ./apps/desktop/electron/assets/cab-brand-icon.png )
24+ ** Codex Bridge ** keeps your real Codex thread alive on your phone, with:
1225
13- ### Real screenshots
26+ - ✅ Thread-aware remote control (` /threads ` , ` /bind ` , ` /current ` )
27+ - 🔒 Safe remote execution (approvals: ` /approve ` / ` /deny ` )
28+ - 📊 Status + limits (` /status ` , ` /usage ` )
29+ - 🧰 Menu bar controls (online state + remote switch)
30+ - 🌏 Bilingual UX (English + Chinese)
1431
15- ![ Desktop app home] ( ./docs/assets/readme/desktop-home.png )
16- ![ Telegram remote control] ( ./docs/assets/readme/telegram-threads.png )
32+ ### Real screenshots
1733
18- ### Why people star this project
34+ | Desktop app home | Telegram remote control |
35+ | --- | --- |
36+ | ![ Desktop app home] ( ./docs/assets/readme/desktop-home.png ) | ![ Telegram remote control] ( ./docs/assets/readme/telegram-threads.png ) |
1937
20- - No CLI in the main path.
21- - Remote control is thread-aware (` /threads ` , ` /bind ` , ` /current ` ).
22- - Safe remote execution with approval commands (` /approve ` , ` /deny ` ).
23- - Menu bar quick controls for online state and remote switch.
24- - Built-in bilingual UX (English + Chinese).
38+ ### Features ✨
2539
26- ### Recent stability fixes
40+ - ** Remote chat with context** : keep using the same local Codex thread from Telegram.
41+ - ** Approvals** : when Codex wants to run commands or change files, you can approve/deny from Telegram.
42+ - ** Queue + cancel** : long runs can be cancelled with ` /cancel ` .
43+ - ** Usage** : check your remaining limits with ` /usage ` (alias: ` /limits ` ).
2744
28- - ` /threads ` is now resilient: if ` thread/list ` is slow/unavailable, it degrades to the Codex sidebar cache so Telegram still gets a fast reply.
29- - Reduced “stuck waiting” cases caused by Keychain prompts/hangs (best-effort Keychain access with short timeouts).
45+ Notes:
3046
31- ### What you can do
47+ - Photo input is ** experimental** and depends on your Codex App / App Server version.
48+ - Per-thread “busy status” is ** not** reliably observable from Codex today (we only know tasks started by this bridge).
3249
33- - Send text input from Telegram to the bound Codex thread.
34- - Send photos as image input (experimental; depends on your Codex App / App Server version).
35- - Watch execution state + final response in the same Telegram chat.
36- - Query Codex limits with ` /usage ` (alias: ` /limits ` ).
37- - Cancel long runs with ` /cancel ` .
38- - Run official hosted mode (recommended) or switch to self-hosted mode.
50+ ### 2-minute setup (local mode, recommended for open-source)
3951
40- ### 2-minute setup (official hosted path)
52+ 1 . Download the latest desktop build from [ Releases] ( https://github.com/tonyHu08/CodeX_Bridge/releases ) and open it.
53+ 2 . In the onboarding wizard:
54+ 1 . ** Environment check** (Codex CLI + App Server).
55+ 2 . ** Configure Telegram bot** (paste a BotFather token).
56+ 3 . ** Pair your phone** (QR / deep link).
57+ 3 . In Telegram:
58+ 1 . Send ` /threads `
59+ 2 . Tap a thread button (or ` /bind <index> ` )
60+ 4 . Send your first remote prompt.
4161
42- 1 . Download the latest desktop build from [ Releases] ( https://github.com/tonyHu08/CodeX_Bridge/releases ) .
43- 2 . Open the app and finish the 3-step onboarding:
44- 1 . Codex environment check.
45- 2 . Phone pairing (QR / deep link).
46- 3 . In Telegram, send ` /threads ` and bind one thread.
47- 3 . Send your first remote message directly in Telegram.
62+ ### Command cheat sheet 🧩
4863
49- No BotFather token is required in official hosted mode.
64+ | Command | What it does |
65+ | --- | --- |
66+ | ` /threads ` | List recent threads and bind quickly |
67+ | ` /bind latest ` | Bind the latest thread |
68+ | `/bind <index| threadId>` | Bind a specific thread |
69+ | ` /current ` | Show snapshot of the current bound thread |
70+ | ` /status ` | Show bridge status |
71+ | ` /usage ` / ` /limits ` | Show Codex rate limits remaining |
72+ | ` /cancel ` | Cancel the current task |
73+ | ` /unbind ` | Clear current binding |
5074
51- ### Command cheat sheet
75+ ### Recent stability fixes 🛠️
5276
53- - ` /threads ` list recent threads and bind quickly.
54- - ` /bind latest ` bind latest thread.
55- - ` /bind <index|threadId> ` bind target thread.
56- - ` /current ` show snapshot of current bound thread.
57- - ` /status ` show bridge status.
58- - ` /usage ` or ` /limits ` show Codex limits.
59- - ` /cancel ` stop running task.
60- - ` /unbind ` clear current binding.
77+ - ` /threads ` is now resilient: if ` thread/list ` is slow/unavailable, it degrades to the Codex sidebar cache so Telegram still gets a fast reply.
78+ - Reduced “stuck waiting” cases caused by Keychain prompts/hangs (best-effort Keychain access with short timeouts).
6179
6280### Visual flow
6381
@@ -75,24 +93,13 @@ flowchart LR
7593``` mermaid
7694flowchart TB
7795 U["Telegram user"] --> T["Telegram bot"]
78- T --> R["Bridge relay (hosted/ local)"]
96+ T --> R["Bridge relay (local on your Mac )"]
7997 R --> A["Desktop agent"]
8098 A --> C["Codex App Server JSON-RPC"]
8199 C --> TH["Selected Codex thread"]
82100 TH --> C --> A --> R --> T --> U
83101```
84102
85- ### Screenshots and media
86-
87- More screenshots:
88-
89- - ` docs/assets/readme/ `
90-
91- - [ Press kit] ( ./assets/press-kit/README.md )
92- - [ Launch playbook] ( ./docs/LAUNCH_PLAYBOOK.md )
93- - [ Launch posts (copy-ready)] ( ./docs/LAUNCH_POSTS.md )
94- - [ User stories] ( ./docs/USER_STORIES.md )
95-
96103### Docs
97104
98105- [ Commands] ( ./docs/COMMANDS.md )
@@ -110,65 +117,76 @@ More screenshots:
110117``` bash
111118npm install
112119npm run setup
113- npm run dev:relay
114- npm run build:desktop
115- npm run start:desktop
116- ```
117-
118- ``` bash
119- npm run typecheck
120120npm run build
121+ npm run start:desktop
121122```
122123
123124---
124125
125126## 中文
126127
127- 把本机 Codex 远程装进 Telegram,2 分钟内就能发出第一条远程指令。
128+ ### 这是什么?
128129
129- Codex Bridge 解决的是一个非常实际的问题:你离开电脑后,Codex 对话就中断。这个项目让你在手机上继续操作同一个 thread,保持上下文、审批和结果回包的一致性 。
130+ Codex 在桌面端很强,但它不是“随时随地继续工作”的工具:你一离开电脑, 对话就中断。
130131
131- ### 核心价值
132+ ** Codex Bridge ** 把你的本机 Codex thread 连接到 Telegram,让你在手机上继续推进同一条对话,上下文、审批和回包都保持一致:
132133
133- - 主路径不依赖命令行。
134- - 不是普通“消息转发”,而是 thread 级远程控制。
135- - 支持远程审批和状态追踪。
136- - 菜单栏可直接查看状态、开关远程。
137- - 桌面端和 Telegram 双语体验(中/英)。
134+ - ✅ thread 级远程控制( ` /threads ` 、 ` /bind ` 、 ` /current ` )
135+ - 🔒 远程审批( ` /approve ` / ` /deny ` )
136+ - 📊 状态与用量( ` /status ` 、 ` /usage ` )
137+ - 🧰 菜单栏快速开关(在线状态 + 远程开关)
138+ - 🌏 双语体验(中 / 英)
138139
139- ### 已支持能力
140+ ### 真机截图
140141
141- - Telegram 文本/图片输入转发到绑定 thread。
142- - ` /threads ` 查看并快速绑定会话。
143- - ` /usage ` / ` /limits ` 查看 Codex 用量。
144- - ` /cancel ` 终止长任务。
145- - 官方托管模式(推荐)与本地自托管模式可切换。
142+ | 电脑端主页 | Telegram 远程控制 |
143+ | --- | --- |
144+ | ![ Desktop app home] ( ./docs/assets/readme/desktop-home.png ) | ![ Telegram remote control] ( ./docs/assets/readme/telegram-threads.png ) |
146145
147- ### 快速开始(官方托管)
146+ ### 功能亮点 ✨
148147
149- 1 . 在 [ Releases ] ( https://github.com/tonyHu08/CodeX_Bridge/releases ) 下载并打开桌面 App 。
150- 2 . 按向导完成三步:
151- 1 . Codex 环境检测 。
152- 2 . 手机配对(扫码或 deep link) 。
153- 3 . Telegram 发送 ` /threads ` 并绑定线程。
154- 3 . 直接在 Telegram 发送消息开始远程操作。
148+ - ** 带上下文的远程续聊 ** :不是消息转发,是继续你本机的真实 thread 。
149+ - ** 审批 ** :需要执行命令/修改文件时,可在 Telegram 一键同意/拒绝。
150+ - ** 队列与终止 ** :长任务可以用 ` /cancel ` 主动停止 。
151+ - ** 用量 ** : ` /usage ` (别名 ` /limits ` )查看剩余额度 。
152+
153+ 说明:
155154
156- 说明:官方托管模式下,不需要手动去 BotFather 创建 Token。
155+ - 图片输入属于** 实验能力** ,是否可用取决于你的 Codex App / App Server 版本。
156+ - 每个 thread 的“是否正在运行”目前无法从 Codex 稳定获取(桥接只能知道自己触发的任务)。
157157
158- ### 常用命令
158+ ### 2 分钟上手(开源推荐:本机模式)
159159
160- - ` /threads ` :查看最近线程并快速绑定
161- - ` /bind latest ` :绑定最新线程
162- - ` /bind <编号|threadId> ` :绑定指定线程
163- - ` /current ` :查看当前线程快照
164- - ` /status ` :查看桥接状态
165- - ` /usage ` 或 ` /limits ` :查看用量
166- - ` /cancel ` :终止当前任务
167- - ` /unbind ` :解除当前绑定
160+ 1 . 在 [ Releases] ( https://github.com/tonyHu08/CodeX_Bridge/releases ) 下载并打开桌面 App。
161+ 2 . 按向导完成:
162+ 1 . ** 环境检测** (Codex CLI + App Server)
163+ 2 . ** 配置 Telegram 机器人** (粘贴 BotFather token)
164+ 3 . ** 手机配对** (扫码或 deep link)
165+ 3 . Telegram 里:
166+ 1 . 发送 ` /threads `
167+ 2 . 点选 thread(或 ` /bind <编号> ` )
168+ 4 . 开始发消息远程操作。
169+
170+ ### 常用命令 🧩
171+
172+ | 命令 | 作用 |
173+ | --- | --- |
174+ | ` /threads ` | 查看最近会话并快速绑定 |
175+ | ` /bind latest ` | 绑定最新会话 |
176+ | `/bind <编号| threadId>` | 绑定指定会话 |
177+ | ` /current ` | 查看当前会话快照 |
178+ | ` /status ` | 查看桥接状态 |
179+ | ` /usage ` / ` /limits ` | 查看剩余用量与重置时间 |
180+ | ` /cancel ` | 终止当前任务 |
181+ | ` /unbind ` | 解除绑定 |
182+
183+ ### 最近稳定性修复 🛠️
184+
185+ - ` /threads ` 更稳:` thread/list ` 超时会降级到 Codex 侧边栏缓存,确保 Telegram 仍能快速拿到列表。
186+ - 降低 Keychain 造成的“卡住/无回包”风险(Keychain 访问改为短超时 best-effort)。
168187
169188### 相关文档
170189
171- - [ 发布增长手册] ( ./docs/LAUNCH_PLAYBOOK.md )
172- - [ 首发文案模板(可直接复制)] ( ./docs/LAUNCH_POSTS.md )
173- - [ 用户故事脚本] ( ./docs/USER_STORIES.md )
174- - [ 媒体素材包] ( ./assets/press-kit/README.md )
190+ - [ 命令说明] ( ./docs/COMMANDS.md )
191+ - [ 故障排查] ( ./docs/TROUBLESHOOTING.md )
192+ - [ 隐私与边界] ( ./docs/PRIVACY.md )
0 commit comments