CLI#
The ref command-line interface (CLI) is the primary way to interact with the Climate-REF framework.
This CLI tool is installed as part of the climate-ref package and provides commands for managing configurations, datasets, diagnostics, and more.
app#
A CLI for the Assessment Fast Track Rapid Evaluation Framework
This CLI provides a number of commands for managing and executing diagnostics.
Usage#
app [OPTIONS] COMMAND [ARGS]...
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--configuration-directory |
Configuration directory | No | - |
-v, --verbose |
Set the log level to DEBUG | No | - |
-q, --quiet |
Set the log level to WARNING | No | - |
--log-level |
Set the level of logging information to display | No | - |
--version |
Print the version and exit | No | - |
--install-completion |
Install completion for the current shell. | No | - |
--show-completion |
Show completion for the current shell, to copy it or customize the installation. | No | - |
--help |
Show this message and exit. | No | - |
Commands#
| Name | Description |
|---|---|
solve |
Solve for executions that require... |
doctor |
Check this deployment for data and... |
config |
View and update the REF configuration |
datasets |
View and ingest input datasets |
db |
Database management commands |
diagnostics |
View diagnostic metadata |
executions |
View execution groups and their results |
providers |
Manage the REF providers. |
test-cases |
Test data management commands for... |
celery |
Managing remote celery workers |
Subcommands#
app solve#
Solve for executions that require recalculation
This may trigger a number of additional calculations depending on what data has been ingested since the last solve. This command will block until all executions have been solved or the timeout is reached.
Filters can be applied to limit the diagnostics and providers that are considered, see the options
--diagnostic and --provider for more information.
Usage#
app solve [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--dry-run / --no-dry-run |
Do not execute any diagnostics [default: no-dry-run] | No | - |
--execute / --no-execute |
Solve the newly identified executions [default: execute] | No | - |
--timeout |
Timeout in seconds for waiting on executions to complete. Defaults to 6 hours. Set to 0 (or a negative value) to wait with no time limit. Ignored when --no-wait is used. [default: 21600] | No | - |
--wait / --no-wait |
Wait for executions to complete before exiting. Use --no-wait to queue executions and exit immediately. [default: wait] | No | - |
--one-per-provider / --no-one-per-provider |
Limit to one execution per provider. This is useful for testing [default: no-one-per-provider] | No | - |
--one-per-diagnostic / --no-one-per-diagnostic |
Limit to one execution per diagnostic. This is useful for testing [default: no-one-per-diagnostic] | No | - |
--diagnostic |
Filters executions by the diagnostic slug. Diagnostics will be included if any of the filters match a case-insensitive subset of the diagnostic slug. Multiple values can be provided | No | - |
--provider |
Filters executions by provider slug. Providers will be included if any of the filters match a case-insensitive subset of the provider slug. Multiple values can be provided | No | - |
--exclude-diagnostic |
Excludes diagnostics by slug or provider/diagnostic pair. Matching is exact and case-insensitive, unlike --diagnostic. For example, --exclude-diagnostic ilamb/thetao-woa2023-surface. Multiple values can be provided | No | - |
--dataset-filter |
Filter input datasets by facet values using key=value syntax. For example, --dataset-filter source_id=ACCESS-CM2 --dataset-filter variable_id=tas. Multiple values for the same facet are ORed (include any match), different facets are ANDed (must match all). Multiple values can be provided | No | - |
--limit |
Maximum number of executions to run. If not set, all executions are run. | No | - |
--rerun-failed / --no-rerun-failed |
Re-run all previously failed executions, even if the execution group is not dirty. By default, failed executions are only retried if explicitly flagged dirty. [default: no-rerun-failed] | No | - |
--check-health / --no-check-health |
Health check each provider before solving and skip the diagnostics of unhealthy ones. The command then exits non-zero. Only applies to executors that run diagnostics on this host. [default: check-health] | No | - |
--help |
Show this message and exit. | No | - |
app doctor#
Check this deployment for data and configuration problems.
Use --format markdown to produce a report,
including a description of this deployment that can be pasted into a bug report.
Exits non-zero if any error is found, or any warning when --strict is used.
Usage#
app doctor [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--format |
Output format: 'text' (default), 'markdown' to paste into an issue, or 'json'. [default: text] | No | - |
--verbose / --quiet |
Include the explanation and remedy for each finding. [default: verbose] | No | - |
--strict / --no-strict |
Exit non-zero for warnings as well as errors. [default: no-strict] | No | - |
--environment / --no-environment |
Include a description of this deployment. On by default for the markdown and json formats. | No | - |
--list |
List the available checks and where they came from, then exit. | No | - |
--help |
Show this message and exit. | No | - |
app config#
View and update the REF configuration
Usage#
app config [OPTIONS] COMMAND [ARGS]...
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
Subcommands#
app config list#
Print the current climate_ref configuration
If a configuration directory is provided, the configuration will attempt to load from the specified directory.
Usage#
app config list [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--format |
Output format: 'toml' (default) or machine-readable 'json'. [default: toml] | No | - |
--help |
Show this message and exit. | No | - |
app config init#
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.
Usage#
app config init [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--force |
Overwrite an existing ref.toml with a fresh template. | No | - |
--no-defaults |
Write a minimal template that omits default values. | No | - |
--help |
Show this message and exit. | No | - |
app config get#
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.
Usage#
app config get [OPTIONS] {key}
Arguments#
| Name | Description | Required |
|---|---|---|
key |
Dotted configuration key | Yes |
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
app config set#
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.
Usage#
app config set [OPTIONS] {key} {value}
Arguments#
| Name | Description | Required |
|---|---|---|
key |
Dotted scalar configuration key | Yes |
value |
New value | Yes |
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
app config unset#
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.
Usage#
app config unset [OPTIONS] {key}
Arguments#
| Name | Description | Required |
|---|---|---|
key |
Dotted scalar configuration key | Yes |
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
app config edit#
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.
Usage#
app config edit [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
app config validate#
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.
Usage#
app config validate [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--format |
Output format: 'text' (default) or machine-readable 'json'. [default: text] | No | - |
--help |
Show this message and exit. | No | - |
app datasets#
View and ingest input datasets
The metadata from these datasets are stored in the database so that they can be used to determine which executions are required for a given diagnostic without having to re-parse the datasets.
Usage#
app datasets [OPTIONS] COMMAND [ARGS]...
Arguments#
No arguments available
Options#
| Name | Description | Required | Default |
|---|---|---|---|
--help |
Show this message and exit. | No | - |
Subcommands#
app datasets list#
List the datasets that have been ingested
The data catalog is sorted by the date that the dataset was ingested (first = newest).
By default only the latest, non-retracted version of each dataset is listed, matching what
the solver would select. Pass --include-retracted to also see retracted datasets (see
the retracted_at column). This also disables latest-only deduplication so every version is
listed, since otherwise a retracted newer version could outrank and hide a live older one.
Usage#
app datasets list [OPTIONS]
Arguments#
No arguments available
Options#
| Name | Description | Required | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
--source-type |
Type of source dataset [default: cmip6] | No | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--include-files / --no-include-files |
Include files in the output [default: no-include-files] | No | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--include-retracted / --no-include-retracted |
Include retracted datasets in the output. Off by default, so the listing matches solve-time eligibility, and a retracted dataset is never shown masking the live version that replaced it. Passing this flag also disables latest-only deduplication, so every version of every dataset is listed. Keeping the deduplication on would let a retracted newer version outrank and hide a live older one. [default: no-include-retracted] | No | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--limit |
Limit the number of datasets (or files when using --include-files) to display to this number. [default: 100; x>=0] | No | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--dataset-filter |
Filter datasets by facet values using key=value syntax. For example, --dataset-filter source_id=ACCESS-CM2 --dataset-filter variable_id=tas. Multiple values for the same facet are ORed (include any match), different facets are ANDed (must match all). Multiple values can be provided | No | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--format |