Skip to main content

CLI Overview

The routerly CLI lets you manage all aspects of a Routerly instance from the terminal — models, projects, users, usage reports, and service configuration. It communicates with the running Routerly service via its management API.


Installation

The CLI is installed automatically by the Routerly installer. Verify it is available:

routerly --version

Authentication

The CLI needs credentials to connect to a Routerly service. Authenticate with:

routerly auth login --url http://localhost:3000 --email admin@example.com

You will be prompted for your password. On success, a JWT session token is saved in ~/.routerly/cli/auth.json.

Multiple Accounts

You can manage multiple Routerly instances with named aliases:

routerly auth login \
--url https://routerly.example.com \
--email admin@example.com \
--alias production

routerly auth login \
--url http://localhost:3000 \
--email dev@example.com \
--alias local

Switch between accounts with:

routerly auth switch --alias production

Rename an alias:

routerly auth rename --alias local --new-alias dev

List all saved accounts:

routerly auth list

Log out:

routerly auth logout              # logs out the active account
routerly auth logout --alias production # logs out a specific account

Current Service Status

routerly status

Prints: service URL, version, uptime, and whether the service is reachable. Add --json for machine-readable output.


Global Options

OptionDescription
--alias <name>Use a specific saved account instead of the active one
--url <url>Connect to this service URL (overrides the saved account)
--jsonOutput as JSON (available on most commands)
--helpShow help
--versionPrint CLI version

Command Groups

GroupDescription
routerly authAuthentication and account management
routerly modelRegister and manage LLM models
routerly projectCreate and manage projects
routerly userManage dashboard users
routerly roleManage RBAC roles
routerly reportUsage and billing reports
routerly serviceService configuration
routerly statusCheck service reachability

See CLI: Commands for the full reference.