How lee-xeo/claude-cage works
Claude Cage is a desktop workbench for running Claude Code in an isolated macOS, Windows, or Linux guest, with managed networking and optional remote/mobile access. The main workflow is to configure a proxy, prepare and start a guest, share a project, then use its terminal, browser, and editor. The graph preserves README capabilities and the sampled storage recovery and Windows update paths; other subsystem links are included only where the README documents them, since most implementation files were not sampled.
Main entry points: main.go Cage CLI · MainWindow.cs Windows App · AppUpdater.cs App Updates · core.go Proxy Management
Components 26
Desktop Workbench
- Desktop App
desktop/Cage.swift - Windows App
desktop/windows/MainWindow.cs - App Backend
desktop/windows/Backend.cs - App Updates
desktop/windows/AppUpdater.cs - Update Installer
desktop/windows/UpdateInstaller.cs - Workbench UI
ui/src/main.jsx - UI API
ui/src/api.js
Guest Environment
- Cage CLI
cmd/cage/main.go - Environment Commands
internal/cli/app.go - Guest Lifecycle
internal/guestos/installation.go - Virtual Machines
internal/vm/vm.go - Environment Storage
internal/cage/storage.go - Storage Recovery
internal/workbench/storage.go
Network Safety
- Proxy Management
internal/managedproxy/core.go - Network Gate
internal/cage/gate.go - Safety Checks
internal/workbench/safety.go
Work Sessions
- Project Sharing
internal/workbench/projects.go - Terminal Sessions
internal/workbench/terminal_service.go - Cage Browser
internal/workbench/browser_service.go - Claude Accounts
internal/workbench/claude_accounts.go
Remote Access
- Mobile Sessions
ui/src/mobile-cli/main.jsx - Mobile Link
internal/mobilelink/link.go - Remote Hosts
internal/remotehost/manager.go - Relay Service
internal/relay/server.go
Other components
- User
- Phone User
Connections 26
- User → Desktop App: opens
- Desktop App → Windows App: Windows client
- Windows App → App Backend: starts processes
desktop/windows/Backend.cs - Windows App → App Updates: manages
desktop/windows/MainWindow.cs - App Updates → App Backend: runs update command
desktop/windows/AppUpdater.cs - App Updates → Update Installer: installs
desktop/windows/AppUpdater.cs - User → Workbench UI: configures work
- Workbench UI → UI API: sends requests
ui/src/api.js - UI API → Cage CLI: calls local backend
- Cage CLI → Environment Commands: dispatches commands
cmd/cage/main.go - Cage CLI → Guest Lifecycle: prepares guest
- Cage CLI → Proxy Management: checks managed proxy
cmd/cage/main.go - Guest Lifecycle → Virtual Machines: runs guest
- Cage CLI → Storage Recovery: serves workbench
- Storage Recovery → Environment Storage: reads and recovers
internal/workbench/storage.go - User → Proxy Management: configures proxy
- Proxy Management → Network Gate: provides egress
- Safety Checks → Network Gate: approves access
- User → Project Sharing: opens project
- User → Terminal Sessions: runs Claude Code
- User → Cage Browser: uses browser
- User → Claude Accounts: manages accounts
- Phone User → Mobile Sessions: continues session
- Mobile Sessions → Mobile Link: connects device
- User → Remote Hosts: connects server
- Mobile Link → Relay Service: uses relay