Copy-paste setup
Give your agent one line. It installs metro, sets up your key file, and stops for you at every step that needs a human.
Paste this into Claude Code, Codex, Cursor, or any agent with a terminal:
set up metro - https://metrocli.com/llms.txtThe link is a brief written for the agent: the safety contract first, then setup steps, then how to report back. A human still does one thing: create the Metronome API token and paste it into a file. The agent does the rest.
What your agent will do
Install metro.
git clone --depth 1 https://github.com/metrocli/metro.git ~/.metro/src && bash ~/.metro/src/scripts/install-global.shOnce npm publishing is live, npm install -g @metrocli/metro does the same.
Create your key file. It runs metro init --agent, which never prompts. That creates ~/.metro/.env (mode 600) with empty placeholders, copies the manual to ~/.metro/AGENTS.md, and leaves metro read-only.
Ask you to paste your sandbox key into the file. It relays the three steps metro init --agent printed: open the sandbox token page, create a token, paste it into ~/.metro/.env after METRONOME_SANDBOX_KEY= in your editor, and say "done".
Check the key with a read-only call. It runs metro init --check --json and continues only when keys.sandbox.status is working. Otherwise it relays the next field to you, word for word, and waits.
Learn your catalog. It reads ~/.metro/AGENTS.md, then runs metro status --json, metro catalog bind --sandbox --write and metro tenant snapshot show --sandbox --markdown.
Report a doorway. One line saying what you can now do, then exactly three next actions you can say yes to, based on your tenant. For example: bind the catalog, look up your largest customer, or preview one pricing change on sandbox with nothing applied.
When you ask for a change, the agent previews it, shows you the plain-English change and the payloadHash, waits for your yes, applies, and shows the readback. See the safety contract.
Never paste keys into chat
The agent will never ask for a key in chat. If you paste one anyway, it won't repeat it, and it will ask you to revoke that token and create a new one. Keys belong in ~/.metro/.env, which you edit yourself.
Notes per agent
Paste the line into a Claude Code session in any folder. Claude Code runs the install and metro init --agent in its terminal, then pauses for you to edit ~/.metro/.env. If it asks permission to run git, bash or metro, approve those. Opening .env for you is not needed; you edit it yourself.
A hosted chat assistant without a terminal can't run metro. The brief tells it to say so and point you to Install.
Do it yourself instead
Prefer to set up by hand? It's two commands and metro init. See Install and Keys: metro init.