> ## Documentation Index
> Fetch the complete documentation index at: https://starforge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The sf CLI

> Every command, grouped by what you are trying to do.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
uv tool install starforge-core     # or: pip install starforge-core
sf login --server https://starforge.your-company.com
sf status
sf update    # later, to upgrade
```

`sf` is the whole client. It creates the project, validates configs locally, packages and submits
jobs, follows logs, and manages datasets, models, plugins and environments.

<Info>
  Every flag table on these pages is generated from the CLI itself by
  `scripts/gen_cli_docs.py`, and CI fails if it drifts. What you read here is what `sf --help`
  prints.
</Info>

## Set up

| Command                         | What it does                                      |
| ------------------------------- | ------------------------------------------------- |
| [`sf init`](/en/cli/init)       | Create a StarForge project                        |
| [`sf login`](/en/cli/login)     | Log in to a deployment                            |
| [`sf logout`](/en/cli/logout)   | Log out                                           |
| [`sf status`](/en/cli/status)   | Your account, quota, and active jobs              |
| [`sf update`](/en/cli/update)   | Update `sf` itself                                |
| [`sf version`](/en/cli/version) | Version of the CLI, and of the server it talks to |

## Experiments

| Command                           | What it does                                            |
| --------------------------------- | ------------------------------------------------------- |
| [`sf new`](/en/cli/new)           | Create an experiment from a method template             |
| [`sf ls`](/en/cli/ls)             | List the experiments in this project                    |
| [`sf validate`](/en/cli/validate) | Check a config against the method declaration, locally  |
| [`sf methods`](/en/cli/methods)   | The method catalog, and one method's tunable parameters |
| [`sf recipe`](/en/cli/recipe)     | Inspect and upgrade an experiment's recipe lock         |

## Train

| Command                       | What it does                                |
| ----------------------------- | ------------------------------------------- |
| [`sf submit`](/en/cli/submit) | Submit a training job                       |
| [`sf sweep`](/en/cli/sweep)   | Submit a grid of variants                   |
| [`sf job`](/en/cli/job)       | Logs, status, samples, pause, resume, stop  |
| [`sf clean`](/en/cli/clean)   | Delete an experiment's checkpoints and logs |

## Artifacts and evaluation

| Command                       | What it does                               |
| ----------------------------- | ------------------------------------------ |
| [`sf export`](/en/cli/export) | Convert a checkpoint to HuggingFace format |
| [`sf eval`](/en/cli/eval)     | Run a recipe's native evaluation           |
| [`sf bench`](/en/cli/bench)   | Run standard benchmarks                    |
| [`sf serve`](/en/cli/serve)   | Start, extend and stop Playground sessions |

## Resources

| Command                           | What it does                                                  |
| --------------------------------- | ------------------------------------------------------------- |
| [`sf dataset`](/en/cli/dataset)   | Prepare, check, push and version datasets                     |
| [`sf model`](/en/cli/model)       | The model registry: register, promote, archive                |
| [`sf env`](/en/cli/env)           | Agent RL environments: list, push, inspect, register a runner |
| [`sf annotate`](/en/cli/annotate) | Preference annotation: pull, push, progress                   |
| [`sf plugin`](/en/cli/plugin)     | Publish, install and inspect plugins                          |

## Administration

| Command                     | What it does                              |
| --------------------------- | ----------------------------------------- |
| [`sf admin`](/en/cli/admin) | Users, roles, quotas, maintenance windows |

## Conventions

* **`-h` / `--help` works everywhere.** `sf job logs --help` is faster than finding the page.
* **The project root is found by `starforge.yaml`.** Run commands from anywhere inside the project.
* **State lives in `~/.forge/`** — the access token and the server address. Nothing else.
* **Job commands default to your most recent job.** `sf job logs` with no id follows the latest one.
* **References are `<owner>/<name>`**, with `@version` where versions exist:
  `alice/gsm8k-zh@v2`.

## Shell completion

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf --install-completion
```

Installs completion for your current shell. `--show-completion` prints the script instead, if you
would rather place it yourself.
