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...
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 TEXT Target column name(s), comma-separated. Yes -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--format TEXT Output format: table or json. No table
-o, --output PATH 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 TEXT Target column name(s), comma-separated. No -
--steps INTEGER Forecast horizon (number of steps). No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval TEXT Prediction interval, e.g. '0.1,0.9'. No -
--lags TEXT Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features TEXT Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--from-profile TEXT Load profile from JSON file or '-' for stdin. No -
--format TEXT Output format: table or json. No table
-o, --output PATH 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 TEXT Load plan bundle from JSON file or '-' for stdin. Yes -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--steps INTEGER Override forecast horizon. No -
--interval TEXT Override prediction interval, e.g. '0.1,0.9'. No -
--lags TEXT Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features TEXT Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--prompt TEXT Natural language domain knowledge to guide LLM plan refinement. No -
--llm TEXT LLM provider for plan refinement. No -
--base-url TEXT Custom LLM endpoint URL. No -
--api-key TEXT API key for the LLM provider. No -
--format TEXT Output format: table or json. No table
-o, --output PATH 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 TEXT Target column name(s), comma-separated. No -
--steps INTEGER Forecast horizon (number of steps). No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval TEXT Prediction interval, e.g. '0.1,0.9'. No -
--lags TEXT Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features TEXT Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--from-plan TEXT Load plan bundle from JSON file or '-' for stdin. No -
--format TEXT Output format: code or json. No code
-o, --output PATH 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 TEXT Target column name(s), comma-separated. No -
--steps INTEGER Forecast horizon (number of steps). No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval TEXT Prediction interval, e.g. '0.1,0.9'. No -
--lags TEXT Explicit lags as an int or comma-separated list, e.g. '1,2,3'. No -
--window-features TEXT Explicit window features as JSON array, e.g. '[{"stats": ["mean"], "window_size": 7}]'. No -
--initial-train-size INTEGER Initial training window size. No -
--fold-stride INTEGER 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 INTEGER 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 TEXT Load plan bundle from JSON file or '-' for stdin. No -
--format TEXT Output format: code or json. No code
-o, --output PATH 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 TEXT Target column name(s), comma-separated. No -
--steps INTEGER Forecast horizon (number of steps). No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string, e.g. '{"n_estimators": 200}'. No -
--interval TEXT Prediction interval, e.g. '0.1,0.9'. No -
--test-size TEXT 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 PATH CSV with future exogenous variables (prediction mode). No -
--from-plan TEXT Load plan bundle from JSON file or '-' for stdin. No -
--output-predictions PATH Save predictions as CSV. No -
--output-code PATH Save generated script to file. No -
--format TEXT 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 TEXT Target column name(s), comma-separated. No -
--steps INTEGER Forecast horizon (number of steps). No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--forecaster TEXT Override forecaster class. No -
--estimator TEXT Override estimator class. No -
--estimator-kwargs TEXT Estimator hyperparameters as JSON string. No -
--interval TEXT Prediction interval, e.g. '0.1,0.9'. No -
--initial-train-size INTEGER Initial training window size. No -
--fold-stride INTEGER 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 INTEGER 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 TEXT Optional prompt for LLM-assisted CV configuration. No -
--llm TEXT LLM provider for CV configuration. No -
--base-url TEXT Custom LLM endpoint URL. No -
--api-key TEXT API key for the LLM provider. No -
--from-plan TEXT Load plan bundle from JSON file or '-' for stdin. No -
--output-predictions PATH Save predictions as CSV. No -
--output-code PATH Save generated script to file. No -
--format TEXT 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 Path to CSV file for context. No -
-t, --target TEXT Target column name(s), comma-separated. No -
-d, --date-column TEXT Date/timestamp column. No -
-s, --series-id-column TEXT Series identifier column. No -
--steps INTEGER Forecast horizon (required when --data is provided). No -
--llm TEXT LLM provider, e.g. 'openai:gpt-4o-mini'. No -
--base-url TEXT Custom LLM endpoint URL. No -
--api-key TEXT 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 TEXT Comma-separated skill names to include. No -
--format TEXT 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