Skip to content

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 path

Description ​

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 ​

KeyDefaultEnv Var OverrideAllowed Values
api_urlhttps://api.skystate.ioSKYSTATE_API_URLAny string URL
auth_front_urlhttps://auth.skystate.ioSKYSTATE_AUTH_FRONT_URLAny string URL
landing_urlhttps://skystate.ioSKYSTATE_LANDING_URLAny string URL
default_env(empty)SKYSTATE_ENVAny environment slug
formattable-json, table, plain
theme(empty)SKYSTATE_THEMEdark, 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 ​

ArgumentDescription
<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 dark

Output ​

Set api_url = https://api.mycompany.com

Errors ​

SituationMessage
Unknown keyError: Unknown key "xyz". Valid keys: api_url, auth_front_url, landing_url, default_env, format, theme. Did you mean "api_url"?
Invalid value for formatError: 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 ​

ArgumentDescription
<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 --verbose

Output ​

Without --verbose:

https://api.skystate.io

With --verbose:

https://api.skystate.io	(source: default)

Possible sources:

SourceMeaning
defaultBuilt-in default value
configValue set via sky config set
env:<VARNAME>Overridden by the named environment variable

An env-overridden key prints the overriding variable's name, e.g. (source: env:SKYSTATE_API_URL). The env:<VARNAME> form is the human-readable label, also used in the config list table; config list JSON and plain output keep the bare env.

Errors ​

SituationMessage
Unknown keyError: 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 json

Output (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                                          default

When any key's source is config, the table ends with a trailing config values from <path> line naming the config file.

Output (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"
  }
]

source is always one of default, config, or env. When source is env, the JSON entry also includes an envVar field naming the overriding environment variable (e.g. "envVar": "SKYSTATE_API_URL"). envVar is JSON-only: the table's source column shows env:<VARNAME> instead, and plain output keeps the bare env.


sky config unset ​

Remove a configuration key, reverting it to its default value.

Synopsis ​

sky config unset <key>

Arguments ​

ArgumentDescription
<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_env

Output ​

Unset api_url (reverts to default: https://api.skystate.io)

For keys with an empty default:

Unset default_env (reverts to default: (empty))

Errors ​

SituationMessage
Unknown keyError: Unknown key "xyz". Valid keys: ...

sky config path ​

Print the path to the global config file.

Synopsis ​

sky config path

Description ​

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.json

With --format json:

json
{"path":"/home/user/.config/skystate/config.json"}

On systems with $XDG_CONFIG_HOME set:

/custom/config/dir/skystate/config.json

Config 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.json is invalid. Delete the file with rm "$(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_THEME for the display theme, SKYSTATE_API_URL for the API base URL, SKYSTATE_AUTH_FRONT_URL for the auth-front URL, and SKYSTATE_LANDING_URL for the landing URL. These are useful when pointing the CLI at a local stack or a custom host.