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.csvDetects the date and target columns, infers the frequency, and uses a default horizon for that frequency.
| Frequency | Default horizon |
|---|---|
| Hourly | 24 |
| Daily | 28 |
| Business daily | 20 |
| Weekly | 13 |
| Monthly | 12 |
| Quarterly | 4 |
| Yearly | 3 |
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 revenueUse --target when the file has several numeric columns. Without it, Claude asks which one you mean.
Flags
| Flag | Purpose |
|---|---|
--horizon N | Number of future periods to forecast |
--target COL | Name the column to forecast |
--date COL | Name the date column instead of detecting it |
--date-order dmy|mdy | Resolve day-first or month-first dates such as 01/02/2026 |
--output DIR | Where to write results (default ./forecast-output/<name>/) |
--fill interpolate|zero | How to fill missing timestamps |
--where col=value | Forecast one slice of a multi-column file. Repeatable. |
--agg sum|mean | How 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.csvWithout 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
| Code | Meaning |
|---|---|
0 | ok |
2 | usage error |
3 | needs input: the data is ambiguous and the engine returns questions |
4 | refused: the data can’t support a trustworthy forecast |