Skip to content
Documentation menu

Usage

Inside Claude Code the command is /forecast:forecast. The same engine also runs as a standalone CLI, covered at the end of this page.

Forecast a file

/forecast:forecast sales.csv

Detects the date and target columns, infers the frequency, and uses a default horizon for that frequency.

FrequencyDefault horizon
Hourly24
Daily28
Business daily20
Weekly13
Monthly12
Quarterly4
Yearly3

Set the horizon

/forecast:forecast sales.csv --horizon 30

--horizon is the number of future periods to forecast, in the data’s own frequency. The backtest uses the same horizon. If the history is too short to backtest at that length, the test horizon is shortened with a warning. Below a floor the run refuses and tells you the longest horizon the history can support.

Choose the target

/forecast:forecast revenue.csv --target revenue

Use --target when the file has several numeric columns. Without it, Claude asks which one you mean.

Flags

FlagPurpose
--horizon NNumber of future periods to forecast
--target COLName the column to forecast
--date COLName the date column instead of detecting it
--date-order dmy|mdyResolve day-first or month-first dates such as 01/02/2026
--output DIRWhere to write results (default ./forecast-output/<name>/)
--fill interpolate|zeroHow to fill missing timestamps
--where col=valueForecast one slice of a multi-column file. Repeatable.
--agg sum|meanHow to combine rows that share a timestamp

One series is forecast per run. Grouped forecasting (one forecast per store, product, and so on) is not in V1.

Invocation name

The command is /forecast:forecast. Claude Code namespaces plugin skills, and a bare /forecast does not work (tested on Claude Code 2.1.119).

Standalone CLI

The engine runs without Claude. forecast FILE is the same as forecast run FILE, and forecast profile FILE prints the dataset profile as JSON.

forecast sales.csv --horizon 30
forecast profile sales.csv

Without Claude you get the engine’s templated text report instead of a written explanation. Add --json to get the machine-readable result on stdout.

Run it from a clone of the repository with the bin/forecast wrapper, which uses uv, or install it as a tool with uv tool install ..

Exit codes

CodeMeaning
0ok
2usage error
3needs input: the data is ambiguous and the engine returns questions
4refused: the data can’t support a trustworthy forecast