CLI reference¶
The auto-generated output from Click for the stride CLI is shown below.
stride¶
Stride comands
Usage
stride [OPTIONS] COMMAND [ARGS]...
Options
- -c, --console-level <console_level>¶
Console log level
- Default:
'INFO'- Options:
TRACE | DEBUG | INFO | SUCCESS | WARNING | ERROR | CRITICAL
- -f, --file-level <file_level>¶
Console log level
- Default:
'DEBUG'- Options:
TRACE | DEBUG | INFO | SUCCESS | WARNING | ERROR | CRITICAL
- -r, --reraise-exceptions¶
Re-raise all stride exceptions. Useful for debugging errors.
- Default:
False
calculated-tables¶
Calculated table commands
Usage
stride calculated-tables [OPTIONS] COMMAND [ARGS]...
export¶
Export the specified calculated table to filename. Supports CSV and Parquet, inferred from the filename’s suffix.
Usage
stride calculated-tables export [OPTIONS] PROJECT_PATH
Options
- -f, --filename <filename>¶
Filename to create. Defaults to a CSV in the current directory. Supports CSV and Parquet, inferred from the file extension.
- --overwrite¶
Overwrite the output directory if it exists.
- Default:
False
- -s, --scenario <scenario>¶
Required Scenario name
- -t, --table-name <table_name>¶
Required calculated table name
Arguments
- PROJECT_PATH¶
Required argument
Examples:
$ stride calculated-tables export my_project
–scenario=baseline
—table-name=energy_intensity_res_hdi_population_load_shapes
–filename=custom_load_shapes.csv
list¶
List the calculated tables in the project and whether they are being overridden.
Usage
stride calculated-tables list [OPTIONS] PROJECT_PATH
Arguments
- PROJECT_PATH¶
Required argument
override¶
Override a scenario’s calculated table.
Usage
stride calculated-tables override [OPTIONS] PROJECT_PATH
Options
- -f, --filename <filename>¶
Required Filename of the new table
- -s, --scenario <scenario>¶
Required Scenario name
- -t, --table-name <table_name>¶
Required calculated table name
Arguments
- PROJECT_PATH¶
Required argument
Examples:
$ stride calculated-tables override my_project
–scenario=custom_load_shapes
—table-name=energy_projection_res_load_shapes
–filename=custom_load_shapes.csv
remove-override¶
Remove the overridden calculated table.
Usage
stride calculated-tables remove-override [OPTIONS] PROJECT_PATH
Options
- -s, --scenario <scenario>¶
Required Scenario name
- -t, --table-name <table_name>¶
Required Overridden calculated table name
Arguments
- PROJECT_PATH¶
Required argument
Examples:
$ stride calculated-tables remove-override my_project
–scenario=baseline
—table-name=energy_intensity_res_hdi_population_load_shapes_override
show¶
Print a limited number of rows of the table to the console.
Usage
stride calculated-tables show [OPTIONS] PROJECT_PATH TABLE
Options
- -s, --scenario <scenario>¶
Project scenario
- Default:
'baseline'
- -l, --limit <limit>¶
Max number of rows in the table to show.
- Default:
20
Arguments
- PROJECT_PATH¶
Required argument
- TABLE¶
Required argument
data-tables¶
Data table commands
Usage
stride data-tables [OPTIONS] COMMAND [ARGS]...
list¶
List the data tables available in any project.
Usage
stride data-tables list [OPTIONS]
show¶
Print a limited number of rows of the data table to the console.
Usage
stride data-tables show [OPTIONS] PROJECT_PATH DATA_TABLE_NAME
Options
- -s, --scenario <scenario>¶
Project scenario
- Default:
'baseline'
- -l, --limit <limit>¶
Max number of rows in the table to show.
- Default:
20
Arguments
- PROJECT_PATH¶
Required argument
- DATA_TABLE_NAME¶
Required argument
datasets¶
Dataset commands
Usage
stride datasets [OPTIONS] COMMAND [ARGS]...
download¶
Download a dataset from a remote repository.
NAME is the name of a known dataset (use ‘stride datasets list-remote’ to see available datasets). Alternatively, use –url and –subdirectory to download from a custom repository.
Usage
stride datasets download [OPTIONS] [NAME]
Options
- -d, --data-dir <data_dir>¶
Directory where the dataset will be placed. Defaults to STRIDE_DATA_DIR env var or ~/.stride/data.
- -v, --version <version>¶
Release version/tag to download. Defaults to the latest release.
- --url <url>¶
GitHub repository URL for custom datasets (e.g., https://github.com/owner/repo)
- --subdirectory <subdirectory>¶
Subdirectory within the repository containing the dataset. Required with –url.
Arguments
- NAME¶
Optional argument
Examples:
Download a known dataset to the default location (~/.stride/data):
$ stride datasets download global
Download to a specific directory:
$ stride datasets download global –data-dir ./my_data
Download a specific version:
$ stride datasets download global –version v0.1.0.beta.1
Download from a custom repository:
$ stride datasets download –url https://github.com/user/repo –subdirectory data
Use STRIDE_DATA_DIR environment variable to set a persistent default:
$ export STRIDE_DATA_DIR=/path/to/data
$ stride datasets download global
list-countries¶
List the countries available in a dataset.
Usage
stride datasets list-countries [OPTIONS]
Options
- -D, --dataset <dataset>¶
Name of dataset. Examples include ‘global’ and ‘global-test’.
- Default:
'global'
- --data-dir <data_dir>¶
Directory containing datasets. Defaults to STRIDE_DATA_DIR env var or ~/.stride/data.
Examples:
List countries in the full dataset:
$ stride datasets list-countries
List countries in the test dataset:
$ stride datasets list-countries -D global-test
List countries using a custom data directory:
$ stride datasets list-countries –data-dir /path/to/data
list-remote¶
List known datasets available for download.
Usage
stride datasets list-remote [OPTIONS]
palette¶
Palette commands
Usage
stride palette [OPTIONS] COMMAND [ARGS]...
get-default¶
Show the current default user palette.
Examples:
$ stride palette get-default
Usage
stride palette get-default [OPTIONS]
init¶
Initialize a new palette with colors assigned to labels.
Sources (optional):
–from-project: Initialize from a project (queries database for unique labels or copies existing palette)
–from-user: Copy from an existing user palette in ~/.stride/palettes/
(No source): Create an empty palette for manual population via TUI
The palette can be saved to user space (default) or embedded in a project.
Usage
stride palette init [OPTIONS]
Options
- --name <name>¶
Required Name for the new palette
- --from-project <from_project>¶
Initialize from project (query database for labels or copy existing palette)
- --from-user <from_user>¶
Copy from an existing user palette
- --project¶
Save to project palette (requires –from-project)
- --user¶
Save to user palette (default)
Examples:
# Create an empty palette (for manual population)
$ stride palette init –name=my_palette –user
# Initialize from project (queries database for unique labels)
$ stride palette init –name=my_palette –from-project=test_project
# Initialize from existing user palette
$ stride palette init –name=my_palette –from-user=base_palette
# Save to user (default) or project location
$ stride palette init –name=my_palette –from-project=test_project –user
$ stride palette init –name=my_palette –from-project=test_project –project
list¶
List available color palettes.
Usage
stride palette list [OPTIONS]
Options
- --project¶
List project palettes (requires project path)
- --user¶
List user palettes (default)
refresh¶
Refresh palette colors to use correct themes for each category.
This fixes palettes where metrics might be using model year colors or other incorrect theme assignments. It reassigns all colors while preserving the labels in each category.
Usage
stride palette refresh [OPTIONS] PROJECT_PATH
Arguments
- PROJECT_PATH¶
Required argument
Examples:
# Fix palette colors for a project
$ stride palette refresh my_project
set-default¶
Set or clear the default user palette.
The default user palette will be automatically used when starting the dashboard unless overridden with –user-palette option.
Examples:
Set a default palette: $ stride palette set-default my_palette
Clear the default palette: $ stride palette set-default
Usage
stride palette set-default [OPTIONS] [PALETTE_NAME]
Arguments
- PALETTE_NAME¶
Optional argument
view¶
View a color palette in an interactive TUI.
For project palettes, NAME should be the path to the project directory. For user palettes, NAME should be the palette name.
Usage
stride palette view [OPTIONS] NAME
Options
- --project¶
View a project palette (default)
- --user¶
View a user palette
Arguments
- NAME¶
Required argument
Examples:
$ stride palette view test_project –project
$ stride palette view my_palette –user
projects¶
Project commands
Usage
stride projects [OPTIONS] COMMAND [ARGS]...
create¶
Create a Stride project.
Usage
stride projects create [OPTIONS] CONFIG_FILE
Options
- -d, --directory <directory>¶
Base directory for the project
- Default:
PosixPath('.')
- --overwrite¶
Overwrite the output directory if it exists.
- Default:
False
- -D, --dataset <dataset>¶
Name of dataset. Examples include ‘global’ and ‘global-test’.
- --data-dir <data_dir>¶
Directory containing datasets. Defaults to STRIDE_DATA_DIR env var or ~/.stride/data.
Arguments
- CONFIG_FILE¶
Required argument
Examples:
$ stride projects create my_project.json5
export-energy-projection¶
Export the energy projection table to a file.
Usage
stride projects export-energy-projection [OPTIONS] PROJECT_PATH
Options
- -f, --filename <filename>¶
Exported filename. Supports .csv and .parquet.
- Default:
'energy_projection.csv'
- --overwrite¶
Overwrite the exported filename if it exists.
- Default:
False
Arguments
- PROJECT_PATH¶
Required argument
Examples:
$ stride projects export-energy-projection test_project
$ stride projects export-energy-projection test_project -f energy_projection.parquet
scenarios¶
Scenario commands
Usage
stride scenarios [OPTIONS] COMMAND [ARGS]...
list¶
List the scenarios stored in the project.
Usage
stride scenarios list [OPTIONS] PROJECT_PATH
Arguments
- PROJECT_PATH¶
Required argument
view¶
Start the STRIDE dashboard UI.
If PROJECT_PATH is provided, opens the UI with that project loaded. If no project is provided, opens the UI without a project where you can load one using the sidebar.
By default, if a default user palette is set, it will override the project palette. Use –no-default-palette to disable this behavior, or –user-palette to specify a different user palette to use.
Usage
stride view [OPTIONS] [PROJECT_PATH]
Options
- --host <host>¶
Host to run the UI server on
- Default:
'127.0.0.1'
- --port <port>¶
Port to run the UI server on
- Default:
8050
- --debug¶
Run in debug mode
- Default:
False
- --user-palette <user_palette>¶
Override project palette with a user palette
- --no-default-palette¶
Disable automatic loading of default user palette
Arguments
- PROJECT_PATH¶
Optional argument