The CLI needs one piece of information to talk to MuleRouter:Documentation Index
Fetch the complete documentation index at: https://mulerouter.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
- An API key — obtain it from the MuleRouter Console.
https://api.mulerouter.ai; you only need to set it
when you are pointing at a self-hosted gateway or proxy.
Environment variables
The canonical way to configure the CLI. Drop these into your shell rc file (~/.zshrc, ~/.bashrc, …) or your CI secret store.
| Variable | Required | Description |
|---|---|---|
MULEROUTER_API_KEY | Yes | API key for authentication |
MULEROUTER_BASE_URL | No | Custom API base URL — use this only for a private gateway or proxy |
.env file
For project-scoped configuration, create a .env file in the directory you run
the CLI from. The CLI loads MULEROUTER_* variables automatically and never
overwrites variables already set in the process environment.
.env
# are treated as comments, and any variable that does not begin
with MULEROUTER_ is ignored.
Command-line overrides
Every command accepts ad-hoc overrides that take precedence over both the environment and the.env file. Useful when juggling multiple accounts:
| Flag | Equivalent variable |
|---|---|
--api-key <key> | MULEROUTER_API_KEY |
--base-url <url> | MULEROUTER_BASE_URL |
Resolution order
The configuration loader resolves values in this order, stopping at the first hit:- CLI flags (
--api-key,--base-url) - Process environment variables (
MULEROUTER_*) .envfile in the current working directory
Inspect the active configuration
Runmulerouter config at any time to see what the CLI thinks it is configured
with. The API key is masked.
Troubleshooting
API key not found. Set MULEROUTER_API_KEY in the environment, write it
to .env, or pass --api-key.
A .env value isn’t taking effect. Existing environment variables are
never overwritten — export wins over .env. Check printenv | grep MULEROUTER.
