multi-router.aidocs

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:

bash
curl -fsSL https://multi-router.ai/cli/install.sh | sh

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:

bash
curl -fsSL https://multi-router.ai/cli/install.sh | sh -s -- --dir ~/bin --version v0.1.0
PlatformBuild
macOS, Apple siliconmr-darwin-arm64
macOS, Intelmr-darwin-amd64
Linux, x86-64mr-linux-amd64
Linux, ARM64mr-linux-arm64
Windows, x86-64mr-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:

bash
mr version

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:

bash
mr profile add

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:

bash
printf '%s\n' "$MR_API_KEY" | mr profile add --name ci
OptionMeaning
--name NAMEProfile name. Default default.
--base-url URLAPI address. Default https://api.multi-router.ai; set it for a self-hosted installation. Must use https.
--defaultMake this the profile used when no profile is named. The first profile you add is the default.
--forceReplace a profile that already exists, for example to rotate its key.

Confirm the key works by listing your routers:

bash
mr router list --human

Several profiles

Add one profile per API key, for example one per organization. Pick a profile for a single command with --profile:

bash
mr profile add --name engineering
mr --profile engineering router list

The config file holds every profile:

~/.multi-router/cli.config.yamlyaml
default_profile: default
profiles:
  default:
    api_key: sk-mr-...
  engineering:
    api_key: sk-mr-...

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.

Rate LimitAgent Skill
Was this helpful?