Skip to main content

Access Claude Code CLI from your mobile device over WiFi

Project description

Claude-on-the-go

CI Security License

Control your Mac's claude CLI 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.

Screenshot showing Claude-onTheGo mobile interface

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     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Backend (Python + FastAPI) spawns claude CLI
  2. Frontend (HTML + xterm.js) renders terminal
  3. WebSocket streams I/O between them
  4. mDNS lets you use .local domains (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 API
  • client/ - Modern web client + PWA
  • integrations/ - Notifications, Tailscale, QR codes
  • cli/ - 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"

  1. โœ… Make sure you're on the same WiFi network
  2. ๐Ÿ”— Try the direct IP URL instead of .local
  3. ๐Ÿ”ฅ Check firewall settings on your Mac

๐ŸŽจ "Terminal looks weird"

๐Ÿ” Your terminal config wasn't detected. To add support:

  1. ๐Ÿ“– Check docs/ADDING_TERMINALS.md
  2. ๐ŸŽฏ 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 practices
  • docs/ADDING_TERMINALS.md - How to add new terminal parsers
  • docs/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_on_the_go-1.0.0.tar.gz (192.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_on_the_go-1.0.0-py3-none-any.whl (135.7 kB view details)

Uploaded Python 3

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

Hashes for claude_on_the_go-1.0.0.tar.gz
Algorithm Hash digest
SHA256 358e5546ad644c5668b9b1aab5f96f27393f2c68c6ce51c412dfe1a320c301a1
MD5 7f1cb670d4563aca13afe6949be1023a
BLAKE2b-256 e30917888ab5f14644eec3c30173c3d72578295f4427ff997074a46bc1a3307d

See more details on using hashes here.

File details

Details for the file claude_on_the_go-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_on_the_go-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca5d81e4f2d9eb9db477da8906cbedb97afb5ee8996bf47f4fb744be1711336e
MD5 3a61522d326b3becaf895fae4618271a
BLAKE2b-256 3cb17f15add197acc2e19b0ffdd0739f7fdbac084fd931ac52fd49c7f038be2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page