@getmodus/cli on npm (modus binary).
Quick start
Authenticate
- OAuth (default) opens your browser and requests exactly the access your
account already has in the Modus web app — nothing more, nothing held back.
The access token refreshes automatically;
modus logoutrevokes it server-side. - CI/scripts: set
MODUS_API_KEY— it always overrides the stored credential and is the preferred way to authenticate non-interactively. - Avoid
modus login --token modus_xxx— a token on the command line is readable from shell history,ps, and CI logs.
Staging (and other non-prod)
Point the CLI at staging with a staging PAT andMODUS_BASE_URL. Chat uses a
separate agent host; for standard api.* origins the CLI/SDK derive
agent.* automatically (api.staging… → agent.staging…), so you only need
one URL:
MODUS_AGENT_HOST explicitly.
See Authentication for token format and best practices.
Output
- Commands that return data print compact JSON by default — pipe it to
jq, a script, or an agent. - Pass
--prettyfor a human-readable table or summary instead. - Exception:
chat/scopes chatstream raw response text by default; pass--jsonon those two for structured SSE events instead.
Global flags
Most commands inherit:--pretty— human-readable table/summary instead of compact JSON
modus chat, modus scopes chat) stream text by default; pass --json for structured events.
Next steps
- Browse the full CLI command reference (every
moduscommand) - Python SDK / TypeScript SDK
- API