# client-codex-bridge **Repository Path**: xia5523/client-codex-bridge ## Basic Information - **Project Name**: client-codex-bridge - **Description**: codex与钉钉交互管理工具 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-25 - **Last Updated**: 2026-06-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # client-codex-bridge Minimal bridge service for: - Receive DingTalk bot callback messages - Parse `/codex ` commands - Run local `codex` CLI - Reply output back to DingTalk chat ## 1. Setup ```bash cd /home/xiaren/Documents/third-soft/client-codex-bridge cp .env.example .env ``` Fill `.env`: ```env PORT=8787 DINGTALK_CLIENT_ID=ding... DINGTALK_CLIENT_SECRET=... DINGTALK_STREAM_ENABLED=true CODEX_BIN=codex CODEX_HOME= TASK_TIMEOUT_MS=1200000 ``` ## 2. Run ```bash npm run dev ``` Health check: ```bash curl -s http://127.0.0.1:8787/health ``` ## 3. DingTalk Stream Mode Recommended for local development. It does not require a public callback URL. In DingTalk Developer Console: - Add `机器人` capability - Set message receiving mode to `Stream 模式` - Publish the app version - Add the app robot to a group Keep this service running: ```bash npm run start ``` ## 4. DingTalk Callback URL HTTP webhook mode is also supported if you have a stable public URL. Configure your bot callback endpoint: - `POST /webhook/dingtalk` - Full URL example: `https://your-domain/webhook/dingtalk` The handler expects DingTalk callback payloads with: - `msgtype: "text"` - `text.content` - `sessionWebhook` (used for async reply) ## 5. Command Format Send a text message: ```text /codex fix compile error in src/server.ts ``` The service will run: ```bash codex exec "" ``` and send execution result back to the same DingTalk chat. ## 6. Notes - This MVP runs Codex in the current project directory. - Add repo/path allowlist before production use. - Add request signature verification for stronger security.