Skip to content

CLI

skforecast-ai

Deterministic forecasting assistant powered by skforecast.

Usage

skforecast-ai [OPTIONS] COMMAND [ARGS]...

Arguments

No arguments available

Options

Name Description Required Default
--version Show version. 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 -

Commands

Name Description
profile Profile a dataset and recommend a...
plan Generate a detailed forecasting plan from...
refine-plan Refine an existing forecasting plan by...
forecast-code Generate a complete Python forecasting...
backtest-code Generate a complete Python backtesting...
forecast Run end-to-end forecasting and report...
backtest Run backtesting evaluation and report...
compare Compare several forecasters and report a...
ask Ask a forecasting question using an LLM.
config Manage persistent configuration.

Subcommands

profile

Profile a dataset and recommend a forecaster + estimator.

Usage

skforecast-ai profile [OPTIONS] {data}

Arguments

Name Description Required
data Path or URL to CSV file. Yes

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. Yes -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--format Output format: table or json. No table
-o, --output Write output to file. No -
-q, --quiet Suppress spinners. No False

plan

Generate a detailed forecasting plan from a dataset.

Usage

skforecast-ai plan [OPTIONS][data]

Arguments

Name Description Required
data Path or URL to CSV file. No

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--lags Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--from-profile Load profile from JSON file or '-' for stdin. No -
--format Output format: table or json. No table
-o, --output Write output to file. No -
-q, --quiet Suppress spinners. No False

refine-plan

Refine an existing forecasting plan by overriding specific fields or using LLM guidance.

Usage

skforecast-ai refine-plan [OPTIONS]

Arguments

No arguments available

Options

Name Description Required Default
--from-plan Load plan bundle from JSON file or '-' for stdin. Yes -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--steps Override forecast horizon. No -
--interval Override prediction interval, e.g. '0.1,0.9'. No -
--lags Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--prompt Natural language domain knowledge to guide LLM plan refinement. No -
--llm LLM provider for plan refinement. No -
--base-url Custom LLM endpoint URL. No -
--api-key API key for the LLM provider. No -
--format Output format: table or json. No table
-o, --output Write output to file. No -
-q, --quiet Suppress spinners. No False

forecast-code

Generate a complete Python forecasting script.

Usage

skforecast-ai forecast-code [OPTIONS][data]

Arguments

Name Description Required
data Path or URL to CSV file. No

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--lags Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--from-plan Load plan bundle from JSON file or '-' for stdin. No -
--format Output format: code or json. No code
-o, --output Write output to file. No -
-q, --quiet Suppress spinners. No False

backtest-code

Generate a complete Python backtesting script without executing it.

Usage

skforecast-ai backtest-code [OPTIONS][data]

Arguments

Name Description Required
data Path or URL to CSV file. No

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--lags Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--initial-train-size Initial training window size. No -
--fold-stride Fold stride (step size between folds). No -
--refit / --no-refit Whether to refit the model each fold. No no-refit
--fixed-train-size / --expanding-train Fixed or expanding training window. No fixed-train-size
--gap Gap between training and test sets. No 0
--allow-incomplete-fold / --no-incomplete-fold Allow last fold with fewer observations. No allow-incomplete-fold
--from-plan Load plan bundle from JSON file or '-' for stdin. No -
--format Output format: code or json. No code
-o, --output Write output to file. No -
-q, --quiet Suppress spinners. No False

forecast

Run end-to-end forecasting and report metrics + predictions.

Usage

skforecast-ai forecast [OPTIONS] {data}

Arguments

Name Description Required
data Path to CSV file. Yes

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--test-size Evaluation test set size: int (last N obs), float in (0,1) (fraction), or a date (test set start). When omitted, forecasts the future. No -
--exog CSV with future exogenous variables (prediction mode). No -
--from-plan Load plan bundle from JSON file or '-' for stdin. No -
--output-predictions Save predictions as CSV. No -
--output-code Save generated script to file. No -
--format Output format: table or json. No table
-q, --quiet Suppress spinners. No False

backtest

