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.
To see the actual file path on your machine, run sky config path.
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 |
default_env | (empty) | - | Any environment slug |
format | table | - | json, table, plain |
theme | (empty) | SKYSTATE_THEME | dark, light, or empty |
Resolution priority for each key: environment variable > config file value > built-in default.
sky config set
Set a configuration value.
Synopsis
sky config set <key> <value>Arguments
| Argument | Description |
|---|---|
<key> | Config key (see table above) |
<value> | Value to store |
Examples
sh
# Point the CLI at a self-hosted instance
sky config set api_url https://api.mycompany.com
# Point login flows at a self-hosted auth-front
sky config set auth_front_url https://auth.example.com
# Always use JSON output
sky config set format json
# Set a default environment
sky config set default_env development
# Set a UI theme preference for clients that read it
sky config set theme darkOutput
Set api_url = https://api.mycompany.comErrors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: api_url, auth_front_url, landing_url, default_env, format, theme. Did you mean "api_url"? |
Invalid value for format | Error: Invalid value "csv" for format. Valid: json, table, plain |
The "did you mean" suggestion appears when the key is within an edit distance of 3 from a valid key.
sky config get
Get the current resolved value for a key.
Synopsis
sky config get <key>Arguments
| Argument | Description |
|---|---|
<key> | Config key to retrieve |
Options
When the global --verbose flag is passed, config get also prints the source of the value (default, config file, or env var).
Examples
sh
sky config get api_url
sky config get format --verboseOutput
Without --verbose:
https://api.skystate.ioWith --verbose:
https://api.skystate.io (source: default)Possible sources:
| Source | Meaning |
|---|---|
default | Built-in default value |
config | Value set via sky config set |
env | Overridden by an environment variable |
Errors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: ... |
sky config list
List all configuration keys with their current values and sources.
Synopsis
sky config list [--format <format>] [--quiet]Options
--format, --quiet - see global options.
Examples
sh
sky config list
sky config list --format jsonOutput (default table format)
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 default
theme defaultOutput (JSON format)
json
[
{
"key": "api_url",
"value": "https://api.skystate.io",
"source": "default"
},
{
"key": "auth_front_url",
"value": "https://auth.skystate.io",
"source": "default"
},
{
"key": "landing_url",
"value": "https://skystate.io",
"source": "default"
},
{
"key": "default_env",
"value": "",
"source": "default"
},
{
"key": "format",
"value": "table",
"source": "default"
},
{
"key": "theme",
"value": "",
"source": "default"
}
]sky config unset
Remove a configuration key, reverting it to its default value.
Synopsis
sky config unset <key>Arguments
| Argument | Description |
|---|---|
<key> | Config key to remove |
Examples
sh
# Revert api_url to the built-in default
sky config unset api_url
# Clear the default environment
sky config unset default_envOutput
Unset api_url (reverts to default: https://api.skystate.io)For keys with an empty default:
Unset default_env (reverts to default: (empty))Errors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: ... |
sky config path
Print the path to the global config file.
Synopsis
sky config pathDescription
Prints the resolved path to config.json. Useful for debugging config resolution or locating the file to edit manually.
Examples
sh
sky config path
# /home/user/.config/skystate/config.json
# Open the config file in your editor
$EDITOR "$(sky config path)"Output
/home/user/.config/skystate/config.jsonOn systems with $XDG_CONFIG_HOME set:
/custom/config/dir/skystate/config.jsonConfig file format
The config file is plain JSON:
json
{
"api_url": "https://api.mycompany.com",
"auth_front_url": "https://auth.example.com",
"default_env": "development",
"format": "json",
"theme": "dark"
}The file can be edited manually. Keys not present in the file fall back to their built-in defaults.
Troubleshooting
- "Config file is corrupt" - the JSON in
config.jsonis invalid. Delete the file withrm "$(sky config path)"to reset to defaults. - Environment variable not taking effect - ensure the variable is exported in your shell. Environment variables take the highest priority. Supported overrides:
SKYSTATE_THEMEfor the display theme,SKYSTATE_API_URLfor the API base URL,SKYSTATE_AUTH_FRONT_URLfor the auth-front URL, andSKYSTATE_LANDING_URLfor the landing URL. These are useful when pointing the CLI at a local stack or a custom host.