CLI
Overview
octri is the command line for your Octri project. It does what the dashboard does: push a spec, build SDKs, publish docs, upload symbols, and work through the errors your SDKs report from production.
Install
npm install -g @octri/cli
octri --helpNode 20 or newer.
Sign in
octri auth login
octri projects useauth login prompts for your email and password, and for your authenticator code if you have two-factor on. --email and --password work for scripted setups. projects use with no argument opens a picker; pass a project id to skip it.
The session lives in ~/.octri/config.json, mode 0600. Profiles keep separate environments side by side:
octri config use prod --api-url api.octri.dev
octri config set defaultLanguages go,rust,swiftWhat it covers
| Group | What you do with it |
|---|---|
auth config | Sign in, switch profile, print a token for curl |
projects specs | Create a project, push or import a spec, follow ingestion |
sdk | Language catalogue, settings, spec audit, preview, build, download, publish |
docs | Pages, guides, navigation, versions, custom domain, changelog |
monitoring | Issues, logs, traces, releases, alerts, checks, symbol uploads |
orgs keys | Members, invites, usage, billing, API keys |
github | Point a project at a spec file in a repo and sync it |
jobs | Depth and failures in the generation queue |
mcp | The project's tool catalogue, and an MCP server over stdio |
Run octri <group> --help for one group on its own.
A first run
octri specs push ./openapi.yaml
octri sdk build --lang go,typescript --download
octri docs versions publish <specId>specs push waits for the whole pipeline, not the upload: the spec parses in a second, then the doc pages, search index and changelog are written behind it. The spinner names the stage it is on.
Output
Three modes, chosen automatically.
| Mode | When | What you get |
|---|---|---|
| Interactive | A terminal | Colour, spinners, live build lanes, tables |
| Plain | Piped, or CI is set | Append-only lines, no escape sequences |
--json | You ask for it | One JSON document on stdout, errors on stderr |
--json is the one to script against. NO_COLOR and --plain are honoured.
Global flags
| Flag | Effect |
|---|---|
--project <id> | Act on a project other than the selected one |
--profile <name> | Use a different stored environment |
--api-url <url> | Point at another API |
--json | Machine-readable output |
--quiet | Drop everything but the result |
--plain | No animation |
--no-color | No colour |
Values resolve flag first, then environment variable, then the stored profile. The environment variables are OCTRI_PROFILE, OCTRI_API_URL, OCTRI_TOKEN, OCTRI_API_KEY, OCTRI_PROJECT_ID and OCTRI_CONFIG_DIR.
Monitoring
Reads and triage use your session, so they need nothing but a login:
octri monitoring summary
octri monitoring issues --status unresolved
octri monitoring issue <id>
octri monitoring resolve <id>The two upload commands work differently. They talk to the monitoring service directly with an ingest token, because a CI job has one secret and no way to log in.
octri monitoring sourcemaps upload ./dist
octri monitoring sources upload ./srcSigned in, the CLI resolves the connection for you. In CI you pass it. octri monitoring config prints the three values to store as secrets.
See Source maps, Source files and CI setup, or Monitoring for the full command set.
Driving it from an AI assistant
octri mcp serveThat speaks MCP over stdio and exposes the same surface as typed tools, so an assistant can push a spec, wait for a build, read the generated source, and read the production errors that build caused.
{
"mcpServers": {
"octri": {
"command": "octri",
"args": ["mcp", "serve"]
}
}
}Credentials come from your stored profile. The assistant never sees them. Reads are open; publishing to package registries and deleting a spec are refused unless you start the server with --allow-publish or --allow-delete.
This is Octri's own CLI. It is unrelated to the CLI generated inside your SDK, which is a command-line client for your API that your customers run.