# Command line

> Forecast, backtest and tune CSV or parquet files from a terminal.

Everything in the Python library also works on a CSV or Parquet file, straight from a terminal or a scheduler.

```bash
yhatmodels forecast sales.csv --h 7 --known price,promo --level 80,95 -o forecast.csv
yhatmodels evaluate sales.csv --h 7 --windows 3
yhatmodels tune sales.csv --h 7 --steps 300 -o my-tuned/
yhatmodels forecast sales.csv --h 7 --model my-tuned/
yhatmodels models
yhatmodels accept-license ChakraTS-OS-10M
```

Files are in long format, one row per series and timestamp, with the same column names as a
[DataFrame](https://yhatlabs.com/models/docs/open-models/data#dataframes).

## Commands

| Command | What it does |
|---|---|
| `forecast` | forecasts the next `--h` steps of every series; writes CSV to the screen, or to `-o` (CSV or Parquet) |
| `evaluate` | backtests against baselines and prints the summary; `-o` saves the per-series, per-window scores |
| `tune` | fine-tunes the model and saves it to the folder in `-o`; use it with `--model FOLDER` |
| `models` | lists the released models, their tasks and licenses |
| `accept-license` | accepts a model's license before its first download |

## Options

| Option | Meaning |
|---|---|
| `--h` | the horizon, in steps |
| `--level`, `--quantiles` | intervals (`80,95`) or quantile levels (`0.1,0.5,0.9`, or `all`) |
| `--known`, `--past` | covariate columns, comma-separated |
| `--future` | a file with the known columns' values over the next `h` steps |
| `--id-col`, `--time-col`, `--target-col` | column names; several target columns are forecast jointly |
| `--freq` | a pandas frequency alias, inferred when left out |
| `--model` | a released model's name, a Hugging Face repo id or a local folder |
| `--device` | `cuda`, `mps` or `cpu` (default: the best available) |
| `--preset` | `pro` or `fast` |
| `--cross-series` | read single-target series without covariates 16 at a time (or give a number) |
| `--windows`, `--step`, `--baselines`, `--metrics`, `--season` | `evaluate` only, as in [Backtesting](https://yhatlabs.com/models/docs/open-models/backtesting) |
| `--steps`, `--min-gain`, `--seed` | `tune` only, as in [Fine-tuning](https://yhatlabs.com/models/docs/open-models/fine-tuning) |
