CLI Referenceconfig command
config command
Manage the project configuration file (view, save, generate-default).
Synopsis
uv run python -m scripts.cli config [ACTION] [OPTIONS]Actions
view
Print the current config as JSON or YAML.
uv run python -m scripts.cli config view --path ./config.yaml
uv run python -m scripts.cli config view --path ./config.yaml --output-format yaml| Option | Default | Notes |
|---|---|---|
--path | ./config.yaml | Path to config file |
--output-format | json | json or yaml |
When --path is omitted, the CLI uses ./config.yaml. If that default file is missing or empty, load_config() populates it with ProjectConfig() defaults.
save
Load an existing config, validate it, and write it back. If the file doesn't exist, creates a new default.
uv run python -m scripts.cli config save --path ./config.yamlUseful after manually editing config.yaml — catches validation errors before the next CI run.
generate-default
Write a fresh ProjectConfig() with all Pydantic defaults to disk. Prompts before overwriting an existing file.
uv run python -m scripts.cli config generate-default --path ./config.yamlNotes
- Config files are always written as YAML (via
PyYAML). - The config is serialized with
mode="json"to produce clean, safe-loadable YAML (avoids Python-object tags). load_config()validates the file on load — a malformed config fails fast.