The CLI is configured through a small handful of files, environment variables, and command-line flags. They compose with a strict precedence order.Documentation Index
Fetch the complete documentation index at: https://docs.grounds.gg/llms.txt
Use this file to discover all available pages before exploring further.
Precedence
For every setting, the first source that has a value wins:- Command-line flag (
--api-url,--project, …) - Environment variable (
GROUNDS_API_URL,GROUNDS_PROJECT, …) - Config file (
config.tomlin the config dir) - Built-in default (e.g.,
https://platform.grnds.io)
Config dir
| OS | Default path | Override |
|---|---|---|
| Linux | $XDG_CONFIG_HOME/grounds/ (default ~/.config/grounds/) | --config <dir> or GROUNDS_CONFIG_DIR |
| macOS | ~/Library/Application Support/grounds/ | same |
| Windows | %APPDATA%\grounds\ | same |
| File | Owner |
|---|---|
credentials.json | Created by grounds login. Refresh + access tokens. 0600. |
config.toml | Optional. User-managed defaults. |
config.toml
Optional. Persistent overrides for things you don’t want to type or set every shell.~/.config/grounds/config.toml
Environment variables
| Var | Equivalent flag | Purpose |
|---|---|---|
GROUNDS_API_URL | --api-url | forge endpoint |
GROUNDS_PROJECT | --project | project ID |
GROUNDS_TOKEN | (none) | Bearer token override (e.g., service-account gnds_*) |
GROUNDS_CONFIG_DIR | --config | Config dir |
NO_COLOR | --no-color | Disable ANSI colors |
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:credentials.json and config.toml.
