A real-time multi-AI collaboration CLI tool enabling Claude, Codex, Gemini, OpenCode, and Droid to work together via split-screen terminals with persistent context, unified command system, and minimized token overhead.
Claude Code Bridge (CCB) is a real-time multi-AI collaboration tool that enables multiple AI models to work together via split-screen terminals.
Core Features#
- π₯οΈ Visualized & Controllable: Multiple AI models run in split-screen CLI, all interactions visible and controllable
- π§ Persistent Context: Each AI maintains independent memory, supports
-rflag to close and resume sessions anytime - π Token Savings: Send lightweight prompts instead of complete file history
- πͺ Native Workflow: Direct integration with WezTerm (recommended) or tmux, no complex server needed
Supported AI Providers#
Claude, Codex, Gemini, OpenCode, Droid
Unified Command System#
| Command | Function |
|---|---|
ask <provider> <message> | Unified request command (default background mode) |
ccb-ping <provider> | Unified connectivity test |
pend <provider> [N] | Unified response retrieval |
Skills System#
/ask <provider> <message>- Request skill/cping <provider>- Connectivity test skill/pend <provider>- Response retrieval skill/all-plan- Multi-AI collaboration design and brainstorming
Email System Integration#
Remote interaction with AI providers via email:
- Supported: Gmail / Outlook / QQ Mail / 163 Mail / Custom IMAP/SMTP
- Use prefix in email body to specify provider (e.g.,
CLAUDE:,CODEX:,GEMINI:)
Architecture Design#
The project adopts Memory-First AI Agent Architecture:
- Memory = Kernel: Memory is the system core, not anιε± tool of models
- Models = CPU: Models are stateless execution units, plug-and-play
- Database = Motherboard: Database connects perception, memory, and execution
Three-Tier Storage Architecture#
| Tier | Data Type | Tech Stack |
|---|---|---|
| L1: Hot | Current sessions, temp variables | Redis / Memcached |
| L2: Warm | Task states and entity relations | SQLite / Postgres |
| L3: Cold | Historical logs, document chunks | Pgvector / Chroma / LanceDB |
Quick Start#
Prerequisites#
- Python 3.10+
- Terminal: WezTerm (strongly recommended) or tmux
Installation#
Linux / macOS / WSL:
git clone https://github.com/bfly123/claude_code_bridge.git
cd claude_code_bridge
./install.sh install
Windows Native: Use install.ps1 or install.cmd
Running Examples#
ccb # Start all providers from ccb.config
ccb codex gemini # Start specified providers
ccb -r codex gemini # Resume last session
ccb -a codex gemini opencode # Auto-approve mode
Configuration File#
Lookup order:
.ccb/ccb.config(project-level)~/.ccb/ccb.config(global-level)
Simple Format:
codex,gemini,opencode,claude
Advanced JSON Format:
{
"providers": ["codex", "gemini", "opencode", "claude"],
"cmd": { "enabled": true, "title": "CCB-Cmd", "start_cmd": "bash" },
"flags": { "auto": false, "resume": false }
}
CLI Command Flags#
| Flag | Description |
|---|---|
-r | Resume last session context |
-a | Auto mode, skip permission prompts |
-h | Show help information |
-v | Show version and check for updates |
Update & Uninstall#
ccb update # Update to latest version
ccb update 4 # Update to highest v4.x.x
ccb uninstall # Uninstall and clean config
ccb reinstall # Clean reinstall
Typical Use Cases#
| Scenario | Description |
|---|---|
| Code Review | Have Codex review changes in main.py |
| Second Opinion | Ask Gemini for alternative implementations |
| Pair Programming | Codex writes backend, developer handles frontend |
| Architecture Design | Multi-AI brainstorming and module design |
| Remote Interaction | Interact with AI remotely via email system |
Directory Structure#
claude_code_bridge/
βββ bin/ # Executable scripts
βββ lib/ # Core library code
βββ claude_skills/ # Claude skill definitions
βββ codex_skills/ # Codex skill definitions
βββ droid_skills/ # Droid skill definitions
βββ config/ # Configuration files
βββ docs/ # Documentation (including architecture docs)
βββ mcp/ccb-delegation # MCP integration
βββ test/ # Test code
Contact#
- π§ Email: bfly123@126.com
- π¬ WeChat: seemseam-com