> ## Documentation Index
> Fetch the complete documentation index at: https://voyant.travel/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Command reference

> Every Voyant CLI command, grouped by area, with flags and what each one does.

Run `voyant --help` for inline usage, and `voyant <command> --help` where a command has its own usage. Global flags: `--help` / `-h` and `--version` / `-v`.

## Open-source commands

### Scaffolding

<ResponseField name="voyant new <name> [--template <name|path>]">
  Scaffold a new project from a template. `--template operator` uses the built-in operator application; you can also pass a path to a local starter directory.
</ResponseField>

### Code generation

<ResponseField name="voyant generate module <name>">
  Scaffold a new module package under `packages/<name>` with the standard module layout.
</ResponseField>

<ResponseField name="voyant generate extension <name> --module <target>">
  Scaffold a deployment-local [extension](/docs/platform/fundamentals/extensions) under `src/extensions/<name>/` that attaches to an existing module's surface — for adding routes (and optionally a detail table) to a module like `bookings` without forking it. Generates `index.ts` (via `defineDeploymentExtension`), `routes.ts`, and `validation.ts`; no `package.json`/`tsconfig.json`, since an extension is not a package.

  Flags:

  * `--module <target>` — **required**; the existing module the extension attaches to (`extension.module`), e.g. `bookings`.
  * `--public` — mount on the public surface (`/v1/public/<module>`) instead of the default admin surface (`/v1/admin/<module>`).
  * `--with-schema` — also emit a `schema.ts` 1:1 extension table keyed to the target record by a plain-text column (no cross-module foreign key).
  * `--dir <path>` — base directory; defaults to `src/extensions`.
  * `--force` — overwrite existing files.
</ResponseField>

<ResponseField name="voyant generate link <a> <b>">
  Emit a `defineLink` snippet for a cross-module relationship. Each argument is a `<module>.<entity>` reference, for example `crm.person products.product`. Flags: `--left-list` and `--right-list` (make each side a list), and `--cascade` (emit `{ deleteCascade: true }`).
</ResponseField>

### Configuration

<ResponseField name="voyant config <show|validate|path>">
  Inspect the nearest `voyant.config.*` manifest: print it, validate it, or show which file resolved.
</ResponseField>

### Admin

<ResponseField name="voyant admin generate [--check]">
  Emit `admin.extensions.generated.ts` from the manifest. `--check` verifies it is in sync without rewriting.
</ResponseField>

<ResponseField name="voyant admin generate --routes [--check]">
  Emit the code-assembled admin route module. Auto-includes the built-in core entry when it resolves. Add `--files` for the legacy thin-file output, or `--out <file>` / `--routes-dir <dir>` to override paths.
</ResponseField>

<ResponseField name="voyant admin generate --destinations [--check]">
  Emit the generated destination resolver map.
</ResponseField>

<ResponseField name="voyant admin doctor">
  Check parity between the manifest, admin extensions, and routes or destinations.
</ResponseField>

### Database

<ResponseField name="voyant db <generate|migrate|studio|push>">
  Proxy Drizzle Kit commands. `generate` defaults to a timestamp prefix. These are also available as `voyant db:generate`, `voyant db:migrate`, `voyant db:studio`, `voyant db:push`, and `voyant db:check`.
</ResponseField>

<ResponseField name="voyant db schemas [--emit]">
  Print or emit the manifest-derived schema list. `--style=specifier|file` selects module specifiers (default) or absolute paths; `--emit` writes the generated schema file, optionally to `--out <file>`; `--config <path>` points at a specific `voyant.config.ts`.
</ResponseField>

<ResponseField name="voyant db sync-links [--emit-drizzle]">
  Emit link-table DDL, or with `--emit-drizzle` a generated Drizzle schema for declared links. `--out <file>` writes to a file instead of stdout; `--links <path>` / `--template <path>` point at the link definitions to read.
</ResponseField>

<ResponseField name="voyant db doctor [--fail-on-drift]">
  Report migration drift across manifest, schema, prefix, and link checks.
</ResponseField>

### Preflight and scripts

<ResponseField name="voyant doctor [--strict] [--skip-*]">
  Preflight checks: env and bindings (`env.d.ts` against `wrangler.jsonc`), db doctor, and admin doctor. Exits non-zero on any gate.
</ResponseField>

<ResponseField name="voyant upgrade [--to <version>] [--dry-run]">
  Bump the `@voyant-travel/framework` BOM (meta-package) and install. `--to <version>` pins a target version (otherwise the latest); `--dry-run` reports what would change without writing; `--package <name>` upgrades a different meta-package. Follow with `voyant db migrate && voyant doctor`.
