The command-line client for Anyware — control Claude Code from anywhere, on any device.
Anyware CLI runs Claude Code locally on your machine while streaming the session to the cloud. Continue working from your phone, laptop, or any browser. Get notified when Claude needs your input.
npm install -g @diggerhq/anywareRequires Node.js >= 20.0.0
# Login (opens browser for authentication)
anyware login
# Start a session in your project directory
cd /path/to/your/project
anywareThat's it. Your session is now live at anyware.run.
┌─────────────────────────────────────────────────────────────────────────┐
│ Your Machine │
│ ┌──────────────────────────────────────────────────────────────────┐ │
│ │ anyware CLI │ │
│ │ ┌────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │
│ │ │ Loop │◄──►│ Session │◄──►│ WebSocket Client │───┼──┼──► anyware.run
│ │ │ local/ │ │ manager │ │ (real-time sync) │ │ │
│ │ │ remote │ └─────────────┘ └─────────────────────┘ │ │
│ │ └─────┬──────┘ │ │
│ │ │ │ │
│ │ ▼ │ │
│ │ ┌────────────┐ ┌─────────────┐ │ │
│ │ │ Claude │───►│ LLM Proxy │─────────────────────────────┼──┼──► OpenRouter
│ │ │ Code │ │ (model │ │ │
│ │ │ (spawned) │ │ routing) │ │ │
│ │ └────────────┘ └─────────────┘ │ │
│ └──────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
The CLI operates in two modes that switch automatically:
- Local mode: You type directly in the terminal. Claude responds locally, and output streams to the web dashboard.
- Remote mode: Commands come from the web dashboard via WebSocket. Output appears both in your terminal and the web UI.
Mode switching happens seamlessly:
- Local → Remote: When you send a message from the web dashboard
- Remote → Local: When you press Enter in the terminal to take back control
Start a Claude Code session in the current directory.
anyware # Start session
anyware --model openai/gpt-4o # Use a specific model via OpenRouter
anyware --continue # Continue the last conversation
anyware --resume <sessionId> # Resume a specific Claude session
anyware --remote # Start in remote mode
anyware --path /other/dir # Use a different working directoryAuthenticate with anyware.run. Opens your browser to complete the OAuth flow.
anyware loginClear local credentials.
anyware logoutShow current login status and configuration.
anyware statusView or set configuration options.
anyware config # Show current config
anyware config --api-url <url> # Set custom API URL
anyware config --llm-url <url> # Set custom LLM proxy URLUpdate to the latest version.
anyware updatePrint version information and check for updates.
anyware versionSet up claude as an alias for anyware in your shell.
anyware aliasShow valid Claude Code arguments that can be passed through.
anyware claude-argsUse any model available on OpenRouter:
anyware --model openai/gpt-4o
anyware --model google/gemini-2.0-flash-001
anyware --model anthropic/claude-sonnet-4Or set a default model via environment variable:
export ANYWARE_MODEL=openai/gpt-4o
anywareConfiguration is stored in ~/.anyware/config.json.
| Variable | Description |
|---|---|
ANYWARE_API_URL |
Override the API URL (default: https://anyware.run) |
ANYWARE_LLM_URL |
Override the LLM proxy URL (default: https://llm.anyware.run) |
ANYWARE_MODEL |
Default model to use via OpenRouter |
- Go to anyware.run
- Login with the same account
- See active sessions, click to view live terminal
- Type to send prompts, approve tool permissions
Get SMS or WhatsApp alerts when Claude needs input and you're away from your terminal. Configure at anyware.run/settings/notifications.
- Node.js >= 20.0.0
- npm
# Clone the repository
git clone https://github.com/diggerhq/anyware-cli.git
cd anyware-cli
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev| Command | Description |
|---|---|
npm run build |
Compile TypeScript to dist/ |
npm run dev |
Run from source with tsx |
npm run start |
Run compiled output |
npm run typecheck |
Type-check without emitting |
src/
├── main.ts # CLI entry point (commander setup)
├── api/ # Server communication
│ ├── auth.ts # OAuth login flow
│ ├── session.ts # Session creation/management
│ └── wsClient.ts # WebSocket client
├── claude/ # Claude Code integration
│ ├── loop.ts # Local/remote mode switching
│ ├── session.ts # Session state management
│ ├── claudeLocal*.ts # Local mode (terminal UI)
│ ├── claudeRemote*.ts # Remote mode (SDK-based)
│ └── sdk/ # Claude SDK wrapper
├── config/ # Configuration management
├── hooks/ # Session hooks
├── ui/ # Terminal UI components
├── update/ # Self-update functionality
└── utils/ # Utilities (message queue, etc.)
See the main Anyware repository for self-hosting documentation.
MIT