Octri

config

Manages profiles. A profile holds one environment's API address, session and defaults, kept in ~/.octri/config.json. On its own, octri config prints the current profile with any stored secrets shown as <stored>.

Values resolve in this order: a flag, then an environment variable, then the profile. See global flags for the variables.

bash
octri config [list | set <key> <value> | use <profile> | path]

octri config list

Prints the current profile's settings and the file they're kept in. Tokens and API keys show as <stored>, never their values. --profile <name> prints another profile.

octri config set <key> <value>

Changes one setting in the current profile. Sessions can't be set by hand: sign in for those.

Arguments

<key>stringrequired

The setting to change.

ValueMeaning
apiUrlThe API address. Takes local, a host or a full URL
defaultProjectThe project commands act on when you don't pass --project
defaultLanguagesComma-separated languages for sdk build and lab run when you don't pass --lang
apiKeyAn API key to authenticate with instead of a session, for CI
<value>stringrequired

The new value. Everything after the key is the value.

octri config use <profile>

Switches to another profile, creating it if it doesn't exist. Later commands use it until you switch again.

Arguments

<profile>stringrequired

The profile's name, such as prod or local.

Flags

--api-url <url>string

Sets the profile's API address. local is short for http://localhost:3001.

octri config path

Prints where the config file is. OCTRI_CONFIG_DIR moves it.

Examples

Show the current profile

bash
octri config
Output
Profile default
  apiUrl            https://api.octri.dev/api/v1
  accessToken       <stored>
  refreshToken      <stored>
  email             dana.reyes@acmesoftware.io
  orgId             6acd4f5218c2528b59327448
  defaultProject    6acd4f5218c2528b5932744f
  defaultLanguages  go, typescript, python
  ~/.octri/config.json

Set default languages

bash
octri config set defaultLanguages go,typescript,python
Output
✔ defaultLanguages = go,typescript,python

Keep a local stack beside production

bash
octri config use local --api-url local
octri auth login
octri config use default