config — Manage configuration

View or modify the global configuration file.

xskill config <COMMAND>

Subcommands:

  • init — Initialize config file with default values (default platforms, cache, registry). Built-in platform entries are saved in minimal form (name/enabled/builtin only) — guaranteed for all commands that write the config by Config::save().
  • edit — Open config in $EDITOR (defaults to vi)
  • get <key> — Get a config value by dot path (e.g., cache.enabled)
  • set <key=value> — Set a config value by dot path (e.g., cache.enabled=true)
  • show — Print the full loaded configuration as pretty JSON (merges defaults, e.g. fills in missing platforms). Output is uncolored and pipe-friendly.
  • 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).

--verbose and --help remain global flags; only the config actions are subcommands. Running xskill config without a subcommand prints help.

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