CLI Commands
ClawRouter includes a built-in command-line interface (CLI) to manage the proxy as a background service. Run these commands from any terminal after installation.
Version 1.0.18
Commands
install
clawrouter installInstalls ClawRouter as a background system service and starts it. After installation, opens the dashboard in your default browser.
start
clawrouter startStarts the ClawRouter service. If the server hasn't been built yet, it will build automatically before starting.
stop
clawrouter stopStops the currently running ClawRouter service gracefully.
restart
clawrouter restartRestarts the ClawRouter service. Use this after updating ClawRouter or changing environment variables.
status
clawrouter statusShows the current status of the ClawRouter service -- whether it's running, the process ID (PID), port, and uptime.
logs
clawrouter logsFollows the live service logs in your terminal. Press Ctrl + C to exit.
- Use this to monitor incoming requests, verify key rotation, trace fallback events, and troubleshoot API errors (like
429or502responses).
uninstall
clawrouter uninstallRemoves the ClawRouter background service from your system. Your database and configuration files are preserved.
version
clawrouter --versionDisplays the currently installed ClawRouter version.
help
clawrouter helpDisplays the full help message with all available commands and options.
Options
| Option | Description |
|---|---|
--port <port> | Override the server port (default: 3030) |
--no-open | Don't open the browser automatically after install |
--version, -v | Show the current ClawRouter version |
--help, -h | Show the help message |
Service Backends
ClawRouter auto-detects the best service manager for your platform:
| Platform | Backend |
|---|---|
| Linux | systemd (systemctl --user) |
| macOS | launchd (~/Library/LaunchAgents) |
| Windows | node-windows (Windows Service) |
If the native service manager isn't available, ClawRouter falls back to a built-in process manager.
Tip: Run
clawrouter logsregularly to ensure your Provider Fallback Chain, Model Fallback, Smart Key Rotation, and Circuit Breaker are all working as expected.