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.
geni config set, write a config value.geni config get, print one value or every settable key.geni config unset, remove a value (the resolver falls back through env vars and defaults).geni config path, print the absolute path to the config file.
Settable keys
| Key | Effect |
|---|---|
apiUrl | Override for the cloud API base URL used at fresh geni login time. Validated as a URL on write. |
dashboardUrl | Override 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:
- The session file's stored server (locked at
geni logintime, the auth token was minted on that specific URL). $GENI_API_URLenv var.apiUrlfromgeni config.- Compiled-in default (
https://cloud.generalinput.com).
For dashboardUrl:
$GENI_DASHBOARD_URLenv var.dashboardUrlfromgeni config.- Inferred from the session's API URL when it points at localhost (dev convenience: API on
:4111→ dashboard on:5177). - 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 logingeni 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.