# oseq operator CLI (https://docs.opensequence.dev/sdks/cli)

What the oseq operator CLI does: migrations, projects, API keys, encryption keys and health, with every command and option.

<Note>This page is generated from `apps/server/src/cli.ts` by `pnpm generate`. Do not edit it by hand; change the source and regenerate.</Note>

`oseq` (version 0.1.0) ships in the server image and in the `@opensequence/server` package. Every command is a thin wrapper over the same use cases the API exposes, so the docs for the API are the docs for the CLI. It reads the same `SEQ_*` environment as the server (it needs `SEQ_DB_DSN` and `SEQ_ENCRYPTION_KEYS`; `SEQ_ADMIN_TOKEN` is not needed).

```bash
# in the image
docker compose exec opensequence node dist/cli.js projects create acme --name "Acme CRM"
# from the repository
pnpm oseq -- projects create acme --name "Acme CRM"
```

## Commands [#commands]

### `oseq secrets` [#oseq-secrets]

Encryption keys

### `oseq secrets new-key` [#oseq-secrets-new-key]

Print a new SEQ_ENCRYPTION_KEYS entry (id:base64 of 32 random bytes)

### `oseq migrate` [#oseq-migrate]

Apply the seq and auth migrations

### `oseq projects` [#oseq-projects]

Tenants

### `oseq projects create <slug>` [#oseq-projects-create-slug]

Create a project and print its first admin API key (shown once)

| Option | Required | Default | Meaning |
| --- | --- | --- | --- |
| `-n, --name <name>` | no |  | display name |

### `oseq projects list` [#oseq-projects-list]

### `oseq api-keys` [#oseq-api-keys]

Project API keys

### `oseq api-keys create <project>` [#oseq-api-keys-create-project]

| Option | Required | Default | Meaning |
| --- | --- | --- | --- |
| `-s, --scopes <scopes>` | yes |  | comma-separated: read,enroll,admin |
| `-n, --name <name>` | no | `cli` | label |

### `oseq health` [#oseq-health]

Queue depths and job state


<Warning>The architecture document also lists `oseq secrets rotate`, `oseq webhooks replay` and `oseq queue dead list | replay`. They are not implemented yet: rotate keys through the auth module's `rotateKeys()`, replay deliveries through `POST /v1/webhooks/deliveries/\{id\}/replay`.</Warning>
