> ## 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.

# sf recipe

> Method lock (recipe.lock.json) status and upgrades

See [Recipes and Version Management](/en/concepts/recipes) for how the lock mechanism works.

## sf recipe status

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe status <EXP>       # Single experiment: field-level diff between the lock and the current catalog
sf recipe status --all       # Scan all of experiments / smoke
sf recipe status <EXP> --server   # Also handshake against the catalog published by the Console
```

Outputs a field-by-field diff: recipe version, digest, framework version, runtime\_id, SDK compatibility range. A diff does not mean something is broken — it means behavior may change after upgrading and requires explicit confirmation.

## sf recipe upgrade

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe upgrade <EXP>                             # Upgrade the lock (framework version unchanged)
sf recipe upgrade <EXP> --framework-version 0.9.0   # Also switch the framework version
sf recipe upgrade --all                             # Validate everything first, then write uniformly
sf recipe upgrade <EXP> --dry-run                   # Only show the diff, do not write files
```

| Option                    | Description                                                                      |
| ------------------------- | -------------------------------------------------------------------------------- |
| `--all`                   | Upgrade all experiments in the repository uniformly (validate first, then write) |
| `--dry-run`               | Only show the diff                                                               |
| `--framework-version`     | Switch the framework version while upgrading                                     |
| `--accept-runtime-change` | Explicit confirmation when the upgrade involves a runtime (image) change         |

<Tip>
  Upgrading rewrites `recipe.lock.json` — remember to commit, or your next submission will be blocked by a dirty working tree. In submission scenarios you can do it in one step with `sf submit --upgrade-recipe`.
</Tip>

## `sf recipe`

Manage recipe locks

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe <subcommand>
```

| Command             | Description                            |
| ------------------- | -------------------------------------- |
| `sf recipe ls`      | List every available method            |
| `sf recipe status`  | Show an experiment's lock drift        |
| `sf recipe sync`    | Sync published methods to this machine |
| `sf recipe upgrade` | Upgrade an experiment lock             |

### `sf recipe ls`

List every available method

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe ls [options]
```

| Option     | Description                      |
| ---------- | -------------------------------- |
| `--source` | Only one source: builtin \| user |

### `sf recipe status`

Show an experiment's lock drift

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe status [EXP] [options]
```

| Argument | Description                                         |
| -------- | --------------------------------------------------- |
| `EXP`    | Experiment name or path; omitting it requires --all |

| Option     | Description                                  |
| ---------- | -------------------------------------------- |
| `--all`    | Scan experiments/ and smoke/                 |
| `--server` | Also cross-check against the Console catalog |

### `sf recipe sync`

Sync published methods to this machine

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe sync [options]
```

| Option     | Description                                                                              |
| ---------- | ---------------------------------------------------------------------------------------- |
| `--server` | Console address (defaults to the one you logged into)                                    |
| `--prune`  | Whether to drop methods that exist locally but not on the platform (or were unpublished) |

### `sf recipe upgrade`

Upgrade an experiment lock

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf recipe upgrade [EXP] [options]
```

| Argument | Description                                            |
| -------- | ------------------------------------------------------ |
| `EXP`    | Experiment name or path; mutually exclusive with --all |

| Option                    | Description                                                                                  |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| `--all`                   | Validate everything first, then write in one go                                              |
| `--dry-run`               | Only show the diff, write nothing                                                            |
| `--framework-version`     | Also move to this exact framework version                                                    |
| `--accept-runtime-change` | When the locked framework version is gone from the catalog, fall back to the current default |
