# taggor components

> The components of the workspace. Usage, options, examples and exit codes.

## taggor components

The components of the workspace.

Subcommands: `taggor components list`, `taggor components archive`, `taggor components restore`.

## taggor components list

List the components of the workspace with the version each channel points to; `--archived` lists the archived ones.

```sh title="Usage"
npx taggor components list [options]
```

| Argument | What it does | Default |
| --- | --- | --- |
| `--archived` | List only the archived components (no site serves them, they take no new version and still hold their tag; the sites keep the attachment). | - |

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 components list
npx taggor components list --archived
```

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

## taggor components archive

Archive a component: no site serves it any more and it leaves the list, while its tag, versions, data and the sites' attachments are kept until taggor components restore.

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

| Argument | What it does | Default |
| --- | --- | --- |
| `<component>` | Component tag or id (cmp_...). Required. | - |
| `--yes` | Skip the question a terminal asks before archiving (never needed without a terminal). | - |

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 components archive price-card --yes
```

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

## taggor components restore

Restore an archived component to the list and to the sites that had it.

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

| Argument | What it does | Default |
| --- | --- | --- |
| `<component>` | Component tag or id (cmp_...). Required. | - |

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 components restore price-card
```

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