Octri

Global flags and output

These flags work on every command. They decide which environment and project a command acts on, and how it prints.

bash
octri <command> [arguments] [flags]

Global flags

--project <id>stringdefault: the selected project

Acts on another project for this one command, without changing the selection. -p is short for it.

--profile <name>stringdefault: the current profile

Uses another stored environment for this command. See config.

--api-url <url>stringdefault: the profile's address

Points at another API. local is short for a stack on your own machine at localhost:3001.

--jsonboolean

Prints one JSON document on stdout and nothing else. Errors go to stderr. This is the mode to script against. -j is short for it.

--quietboolean

Prints only the result, without progress lines or hints. -q is short for it.

--plainboolean

Turns off animation: spinners and live build lanes become plain lines. It's on by itself when output is piped or CI is set.

--no-colorboolean

Turns off colour. Setting NO_COLOR does the same.

--helpboolean

Lists the commands. octri <group> --help lists one group, such as octri sdk --help. -h is short for it.

--versionboolean

Prints 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.

VariableWhat it sets
OCTRI_PROFILEThe profile to use, like --profile
OCTRI_API_URLThe API address, like --api-url. local works here too
OCTRI_PROJECT_IDThe project, like --project
OCTRI_API_KEYAn API key to authenticate with instead of a session, for CI
OCTRI_TOKENA session token to use instead of the stored one
OCTRI_CONFIG_DIRWhere the config file lives, instead of ~/.octri
OCTRI_ALLOW_INSECURE_HTTPSet 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.

ModeWhenWhat you get
InteractiveA terminalColour, spinners, live build lanes and tables
PlainPiped, CI set, or --plainThe same content as lines that are only ever appended, with no escape sequences
JSON--jsonOne 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.

bash
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:

CommandFails when
sdk buildAny language fails to build
lab runAny language fails
mcp score --fail-under 7The score is below the number
mcp test --fail-under 0.9A model's pass rate is below the number
mcp workflows --staleA workflow no longer matches its guide
mcp outages --failA tool is down, or the monitor can't be reached
monitoring slos --failA 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.