Skip to main content
Anyware connects your local Claude Code session to the cloud for remote monitoring and control. Here’s how all the pieces fit together.

Architecture

The Anyware CLI runs on your machine and spawns Claude Code as a child process. It captures all Claude Code events via hooks and streams them over a WebSocket connection to the Anyware API, which handles authentication and session management. The API maintains session state and broadcasts events to connected Web Dashboard clients. When you send input from the dashboard, messages flow back through the same WebSocket path to the CLI. For LLM requests, Claude Code calls the Anyware Proxy instead of Anthropic directly. The proxy authenticates requests, routes them to OpenRouter for model access, and tracks token usage for billing.

Components

The command-line tool installed via npm. It:
  • Spawns Claude Code locally on your machine
  • Connects to the cloud via WebSocket
  • Captures all session events via hooks
  • Streams output to the cloud in real-time
  • Handles mode switching (local/remote)
The backend API layer. It handles:
  • User authentication
  • Session management
  • WebSocket connections
  • Real-time message routing
The model gateway:
  • Authenticates requests
  • Routes to OpenRouter for model access
  • Enables custom model support
  • Tracks token usage
The React web app at anyware.run:
  • Shows active sessions
  • Streams terminal output
  • Enables remote input and control
  • Handles permission responses

Mode Switching

The CLI tracks whether input comes from the terminal or web. When you send a prompt from the dashboard, the CLI switches to remote mode and forwards web input to Claude Code. Press Enter, Esc, or q in the terminal to reclaim control and switch back to local mode. See Local vs Remote Mode for details.

Security

AspectImplementation
AuthenticationOAuth, JWT tokens
TransportHTTPS for API, WSS for WebSocket
SessionsAuthenticated, user-scoped
LLM requestsToken-authenticated proxy