Global flags and output
These flags work on every command. They decide which environment and project a command acts on, and how it prints.
octri <command> [arguments] [flags]Global flags
--project <id>stringActs on another project for this one command, without changing the selection. -p is short for it.
--profile <name>stringUses another stored environment for this command. See config.
--api-url <url>stringPoints at another API. local is short for a stack on your own machine at localhost:3001.
--jsonbooleanPrints one JSON document on stdout and nothing else. Errors go to stderr. This is the mode to script against. -j is short for it.
--quietbooleanPrints only the result, without progress lines or hints. -q is short for it.
--plainbooleanTurns off animation: spinners and live build lanes become plain lines. It's on by itself when output is piped or CI is set.
--no-colorbooleanTurns off colour. Setting NO_COLOR does the same.
--helpbooleanLists the commands. octri <group> --help lists one group, such as octri sdk --help. -h is short for it.
--versionbooleanPrints the CLI's version. -v is short for it.
Environment variables
A value comes from its flag first, then its environment variable, then the stored profile.
| Variable | What it sets |
|---|---|
OCTRI_PROFILE | The profile to use, like --profile |
OCTRI_API_URL | The API address, like --api-url. local works here too |
OCTRI_PROJECT_ID | The project, like --project |
OCTRI_API_KEY | An API key to authenticate with instead of a session, for CI |
OCTRI_TOKEN | A session token to use instead of the stored one |
OCTRI_CONFIG_DIR | Where the config file lives, instead of ~/ |
OCTRI_ALLOW_INSECURE_HTTP | Set to 1 to send credentials over plain HTTP to a host other than your own machine. The CLI refuses otherwise |
The monitoring upload commands read their own: MONITORING_URL, MONITORING_TOKEN, MONITORING_ENVIRONMENT and MONITORING_RELEASE. See monitoring sourcemaps.
Output
The CLI picks one of three modes for you.
| Mode | When | What you get |
|---|---|---|
| Interactive | A terminal | Colour, spinners, live build lanes and tables |
| Plain | Piped, CI set, or --plain | The same content as lines that are only ever appended, with no escape sequences |
| JSON | --json | One JSON document on stdout, errors on stderr |
Scripting it
--json output is stable to parse, and the exit code is non-zero whenever a command fails.
octri sdk builds --json | jq -r '.builds[0].status'
octri monitoring issues --status unresolved --json | jq '.count'Some commands also exit with an error on purpose, so a CI step can stop on them:
| Command | Fails when |
|---|---|
sdk build | Any language fails to build |
lab run | Any language fails |
mcp score --fail-under 7 | The score is below the number |
mcp test --fail-under 0.9 | A model's pass rate is below the number |
mcp workflows --stale | A workflow no longer matches its guide |
mcp outages --fail | A tool is down, or the monitor can't be reached |
monitoring slos --fail | A target is breached |
A command that needs confirming, such as a delete, does nothing without --yes, and only warns. In a script, a prompt can't be answered, so the CLI stops with an error that names the missing value and asks you to pass it as a flag.