General Input
Config

Config

Read and write the persistent CLI config.

geni config reads and writes a small JSON file at ~/.config/geni/config.json (overridden by $GENI_CONFIG_DIR). It holds defaults the CLI uses when nothing more specific is set, useful for pointing the CLI at a self-hosted or local-dev server without re-passing --server or exporting an env var on every shell.

Settable keys

KeyEffect
apiUrlOverride for the cloud API base URL used at fresh geni login time. Validated as a URL on write.
dashboardUrlOverride for the dashboard base URL used by browser-opening commands like geni credential connect. Validated as a URL on write.

Both keys are optional. Anything you don't set falls through to the env var, then the compiled-in default.

Precedence (highest wins)

For apiUrl:

  1. The session file's stored server (locked at geni login time, the auth token was minted on that specific URL).
  2. $GENI_API_URL env var.
  3. apiUrl from geni config.
  4. Compiled-in default (https://cloud.generalinput.com).

For dashboardUrl:

  1. $GENI_DASHBOARD_URL env var.
  2. dashboardUrl from geni config.
  3. Inferred from the session's API URL when it points at localhost (dev convenience: API on :4111 → dashboard on :5177).
  4. Compiled-in default (https://generalinput.com).

Switching API URL after login

The active session is bound to the API URL it was minted against, the runner-session token only validates on that server. Setting apiUrl to a new value does not retarget existing commands; you have to log out and log back in:

geni logout
geni config set apiUrl http://localhost:4111
geni login

geni config set apiUrl ... prints a warning if the current session's URL doesn't match the new value, so this is loud rather than silent.

File format

{
  "version": 1,
  "apiUrl": "http://localhost:4111",
  "dashboardUrl": "http://localhost:5177"
}

Edit by hand if you prefer, the CLI re-reads the file on every command. Anything that doesn't match the schema (unknown keys, malformed URLs) is ignored on read, so a partially-old file behaves like an empty config rather than crashing.

On this page