climate_ref.cli.config
#
View and update the REF configuration
ConfigFormat
#
ValidationFormat
#
edit(ctx)
#
Open ref.toml in the user's editor and warn if the result is invalid.
The editor is selected by Click from $VISUAL / $EDITOR. If no config file exists yet,
run ref config init first.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
get(ctx, key)
#
Print one effective configuration value.
Environment variables are already applied, so this shows the value the REF will use at runtime. Scalar values are printed alone on stdout for scripts; structured sections are printed as TOML.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
init(ctx, force=False, no_defaults=False)
#
Create a ref.toml configuration file for onboarding.
By default this writes a complete template with defaults included. --force is destructive:
it replaces any existing configuration file with a fresh template.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
list_(ctx, output_format=ConfigFormat.toml)
#
Print the current climate_ref configuration
If a configuration directory is provided, the configuration will attempt to load from the specified directory.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
set_(ctx, key, value)
#
Set one scalar configuration value and persist it to ref.toml.
The value is written to the file-backed configuration, even when environment variables shadow the effective runtime value.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
unset(ctx, key)
#
Reset one scalar configuration value to its default and persist it to ref.toml.
Structured values such as provider lists and executor config dictionaries must be edited directly.
Source code in packages/climate-ref/src/climate_ref/cli/config.py
validate(ctx, output_format=ValidationFormat.text)
#
Validate that ref.toml parses and matches the REF configuration schema.
The exit code is the CI contract: 0 means valid and 1 means invalid. JSON output includes a
Terraform-style valid flag, error count and diagnostics list.