mirrors CLI is a terminal client of the hosted backend with full parity with the web app. Anything you can do in the UI you can do from the CLI: log in, ingest and build a twin, read its tool surface, call a tool by hand, add business context, and apply agent-suggested fixes. It talks only HTTP to the backend; it has no engine or build logic of its own.
Your own agent is not run from here, and that is the point: it stays on your machine and calls the twin’s tools over HTTP. mirrors tools <env> --format anthropic prints the listing already shaped for your SDK’s tools= parameter.
How do I install the Mirrors CLI?
Install it with pip. The CLI ships inside the Pythonmirrorkit package behind
the cli extra, so one install gives you both the collector and the mirrors
command:
How do I log in to the CLI?
Runmirrors login and paste a workspace API key (mk_live_…,
minted in the web app under Settings → API keys). There is no separate CLI
account: the key is what identifies your workspace.
~/.mirrors/config.json. For CI, set MIRRORS_BASE_URL / MIRRORS_API_KEY instead.
What commands does the Mirrors CLI have?
The commands group into six things: listing and building environments (env ls,
build), exploring one (env assets, env schema, env fidelity, env drift,
env traces), running one (query, chat, container), raising fidelity
(context add, proposal), reading and calling tools (tools, call),
and checking usage (usage).
What does a typical CLI workflow look like?
Build, explore, then connect. You build a twin from collected traces, check its per-tool fidelity and call a tool or two against it, then point your agent at it from your traces and run it to score the agent.1
Build
mirrors build --project my-agent --name my-agent turns collected traces into a runnable twin, streaming the build log.2
Explore and query
mirrors env fidelity my-agent shows per-tool scores; mirrors query my-agent "…" runs a session and prints the trace.3
Eval
mirrors tools my-agent --format anthropic gives you the listing your agent binds to; the tool plane is the three calls around it.