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

> Plugin hub: publish, install, lock, and governance

See [Plugin Hub](/en/extend/overview) for the workflow walkthrough.

## Browse

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin ls                        # Plugins on the platform
sf plugin info <owner>/<name>       # Manifest, version history, digest
```

## Install and Lock

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin install <owner>/<name>                # Download to local forge_plugins/ (latest version by default)
sf plugin install <owner>/<name> --exp my-grpo  # Lock into the experiment's plugins.lock.json
sf plugin remove <owner>/<name> --exp my-grpo   # Remove the reference from the experiment lock
```

| `install` option | Description                                                                                                             |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `-e, --exp`      | Lock into that experiment: referenced with the JobSpec at submission, and injected into the job package by the platform |

## Publish

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin publish ./my-plugin                 # The directory must contain plugin.yaml
sf plugin publish ./my-plugin --owner team-x  # Admins can work across namespaces
```

Validated at publish time: entry module exists, no reserved top-level names taken, package size precheck. **Versions are immutable** — iterate by publishing a new version.

## Governance (admin)

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin disable <owner>/<name>    # Not referenceable by new jobs; history is kept
sf plugin enable <owner>/<name>
```

## `sf plugin`

Manage plugins

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

| Command             | Description                        |
| ------------------- | ---------------------------------- |
| `sf plugin disable` | Disable a plugin                   |
| `sf plugin enable`  | Enable a plugin (admin)            |
| `sf plugin info`    | Show a plugin's details            |
| `sf plugin install` | Install a plugin                   |
| `sf plugin ls`      | List the plugins on the platform   |
| `sf plugin publish` | Publish a plugin version           |
| `sf plugin remove`  | Remove a plugin from an experiment |

### `sf plugin disable`

Disable a plugin

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin disable <REF>
```

| Argument | Description                                           |
| -------- | ----------------------------------------------------- |
| `REF`    | Plugin id: \<owner>/\<name>\[@version] (**required**) |

No options beyond `--help`.

### `sf plugin enable`

Enable a plugin (admin)

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin enable <REF>
```

| Argument | Description                                           |
| -------- | ----------------------------------------------------- |
| `REF`    | Plugin id: \<owner>/\<name>\[@version] (**required**) |

No options beyond `--help`.

### `sf plugin info`

Show a plugin's details

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin info <REF>
```

| Argument | Description                                           |
| -------- | ----------------------------------------------------- |
| `REF`    | Plugin id: \<owner>/\<name>\[@version] (**required**) |

No options beyond `--help`.

### `sf plugin install`

Install a plugin

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin install <REF> [options]
```

| Argument | Description                                                                   |
| -------- | ----------------------------------------------------------------------------- |
| `REF`    | Plugin id: \<owner>/\<name>\[@version], defaults to the latest (**required**) |

| Option        | Description                                                                                                          |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| `--exp`, `-e` | Lock it to this experiment: referenced with the JobSpec on submission, injected into the job package by the platform |

### `sf plugin ls`

List the plugins on the platform

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin ls
```

No options beyond `--help`.

### `sf plugin publish`

Publish a plugin version

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin publish <PATH> [options]
```

| Argument | Description                     |
| -------- | ------------------------------- |
| `PATH`   | Plugin directory (**required**) |

| Option    | Description                                                                 |
| --------- | --------------------------------------------------------------------------- |
| `--owner` | Target namespace (only an admin can cross namespaces; defaults to your own) |

### `sf plugin remove`

Remove a plugin from an experiment

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sf plugin remove <REF> [options]
```

| Argument | Description                                |
| -------- | ------------------------------------------ |
| `REF`    | Plugin id: \<owner>/\<name> (**required**) |

| Option        | Description                            |
| ------------- | -------------------------------------- |
| `--exp`, `-e` | Experiment name or path (**required**) |
