Access Claude Code CLI from your mobile device over WiFi
Project description
Claude-on-the-go
Control your Mac's
claudeCLI from your phone. Because sometimes you just want to code from the couch.
Use Claude on your iPhone, Android, or any device with a browser - while your Mac does the heavy lifting. No cloud sync, no data leaks, just your local network keeping things fast and private.
๐ Latest Improvements (v1.1)
Three major features just landed to make your mobile Claude experience even better:
๐ฒ Progressive Web App (PWA)
- Install directly to your home screen like a native app
- Works offline with intelligent caching
- Full-screen experience without browser chrome
- See docs/PWA_IMPLEMENTATION.md for details
๐ Push Notifications
- Get notified when Claude needs your input
- Support for Pushover, ntfy.sh, and Telegram
- Smart detection with 30-second debouncing
- See docs/PUSH_NOTIFICATIONS.md for setup
๐ฆ Easy Installation
- Now available via pip:
pip install claude-on-the-go - Complete CLI with commands: start, stop, status, logs, qr
- Professional packaging with all dependencies included
- See docs/INSTALLATION.md for all install options
๐ฑ What Is This?
claude-on-the-go lets you use the Claude Code CLI from your mobile device. Your Mac runs the claude process, and your phone displays the terminal over WiFi.
Perfect for:
- ๐๏ธ Coding from bed without lugging your laptop
- โก Quick fixes while away from your desk
- ๐ Showing off Claude to friends on your phone
- ๐จ Actually using that sweet terminal theme you spent hours configuring๐
๐ Quick Start
โ๏ธ One-Command Installation
git clone https://github.com/MatthewJamisonJS/claude-on-the-go.git
cd claude-on-the-go
./install.sh
The installer will:
- โ Check for Python 3 and Claude CLI
- ๐ฆ Create a virtual environment
- ๐ Install dependencies
- ๐ Run security checks
- โ๏ธ Create configuration file
๐ฌ Launch
./start.sh
๐ฒ You'll see a beautiful QR code - scan it with your phone's camera and you're connected!
๐ Requirements
๐ฅ๏ธ Mac/Linux:
- ๐ Python 3.8+
- ๐ค Claude Code CLI installed
- ๐ก Same WiFi network for Mac and phone
๐ฑ Mobile Device:
- ๐ Any modern browser (Safari, Chrome, Firefox, etc.)
- ๐ก Same WiFi network as your Mac
โจ Features
๐ Security First
- ๐ฆ Rate limiting to prevent DoS attacks (10 msg/sec, 100KB/sec)
- โ Input validation and sanitization
- ๐ก๏ธ Content Security Policy (CSP) headers
- ๐ Log redaction for sensitive data
- ๐ซ Optional token authentication
- ๐ซ No hardcoded IPs or ports
๐พ Session Persistence
- ๐ Sessions survive disconnections and reconnect seamlessly
- ๐ UUID-based session IDs with 1-hour timeout
- ๐งน Automatic session cleanup
- โฎ๏ธ Resume coding exactly where you left off
๐ Bidirectional Clipboard Sync
- ๐ฅ๏ธโ๐ฑ Copy on Mac โ automatically syncs to phone
- ๐ฑโ๐ฅ๏ธ Copy on phone โ automatically syncs to Mac
- โก Configurable sync interval (default 1 second)
- ๐ Content hashing prevents sync loops
- โ๏ธ Can be disabled via config
๐ฅ๏ธ Universal Terminal Support
Fully implemented parsers:
- โ Ghostty - Complete theme and font parsing
- โ iTerm2 - Binary plist with RGB color extraction
- โ Alacritty - YAML config with multiple file support
- โ Kitty - Key-value config with include directives
- โ Terminal.app - NSColor/NSFont parsing (best-effort)
Partial support (default theme fallback):
- โณ Warp
- โณ Hyper
- โณ Windows Terminal
๐จ Can't find your terminal? Uses a clean default theme.
๐ฑ Mobile Optimized
- ๐ Responsive terminal sizing
- ๐ฒ iOS safe area support (handles notch/home indicator)
- ๐ Smooth scrolling with momentum
- โจ๏ธ Keyboard-aware layout
- ๐ Works on ANY phone browser
- ๐ Real-time clipboard sync with your Mac
๐ญ Production Ready
- โฑ๏ธ 60-minute stability testing with live metrics
- ๐ Memory leak detection and monitoring
- ๐ CPU and latency tracking
- ๐จ Error rate monitoring
- ๐ Stability scoring (90+/100 passing criteria)
How It Works
โโโโโโโโโโโโโโโโโโโ WiFi โโโโโโโโโโโโโโโโโโโ
โ Your iPhone โโโโโโโโโโโโโโโโโโโโโโโโโ Your Mac โ
โ โ โ โ
โ [Safari/Chrome]โ WebSocket (8000) โ Claude Process โ
โ Frontend (8001)โโโโโโโโโโโโโโโโโโโโโโโโโ Backend (8000) โ
โ โ โ โ
โ xterm.js โ โ pexpect + PTY โ
โ renders โ โ controls โ
โ terminal โ โ claude CLI โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Backend (Python + FastAPI) spawns
claudeCLI - Frontend (HTML + xterm.js) renders terminal
- WebSocket streams I/O between them
- mDNS lets you use
.localdomains (no IP addresses!)
Project Structure
legacy/- v1.0 architecture (frozen, maintained for compatibility)core/- Business logic (PTY manager, session store, config)server/- FastAPI WebSocket + REST APIclient/- Modern web client + PWAintegrations/- Notifications, Tailscale, QR codescli/- Command-line interface
See ARCHITECTURE.md for detailed documentation.
Configuration
Edit .env to customize (all optional):
# Security
ENABLE_AUTH=true # Require token authentication
AUTH_TOKEN=your-secret-token # Set your auth token
# Network
BACKEND_PORT=8000 # Backend WebSocket port
FRONTEND_PORT=8001 # Frontend HTTP port
# Rate Limiting
RATE_LIMIT_MESSAGES=10 # Max messages per second
RATE_LIMIT_BYTES=100000 # Max bytes per second
# Logging
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
LOG_REDACTION=true # Redact IPs/tokens from logs
# Features
ENABLE_CLIPBOARD_SYNC=true # Enable clipboard synchronization
CLIPBOARD_SYNC_INTERVAL=1.0 # Clipboard check interval (seconds)
๐ง Troubleshooting
โ "Claude CLI not found"
๐ฅ Install it from https://claude.ai/download
๐ซ "Can't connect from phone"
- โ Make sure you're on the same WiFi network
- ๐ Try the direct IP URL instead of
.local - ๐ฅ Check firewall settings on your Mac
๐จ "Terminal looks weird"
๐ Your terminal config wasn't detected. To add support:
- ๐ Check
docs/ADDING_TERMINALS.md - ๐ฏ Or just use the default theme (it's pretty good!)
โ ๏ธ "Connection keeps dropping"
๐ Check backend.log and frontend.log for errors:
tail -f backend.log
tail -f frontend.log
Documentation
docs/SECURITY.md- Security policy and best practicesdocs/ADDING_TERMINALS.md- How to add new terminal parsersdocs/LESSONS_LEARNED.md- Technical deep dive
Architecture Highlights
Backend:
- FastAPI with native WebSockets
- Pexpect for PTY control
- Watermark flow control (pause at 100KB, resume at 10KB)
- Message batching (30ms window)
- Single-user mode (auto-closes old connections)
- Session persistence with UUID-based IDs
- Clipboard monitoring with change detection (pbcopy/pbpaste)
Frontend:
- Xterm.js 5.3+
- DOM renderer on mobile (better ANSI support)
- Canvas renderer on desktop (better performance)
- Exponential backoff reconnection (1sโ30s with jitter)
- Auto-reconnects to existing sessions
Security:
- Token bucket rate limiting (10 msg/sec, 100KB/sec)
- Input size limits (10KB per message)
- Terminal size validation (1-500 rows/cols)
- CSP, X-Frame-Options, X-XSS-Protection headers
- Constant-time auth token comparison
- Log redaction for IPs, tokens, emails
Terminal Parsers:
- Ghostty: Key-value config parsing
- iTerm2: Binary plist with RGB float conversion
- Alacritty: YAML config with multi-file support
- Kitty: Key-value with include directives
- Terminal.app: NSColor/NSFont heuristic parsing
Contributing
PRs welcome! Especially for:
- New terminal parsers (see
docs/ADDING_TERMINALS.md) - Bug fixes
- Documentation improvements
- Performance optimizations
Please read SECURITY.md before contributing.
License
MIT License - see LICENSE file
Built for vibecoders who want Claude in their pocket.
Acknowledgments
Questions or Issues?
Found a bug or have a question? Open an issue: https://github.com/MatthewJamisonJS/claude-on-the-go/issues
Security concern? Report privately: https://github.com/MatthewJamisonJS/claude-on-the-go/security/advisories/new (This creates a private report that only maintainers can see)
Want to add a terminal parser?
Check out: docs/ADDING_TERMINALS.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_on_the_go-1.0.0.tar.gz.
File metadata
- Download URL: claude_on_the_go-1.0.0.tar.gz
- Upload date:
- Size: 192.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
358e5546ad644c5668b9b1aab5f96f27393f2c68c6ce51c412dfe1a320c301a1
|
|
| MD5 |
7f1cb670d4563aca13afe6949be1023a
|
|
| BLAKE2b-256 |
e30917888ab5f14644eec3c30173c3d72578295f4427ff997074a46bc1a3307d
|
File details
Details for the file claude_on_the_go-1.0.0-py3-none-any.whl.
File metadata
- Download URL: claude_on_the_go-1.0.0-py3-none-any.whl
- Upload date:
- Size: 135.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca5d81e4f2d9eb9db477da8906cbedb97afb5ee8996bf47f4fb744be1711336e
|
|
| MD5 |
3a61522d326b3becaf895fae4618271a
|
|
| BLAKE2b-256 |
3cb17f15add197acc2e19b0ffdd0739f7fdbac084fd931ac52fd49c7f038be2a
|