skystate config
Manage global CLI configuration.
Synopsis
skystate config set <key> <value>
skystate config get <key>
skystate config list [--format <format>] [--quiet]
skystate config unset <key>
skystate 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 skystate config path.
Configuration Keys
| Key | Default | Env Var Override | Allowed Values |
|---|---|---|---|
api_url | https://api.skystate.io | SKYSTATE_API_URL | Any valid URL |
default_project | (empty) | — | Any project slug |
default_env | (empty) | — | Any environment slug |
format | table | — | json, table, plain |
Resolution priority for each key: environment variable > config file value > built-in default.
skystate config set
Set a configuration value.
Synopsis
skystate config set <key> <value>Arguments
| Argument | Description |
|---|---|
<key> | Config key (see table above) |
<value> | Value to store |
Examples
# Point the CLI at a self-hosted instance
skystate config set api_url https://api.mycompany.com
# Always use JSON output
skystate config set format json
# Set a default project for commands run outside a repo
skystate config set default_project my-appOutput
Set api_url = https://api.mycompany.comErrors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: api_url, default_project, default_env, format. 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.
skystate config get
Get the current resolved value for a key.
Synopsis
skystate config get <key> [--verbose]`Arguments
| Argument | Description |
|---|---|
<key> | Config key to retrieve |
Options
--verbose — include the source (default, config file, or env var) in the output.
Examples
skystate config get api_url
skystate 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 skystate config set |
env | Overridden by an environment variable |
Errors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: ... |
skystate config list
List all configuration keys with their current values and sources.
Synopsis
skystate config list [--format <format>] [--quiet]Options
--format, --quiet — see global options.
Examples
skystate config list
skystate config list --format jsonOutput (default table format)
key value source
-------------- -------------------------- -------
api_url https://api.skystate.io default
default_project my-app config
default_env default
format table defaultOutput (JSON format)
[
{
"key": "api_url",
"value": "https://api.skystate.io",
"source": "default"
},
{
"key": "default_project",
"value": "my-app",
"source": "config"
},
{
"key": "default_env",
"value": "",
"source": "default"
},
{
"key": "format",
"value": "table",
"source": "default"
}
]skystate config unset
Remove a configuration key, reverting it to its default value.
Synopsis
skystate config unset <key>Arguments
| Argument | Description |
|---|---|
<key> | Config key to remove |
Examples
# Revert api_url to the built-in default
skystate config unset api_url
# Clear the default project
skystate config unset default_projectOutput
Unset api_url (reverts to default: https://api.skystate.io)For keys with an empty default:
Unset default_project (reverts to default: (empty))Errors
| Situation | Message |
|---|---|
| Unknown key | Error: Unknown key "xyz". Valid keys: ... |
skystate config path
Print the path to the global config file.
Synopsis
skystate config pathDescription
Prints the resolved path to config.json. Useful for debugging config resolution or locating the file to edit manually.
Examples
skystate config path
# /home/user/.config/skystate/config.json
# Open the config file in your editor
$EDITOR "$(skystate 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:
{
"api_url": "https://api.mycompany.com",
"default_project": "my-app",
"format": "json"
}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 "$(skystate config path)"to reset to defaults. - Environment variable not taking effect — ensure
SKYSTATE_API_URL(or the relevant env var) is exported in your shell. Environment variables take the highest priority.