Quickstart: CLI
Install the plain-text CLI built for agents, add a key and run the discover, inspect, run loop from any shell.
The routergrowth CLI runs the same loop as the REST API, with the same names: discover, inspect, run, runs, balance. It prints plain text with no colors and never prompts, so agents can drive it directly. It needs Node.js 18 or later.
Install
npm install -g routergrowth
routergrowth --version should print 0.7.0 or later, which this page assumes; npm install -g routergrowth@latest updates an older install. EACCES on a locked-down machine? Install per-user instead:
npm install --prefix ~/.local routergrowth
ln -sf ~/.local/node_modules/.bin/routergrowth ~/.local/bin/routergrowth
Add your key
Sign up on the dashboard and mint a key under Settings > API keys (it is shown once). A password signup asks you to prove the address first (Send code); Google and GitHub signups are proven already. The workspace then has $1 of signup credit for real calls, which expires 7 days after it is granted.
routergrowth setup --client "my-agent"
routergrowth keys add -k rg_live_... -l main
routergrowth balance
setup writes the config file (~/.routergrowth/config.json) and checks that the API answers. keys add stores the key there, and the first key stored becomes the active one; ROUTERGROWTH_API_KEY in the environment takes precedence over it. balance is free and confirms the key works. (routergrowth signup creates an account on a local sandbox server only: the production API refuses it.)
The loop
routergrowth discover -q "find a verified email for a person"
routergrowth inspect -c contact.find
routergrowth run -c contact.find \
-i '{"first_name":"Alex","last_name":"Rivera","company_domain":"example.com"}' \
--max-cost 0.10
routergrowth runs get -r <run_id> --wait 60 -o result.json
routergrowth runs
run submits immediately by default and prints the run with its ID, so provider latency does not block the agent. Add --wait (up to 120 seconds), or poll the run ID with runs get when the result is needed. A finished run prints its usual follow-ups as commands to paste (next, <goal>: routergrowth ...), their input filled from the result.
Ground rules that keep spend predictable:
inspectbefore the firstrunof a capability: its input schema is the source of truth.- Cap every run with
--max-cost. On a capability, usewaterfall.max_cost_for_all(inspect -c <capability> -jprints it; the0.10above stands in for it) so every provider in the waterfall can try. - Report costs when they matter to the user: they asked, they set a budget, or a multi-run job ends (the sum of
billing.charged). - Write large results to a file with
-oinstead of printing them.
The dashboard shows the same workspace in the browser: balance, keys, runs and usage.
The long tail: raw endpoints
When no capability fits, call the provider's own endpoint. Discover finds them (--kind endpoint), endpoints lists everything one provider serves, and inspect -p -e returns the provider's request shape with a ready run line.
routergrowth discover -q "tiktok video comments" --kind endpoint
routergrowth endpoints -p dataforseo -q backlinks
routergrowth inspect -p dataforseo -e /v3/serp/google/organic/live/advanced
routergrowth run -p dataforseo -e /v3/serp/google/organic/live/advanced \
-i '{"keyword":"best crm","location_code":2840,"language_code":"en"}' --max-cost 0.05 -o serp.json
routergrowth guard --per-run 1 # block any single run that would hold more than $1
A raw run has no quote: it settles on the provider's measured cost after the call, never above your --max-cost. Set it every time. Details: Raw endpoints.
Next
- CLI reference: every command and flag.
- Quickstart: agents: make any coding agent use this CLI on its own.
Reading this as an agent? This page as markdown: /docs/quickstart-cli.md · every page: /docs/llms.txt