Run backtesting evaluation and report metrics + predictions.

Usage

skforecast-ai backtest [OPTIONS] {data}

Arguments

Name Description Required
data Path to CSV file. Yes

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--forecaster Override forecaster class. No -
--estimator Override estimator class. No -
--estimator-kwargs Estimator hyperparameters as JSON string. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--initial-train-size Initial training window size. No -
--fold-stride Fold stride (step size between folds). No -
--refit / --no-refit Whether to refit the model each fold. No no-refit
--fixed-train-size / --expanding-train Fixed or expanding training window. No fixed-train-size
--gap Gap between training and test sets. No 0
--allow-incomplete-fold / --no-incomplete-fold Allow last fold with fewer observations. No allow-incomplete-fold
--prompt Optional prompt for LLM-assisted CV configuration. No -
--llm LLM provider for CV configuration. No -
--base-url Custom LLM endpoint URL. No -
--api-key API key for the LLM provider. No -
--from-plan Load plan bundle from JSON file or '-' for stdin. No -
--output-predictions Save predictions as CSV. No -
--output-code Save generated script to file. No -
--format Output format: table or json. No table
-q, --quiet Suppress spinners. No False

compare

Compare several forecasters and report a ranked leaderboard.

Usage

skforecast-ai compare [OPTIONS] {data}

Arguments

Name Description Required
data Path to CSV file. Yes

Options

Name Description Required Default
-t, --target Target column name(s), comma-separated. No -
--steps Forecast horizon (number of steps). No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--candidates Candidate configs as JSON array of [name, config] pairs. When omitted, candidates are built from the profile. No -
--metric Metric(s) to compute, comma-separated. The first ranks the table. No -
--interval Prediction interval, e.g. '0.1,0.9'. No -
--initial-train-size Initial training window size. No -
--fold-stride Fold stride (step size between folds). No -
--refit / --no-refit Whether to refit the model each fold. No no-refit
--fixed-train-size / --expanding-train Fixed or expanding training window. No fixed-train-size
--gap Gap between training and test sets. No 0
--allow-incomplete-fold / --no-incomplete-fold Allow last fold with fewer observations. No allow-incomplete-fold
--from-profile Load profile from JSON file or '-' for stdin. No -
--output-code Save the winning configuration's script to file. No -
--format Output format: table or json. No table
-q, --quiet Suppress spinners. No False

ask

Ask a forecasting question using an LLM.

Usage

skforecast-ai ask [OPTIONS] {prompt}

Arguments

Name Description Required
prompt Natural-language question about forecasting. Yes

Options

Name Description Required Default
--data Path to CSV file for context. No -
-t, --target Target column name(s), comma-separated. No -
-d, --date-column Date/timestamp column. No -
-s, --series-id-column Series identifier column. No -
--steps Forecast horizon (required when --data is provided). No -
--llm LLM provider, e.g. 'openai:gpt-4o-mini'. No -
--base-url Custom LLM endpoint URL. No -
--api-key API key for the LLM provider. No -
--send-data-to-llm / --no-send-data-to-llm Allow sending raw data to the LLM. No -
--skills Comma-separated skill names to include. No -
--format Output format: text or json. No text
-q, --quiet Suppress spinners. No False

config

Manage persistent configuration.

Usage

skforecast-ai config [OPTIONS] COMMAND [ARGS]...

Arguments

No arguments available

Options

No options available

Subcommands

show

Display current configuration.

Returns

None

Usage

skforecast-ai config show [OPTIONS]

Arguments

No arguments available

Options

No options available

set

Set a configuration value.

Parameters

key : str Config key in dotted notation (e.g. 'llm.provider'). value : str Value to set.

Returns

None

Usage

skforecast-ai config set [OPTIONS] {key} {value}

Arguments
Name Description Required
key Config key (e.g. 'llm.provider'). Yes
value Value to set. Yes
Options

No options available

path

Print the config file location.

Returns

None

Usage

skforecast-ai config path [OPTIONS]

Arguments

No arguments available

Options

No options available