Skip to main content
The CLI is configured through a small handful of files, environment variables, and command-line flags. They compose with a strict precedence order.

Precedence

For every setting, the first source that has a value wins:
  1. Command-line flag (--api-url, --project, …)
  2. Environment variable (GROUNDS_API_URL, GROUNDS_PROJECT, …)
  3. Config file (config.toml in the config dir)
  4. Built-in default (e.g., https://platform.grnds.io)

Config dir

What lives there:

config.toml

Optional. Persistent overrides for things you don’t want to type or set every shell.
~/.config/grounds/config.toml
Every field is optional. Missing fields fall back to env or built-in default.

Environment variables

GROUNDS_TOKEN is special: when set, the CLI skips reading credentials.json entirely and uses the token verbatim. It will not be refreshed. This is the right knob for CI.

Profiles (advanced)

For switching between multiple Grounds environments (e.g., staging vs prod self-hosted), keep separate config dirs:
Each dir has its own credentials.json and config.toml. The same directory also owns workspace.yaml, so isolated profiles can have their own local plugin mappings:
See Local plugin workspaces for the workspace file and commands.

Resetting

To start completely fresh:
The CLI will recreate the config dir on next use.