@hmduc16031996/claude-mb-bridge
v2.5.6
Published
Bridge between Claude Code CLI and your mobile app via WebView
Maintainers
Readme
Claude Mobile Bridge 🤖📱
A lightweight bridge between the Claude Code CLI and your mobile app via a secure Cloudflare Tunnel. This tool allows you to interact with your local development environment directly from your mobile device using the Claude Code CLI.
✨ Features
- Secure Tunneling: Uses Cloudflare Tunnel (
cloudflared) to expose your local terminal securely. - Terminal Integration: Full terminal emulation using
node-ptyandxterm.js. - Session Management: Pairing via tokens and a central coordination server.
- Cross-Platform: Works on macOS, Linux, and Windows.
📋 Prerequisites
- Node.js: Version 18.0.0 or higher.
- Claude Code CLI: Installed and authenticated (
npm install -g @anthropic-ai/claude-code). - Cloudflared: The Cloudflare Tunnel CLI must be installed and in your PATH.
brew install cloudflared(macOS)- Download for other platforms
🚀 Installation & Usage
Install the package globally:
npm install -g @hmduc16031996/claude-mb-bridgeOr run it directly using npx:
npx @hmduc16031996/claude-mb-bridge --token YOUR_PAIRING_TOKENOptions
| Option | Description | Default |
| :--- | :--- | :--- |
| --token | Required. Pairing token from your mobile app. | |
| --server | URL of the central coordination server. | http://127.0.0.1:3000 |
| --path | Working directory for the terminal session. | process.cwd() |
| --port | Local port for the terminal server. | 38473 |
🏗️ How it Works
- Start the Bridge: Run the CLI with your pairing token.
- Local Server: The bridge starts a local HTTP/WebSocket server that hosts a terminal interface.
- Cloudflare Tunnel: It automatically creates a temporary
.trycloudflare.comtunnel pointing to your local server. - Connect: The bridge reports the tunnel URL to the central server, which then allows your mobile app to connect to the terminal via the secure URL.
- Interactive Session: Use Claude Code directly in your mobile app as if you were in your local terminal.
📄 License
MIT © hmduc16031996
