sky config
Manage global CLI configuration.
Synopsis
sky config set <key> <value>
sky config get <key>
sky config list [--format <format>] [--quiet]
sky config unset <key>
sky config pathDescription
The config command reads and writes the global CLI config file at ~/.config/skystate/config.json (or $XDG_CONFIG_HOME/skystate/config.json). These settings apply to all repositories and are overridden by environment variables where applicable. Run sky config path to see the file path on your machine.
Configuration Keys
| Key | Default | Env Var Override | Allowed Values |
|---|---|---|---|
api_url | https://api.skystate.io | SKYSTATE_API_URL | Any string URL |
auth_front_url | https://auth.skystate.io | SKYSTATE_AUTH_FRONT_URL | Any string URL |
landing_url | https://skystate.io | SKYSTATE_LANDING_URL | Any string URL. Base of the Terms of Service and Privacy Policy links printed by sky terms. |
default_env | (empty) | SKYSTATE_ENV | Any environment slug |
format | table | - | json, table, plain |
Resolution priority for each key: environment variable (where the key has one) > config file value > built-in default. format has no environment variable; use the --format flag for a one-off override.
sky config set
Synopsis
sky config set <key> <value>Example
sh
sky config set api_url https://api.mycompany.comOutput
Set api_url = https://api.mycompany.comErrors
| Situation | Result |
|---|---|
| Unknown key | Exit 1; the message names the valid keys |
Invalid value for format | Error: Invalid value "csv" for format. Valid: json, table, plain |
sky config get
Get the current resolved value for a key. With the global --verbose flag, the source is printed too: default, config, or env:<VARNAME>.
Synopsis
sky config get <key>Example
sh
sky config get api_url --verboseOutput
https://api.skystate.io (source: default)Errors
| Situation | Result |
|---|---|
| Unknown key | Exit 1; the message names the valid keys |
sky config list
List all configuration keys with their current values and sources.
Synopsis
sky config list [--format <format>] [--quiet]--format, --quiet - see global options.
Example
sh
sky config listOutput
key value source
---------- -------------------------- -------
api_url https://api.skystate.io default
auth_front_url https://auth.skystate.io default
landing_url https://skystate.io default
default_env default
format table defaultWhen any key's source is config, the table ends with a trailing config values from <path> line. In JSON output, source is one of default, config, or env; an env entry also carries an envVar field naming the overriding variable.
sky config unset
Remove a configuration key, reverting it to its default value.
Synopsis
sky config unset <key>Example
sh
sky config unset api_urlOutput
Unset api_url (reverts to default: https://api.skystate.io)Errors
| Situation | Result |
|---|---|
| Unknown key | Exit 1; the message names the valid keys |
sky config path
Print the path to the global config file.
Synopsis
sky config pathExample
sh
$EDITOR "$(sky config path)"Output
/home/user/.config/skystate/config.jsonWith --format json: {"path":"/home/user/.config/skystate/config.json"}.