CLI Reference
Commands and flags for the anywhere-ai CLI.
Installation
npx anywhere-aiOn first run, the CLI installs and authenticates Claude Code and GitHub CLI automatically. On subsequent runs it starts the server immediately.
Commands
npx anywhere-ai (default)
Starts the API server. If already running, shows the current status.
- Starts on port 3847
- Creates a Cloudflare tunnel (if
cloudflaredis available) - Prints QR code and connection details
- Runs as a background daemon (survives terminal close)
- Auto-restarts on crash (max 5 restarts in 60 seconds)
npx anywhere-ai status
Shows current server status: URL, token, uptime, and PID.
npx anywhere-ai stop
Stops the background server.
npx anywhere-ai logs
Tails the server log file.
npx anywhere-ai regenerate-token
Generates a new auth token. Reconnect the app after running this.
Flags
| Flag | Description |
|---|---|
--foreground | Run in foreground instead of as a daemon |
--no-tunnel | Skip Cloudflare tunnel, only accessible via direct IP |
--version, -v | Print version |
--help, -h | Show help |
Port
Default port is 3847. Override with:
PORT=8080 npx anywhere-ai