Skip to content

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 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 skystate config path.

Configuration Keys

KeyDefaultEnv Var OverrideAllowed Values
api_urlhttps://api.skystate.ioSKYSTATE_API_URLAny valid URL
default_project(empty)Any project slug
default_env(empty)Any environment slug
formattablejson, 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

ArgumentDescription
<key>Config key (see table above)
<value>Value to store

Examples

sh
# 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-app

Output

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

Errors

SituationMessage
Unknown keyError: Unknown key "xyz". Valid keys: api_url, default_project, default_env, format. 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.


skystate config get

Get the current resolved value for a key.

Synopsis

skystate config get <key> [--verbose]`

Arguments

ArgumentDescription
<key>Config key to retrieve

Options

--verbose — include the source (default, config file, or env var) in the output.

Examples

sh
skystate config get api_url
skystate 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 skystate config set
envOverridden by an environment variable

Errors

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

sh
skystate config list
skystate config list --format json

Output (default table format)

key               value                        source
--------------    --------------------------   -------
api_url           https://api.skystate.io      default
default_project   my-app                       config
default_env                                    default
format            table                        default

Output (JSON format)

json
[
  {
    "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

ArgumentDescription
<key>Config key to remove

Examples

sh
# Revert api_url to the built-in default
skystate config unset api_url

# Clear the default project
skystate config unset default_project

Output

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

For keys with an empty default:

Unset default_project (reverts to default: (empty))

Errors

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

skystate config path

Print the path to the global config file.

Synopsis

skystate config path

Description

Prints the resolved path to config.json. Useful for debugging config resolution or locating the file to edit manually.

Examples

sh
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.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",
  "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.json is invalid. Delete the file with rm "$(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.

Built with VitePress