CLI & Agent Skill
Installing the CLI
Installing the mr command-line tool and connecting it to your account with an API key.
The Multi-Router CLI, mr, manages routers, prompts, provider keys, model groups, budgets, traffic and the rest of your configuration from a terminal. It calls the same API described in the API Reference, using one of your API keys.
Install
On macOS and Linux, run the installer:
The installer picks the build for your operating system and processor, checks its SHA-256 checksum, and copies it to ~/.local/bin/mr. If that folder is not on your PATH, the installer prints the line to add to your shell profile. To install somewhere else, or to install a specific version, pass options to the installer:
| Platform | Build |
|---|---|
| macOS, Apple silicon | mr-darwin-arm64 |
| macOS, Intel | mr-darwin-amd64 |
| Linux, x86-64 | mr-linux-amd64 |
| Linux, ARM64 | mr-linux-arm64 |
| Windows, x86-64 | mr-windows-amd64.exe |
On Windows, download https://multi-router.ai/cli/<version>/mr-windows-amd64.exe, rename it to mr.exe and put it in a folder on your PATH. The current version number is at https://multi-router.ai/cli/latest.txt, and the checksums for each version are in https://multi-router.ai/cli/<version>/SHA256SUMS.
Check the installation:
Add your API key
The CLI signs in with a Multi-Router API key. Create one on the API Keys page of the dashboard (see API Key). The key's organization and scopes decide what the CLI can see and change: a full control key can use every endpoint the organization can, and a scoped key can do only what its scopes allow (see Scope).
Then save the key in a profile:
mr profile add asks for the key without showing it on screen, and saves it to ~/.multi-router/cli.config.yaml, readable only by you. The key is never taken as a command-line option, so it does not end up in your shell history. In a script, pass it on standard input instead:
| Option | Meaning |
|---|---|
--name NAME | Profile name. Default default. |
--base-url URL | API address. Default https://api.multi-router.ai; set it for a self-hosted installation. Must use https. |
--default | Make this the profile used when no profile is named. The first profile you add is the default. |
--force | Replace a profile that already exists, for example to rotate its key. |
Confirm the key works by listing your routers:
Several profiles
Add one profile per API key, for example one per organization. Pick a profile for a single command with --profile:
The config file holds every profile:
Updating and removing
To update, run the installer again with the same options; it replaces mr with the latest version. After updating, run mr skill install to update the agent skill to match. To remove the CLI, delete mr from the folder you installed it to (by default ~/.local/bin) and ~/.multi-router/cli.config.yaml, and revoke its API key on the API Keys page.