Bridge service to connect Coder1 IDE with local Claude CLI
npm install coder1-bridgeConnect your local Claude CLI to the Coder1 IDE running in the cloud. This bridge enables you to use Claude Code commands from your browser-based IDE by routing them through your local machine.
#### Option 1: NPM Global Install (Recommended)
``bash`
npm install -g coder1-bridge
#### Option 2: NPX (No Installation)
`bash`
npx coder1-bridge start
#### Option 3: Pre-built Binaries
Download the appropriate binary for your platform:
| Platform | Binary | Notes |
|----------|--------|-------|
| macOS Apple Silicon (M1/M2/M3) | coder1-bridge-macos-arm64 | For newer Macs |coder1-bridge-macos-x64
| macOS Intel | | For older Macs |coder1-bridge-linux
| Linux x64 | | Most Linux distros |coder1-bridge-win.exe
| Windows x64 | | Windows 10/11 |
After downloading:
`bashmacOS/Linux: Make executable
chmod +x coder1-bridge-*
#### Option 4: Direct from Source
`bash
git clone https://github.com/MichaelrKraft/coder1-ide.git
cd coder1-ide/coder1-ide-next/bridge-cli
npm install
npm start
`$3
1. Open Coder1 IDE in your browser:
- Production: https://coder1.ai
- Local: http://localhost:3001
2. Generate a Pairing Code in the IDE:
- Click the "Connect Bridge" button in the terminal
- Or use the status bar bridge indicator
- A 6-digit code will be displayed
3. Start the Bridge on your local machine:
`bash
coder1-bridge start
`4. Enter the Pairing Code when prompted:
`
Enter the 6-digit pairing code from the IDE: 123456
`5. Success! You'll see:
`
β
Bridge connected successfully!
`6. Use Claude in the IDE terminal:
`bash
claude analyze
claude fix "error message"
claude explain function.js
`π Prerequisites
- Node.js 18.0.0 or higher
- Claude CLI installed from https://claude.ai/download
- Coder1 IDE account (for cloud version)
π οΈ Commands
$3
Start the bridge service and connect to Coder1 IDE.Options:
-
-s, --server - Server URL (default: https://coder1.ai)
- -d, --dev - Development mode (connects to localhost:3001)
- -v, --verbose - Enable verbose logging
- --no-banner - Skip banner displayExamples:
`bash
Connect to production
coder1-bridge startConnect to local development
coder1-bridge start --devConnect to custom server
coder1-bridge start --server https://my-coder1.comVerbose mode for debugging
coder1-bridge start --verbose
`$3
Check if the bridge service is available on the server.`bash
coder1-bridge status
Output: β
Bridge service is online
`$3
Test your local Claude CLI installation.`bash
coder1-bridge test
Output: β
Claude CLI is installed and working
`π§ Configuration
$3
Create a .env file in your project directory:`env
Server configuration
CODER1_SERVER=https://coder1.aiBridge settings
BRIDGE_VERBOSE=true
BRIDGE_AUTO_RECONNECT=true
BRIDGE_MAX_RECONNECT_ATTEMPTS=10Security (optional)
BRIDGE_JWT_SECRET=your-secret-key
`$3
The bridge runs in your current directory by default. Claude commands will execute in this context:`bash
cd ~/my-project
coder1-bridge start
Claude commands will run in ~/my-project
`π Security
$3
1. Pairing Code: One-time 6-digit code expires after 5 minutes
2. JWT Token: Secure token for authenticated WebSocket connection
3. TLS/WSS: All connections encrypted
4. Command Sanitization: Dangerous commands are blocked
5. Path Validation: Prevents directory traversal attacks$3
- β
Files in your current working directory
- β
Claude CLI on your machine
- β
Git repositories you have access to
- β Cannot access system files without permission
- β Cannot run arbitrary shell commandsπ Troubleshooting
$3
Check Claude CLI:
`bash
coder1-bridge test
`Check Server Status:
`bash
coder1-bridge status
`Try Verbose Mode:
`bash
coder1-bridge start --verbose
`$3
1. Install Claude Code from https://claude.ai/download
2. Restart your terminal
3. Verify installation:
`bash
which claude
claude --version
`$3
- Codes expire after 5 minutes
- Generate a new code in the IDE
- Ensure you're connecting to the correct server
$3
The bridge auto-reconnects by default. If it doesn't:
1. Check your internet connection
2. Restart the bridge
3. Generate a new pairing code
ποΈ Architecture
`
Your Machine Cloud/Server
βββββββββββββββ ββββββββββββββββ
β Claude CLI ββββββ β Coder1 IDE β
βββββββββββββββ β ββββββββββββββββ€
β β Terminal β
βββββββββββββββ β WSS β Editor β
βCoder1 BridgeββββββΌβββββββββββΊβ Preview β
βββββββββββββββ β ββββββββββββββββ
β β²
βββββββββββββββ β β
βLocal Files ββββββ β
βββββββββββββββ Browser
`π Performance
- Latency: < 100ms command routing overhead
- Throughput: Streams output in real-time
- Concurrent Commands: Up to 5 simultaneous
- File Operations: < 500ms for files under 1MB
- Auto-reconnect: Within 1-30 seconds
π€ Contributing
$3
`bash
git clone https://github.com/MichaelrKraft/coder1-ide.git
cd coder1-ide/coder1-ide-next/bridge-cli
npm install
npm link # Makes 'coder1-bridge' available globally
`$3
`bash
npm test
`$3
`bash
Connect to local IDE server
node src/index.js start --dev --verbose
`π API Reference
$3
Client β Server:
-
heartbeat - Keep-alive signal
- claude:output - Stream command output
- claude:complete - Command finished
- file:response - File operation resultServer β Client:
-
claude:execute - Execute command request
- file:request - File operation request
- config:update - Configuration change
- connection:accepted - Pairing successful$3
- 1001 - Invalid pairing code
- 1002 - Token expired
- 1003 - Unauthorized
- 2001 - Command timeout
- 2003 - Claude not found
- 3001 - File not found
- 3002` - Permission deniedMIT License - See LICENSE file for details
- Issues: https://github.com/MichaelrKraft/coder1-ide/issues
- Discord: https://discord.gg/coder1
- Email: support@coder1.dev
---
Built with β€οΈ for the Coder1 community