</ResponseField>

<ResponseField name="voyant exec <script.ts> [args...]">
  Run a TypeScript or JavaScript script with the Voyant loader hook and native type stripping.
</ResponseField>

## Cloud commands

These need a Voyant token. See [CLI overview](/docs/cli/overview) for login, organizations, and token resolution.

Every cloud command accepts the following global flags:

<ResponseField name="--json">
  Emit machine-readable output. On failure, errors are returned as a stable `{ "error": { "code", "message" } }` envelope on stderr.
</ResponseField>

<ResponseField name="--org <slug|id>">
  Target a specific organization (also `VOYANT_CLOUD_ORG`). Needed only when you are logged in to more than one.
</ResponseField>

<ResponseField name="--token <value> · --api-url <url>">
  Override the resolved token and API base URL for a single command.
</ResponseField>

<ResponseField name="--yes / -y">
  Approve destructive actions non-interactively. Required for deletes when there is no TTY, so agents never hang on a prompt.
</ResponseField>

### Authentication and organizations

<ResponseField name="voyant login [--token <value>] [--no-browser]">
  Authorize via the browser device flow, or paste a token for CI and headless use. API tokens are organization-bound, so each org you log in to is stored separately. `--no-browser` prints the device URL instead of opening it; `--no-validate` skips the token validation call.
</ResponseField>

<ResponseField name="voyant logout [--org <slug|id>]">
  Remove a stored credential — one organization with `--org`, or all of them for the API URL.
</ResponseField>

<ResponseField name="voyant whoami [--json]">
  Show the resolved API URL, where the token came from, and the organization it is bound to.
</ResponseField>

<ResponseField name="voyant org <list|use|current>">
  Manage which organization the CLI targets. `list` shows the orgs you are logged in to (the active one is marked), `use <slug|id>` switches the active org, and `current` prints it. When you belong to several orgs and none is selected, commands fail with a clear message instead of guessing.
</ResponseField>

### Apps and deployments

<ResponseField name="voyant apps <list|get|create|delete>">
  Manage apps in the active organization. `create <slug> [--name <n>]`; `delete <app> --yes` also tears down the app's external resources.
</ResponseField>

<ResponseField name="voyant env <list|set|rm> <app> [--env <name>]">
  Manage an app environment's variables (default environment `production`). `set <KEY> <value> [--secret]` upserts; values are always masked on read.
</ResponseField>

<ResponseField name="voyant deploy <app> [--env <name>]">
  Trigger a deployment for an app environment (default `production`).
</ResponseField>

<ResponseField name="voyant deploy <list|get|logs|cancel|rollback> <app> [id]">
  Inspect and control deployments: list them, show one, stream build logs, cancel a running deploy, or roll back to a previous one (`cancel`/`rollback` need `--yes`).
</ResponseField>

<ResponseField name="voyant logs <app> [--env <name>] [--level <info|warn|error>] [--since <dur>] [--follow] [--json]">
  Read a deployed app's runtime logs, or stream them live with `--follow` (`-f`). Filter with `--level`, `--search`, and a time window via `--since 1h` / `--from` / `--to`. In follow mode, `--interval <secs>` sets the poll interval (default 3).
</ResponseField>

### Databases and storage

<ResponseField name="voyant databases <list|get|create|delete>">
  Manage managed databases in the active organization. `create <name> [--kind neon|d1]` (default `neon`); `delete <id> --yes`.
</ResponseField>

<ResponseField name="voyant databases <branches|connection> <id>">
  `branches <id>` lists a database's branches; `connection <id> [--branch <b>] [--direct]` prints a connection string (pooled by default).
</ResponseField>

<ResponseField name="voyant storage buckets <list|create|delete>">
  Manage R2 storage buckets. `create <name>`; `delete <id> --yes`.
</ResponseField>

### Vault

<ResponseField name="voyant vaults list [--json]">
  List the vaults in the active organization with their secret counts (metadata only).
</ResponseField>

<ResponseField name="voyant secrets list <vault>">
  List secret keys and versions in a vault. Values are never shown.
</ResponseField>

<ResponseField name="voyant secrets set <vault> <key> [value]">
  Upsert a secret. If `value` is omitted, it is read from stdin.
</ResponseField>

<ResponseField name="voyant secrets rm <vault> <key>">
  Delete a secret.
</ResponseField>

<Warning>
  The CLI cannot decrypt secrets — there is no `secrets get`. `voyant login` mints tokens without the `vault:read` scope the decrypt endpoints require. Reveal a value in the dashboard, or use a server-side app token with `vault:read` (see [Vault](/docs/services/vault)).
</Warning>
