# taggor pin

> Pin a version of a component in ONE environment of a site: that environment keeps serving it, whatever publish, promote or rollback do, until taggor unpin

## taggor pin

Pin a version of a component in ONE environment of a site: that environment keeps serving it, whatever publish, promote or rollback do, until taggor unpin.

```sh title="Usage"
npx taggor pin <component> [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `<component>` | Component tag or id (cmp_...). Required. | - |
| `--site <value>` | The site: its id, or either of its two site keys (taggor sites list shows them). | - |
| `--environment <value>` | production (the live website) or staging (the test copy and localhost). Required when the site is named by its id; a site key already says which environment. | - |
| `--version <value>` | The version to pin: its id (ver_...) or its number (1.2.0). taggor versions `<component>` lists them. | - |

Also takes the [common options](https://taggor.dev/docs/reference/cli.md#common-options): `--api-url`, `--workspace`, `--verbose`, `--store`, `--json`, `--no-input`.

```sh title="Examples"
npx taggor pin price-card --site st_0123456789abcdefghjkmnpqrs --environment production --version 1.2.0
```

Exit codes: `0` ok, `1` generic, `2` usage, `3` unauthenticated, `4` not_found, `5` conflict, `7` rate_limited, `8` network, `9` forbidden. [What each code means](https://taggor.dev/docs/reference/cli.md#exit-codes).
