config — Manage configuration

View or modify the global configuration file.

xskill config [OPTIONS]

Options:

  • -i, --init — Initialize config file with default values (default platforms, cache, registry).
  • -e, --edit — Open config in $EDITOR (defaults to vi)
  • -g, --get <key> — Get a config value by dot path (e.g., cache.enabled)
  • -s, --set <key=value> — Set a config value by dot path (e.g., cache.enabled=true)
  • -w, --show — Print the full loaded configuration as pretty JSON (merges defaults, e.g. fills in missing platforms). Output is uncolored and pipe-friendly.
  • -V, --validate — Validate the config file. Performs JSON syntax + strong-type structure checks, then full JSON Schema validation. Tries local schema files first ($XSKILL_SCHEMA, <config_dir>/schemas/xskill.schema.json, walk-up from the executable, <exe_dir>/../share/xskill/xskill.schema.json); if none found, fetches the schema from https://xskill.gcli.cn/xskill.schema.json (honoring the proxy config). Prints Valid <path> (schema: <source>) on success, or each error with its JSON path on failure (exit 1).

Example — read/set the proxy:

xskill config --get proxy
xskill config --set proxy=socks5h://127.0.0.1:40027
xskill config --validate

Examples

# Initialize config with defaults
xskill config --init

# Open config in editor
xskill config --edit

# Read a value
xskill config --get cache.enabled

# Set a value
xskill config --set cache.enabled=true