@quochuydev/ccx
v1.0.1
Published
Claude Code bridge server with HTTP API, Telegram, and Discord integrations
Readme
ccx
Claude Code bridge server with HTTP API, Telegram, and Discord integrations.
Quick Start
# Run directly
npx @quochuydev/ccx
# Or install globally
npm i -g @quochuydev/ccx
ccxFrom source
npm run setup
# Edit .env
claude auth login
npm startEnvironment Variables
| Variable | Required | Description |
| -------------------- | -------- | ---------------------------------------------------- |
| PROJECT_DIR | No | Project directory for Claude (default: .) |
| PORT | No | Server port (default: 3111) |
| TELEGRAM_BOT_TOKEN | No | Telegram bot token from @BotFather |
| TELEGRAM_CHAT_ID | No | Telegram chat ID for broadcast notifications |
| DISCORD_BOT_TOKEN | No | Discord bot token (not yet implemented) |
| DISCORD_CHAT_ID | No | Discord channel ID for broadcast notifications |
| CRON_TARGETS | No | Comma-separated folder paths to scan for suggestions |
| CRON_INTERVAL | No | Cron interval in minutes (default: 5) |
API
Chat
# Non-streaming
curl -X POST http://localhost:3111/chat \
-H "Content-Type: application/json" \
-d '{"prompt": "what files are in this project?"}'
# Streaming (SSE)
curl -X POST http://localhost:3111/chat/stream \
-H "Content-Type: application/json" \
-d '{"prompt": "what files are in this project?"}'
# Session (maintains conversation)
curl -X POST http://localhost:3111/chat/session \
-H "Content-Type: application/json" \
-d '{"prompt": "what files are in this project?", "channel": "my-channel"}'Prompts
# Get all saved prompts
curl http://localhost:3111/prompts
# Generate a new suggestion (broadcasts to chat services)
curl -X POST http://localhost:3111/prompts/generate \
-H "Content-Type: application/json" \
-d '{"folder": "/path/to/project"}'Other
# Health check
curl http://localhost:3111/health
# List active sessions
curl http://localhost:3111/sessionsTelegram Bot Commands
| Command | Description |
| ----------- | ------------------------------------------------------ |
| /start | Show welcome message |
| /chatid | Show current chat ID (use this for TELEGRAM_CHAT_ID) |
| Any message | Send to Claude and get a response |
