Databases

Use the khotan CLI to operate Khotan databases and database branches. Add --json for machine-readable output; results go to stdout, diagnostics to stderr.

Commands

khotan databases branches connection

Usage: khotan databases branches connection <databaseId> <branchId>

Retrieve a branch connection URI. Secret-bearing; explicit-only.

Arguments & options:

Safety: secret — returns credential-bearing values; never shown in list/table output.

khotan databases branches create

Usage: khotan databases branches create <databaseId> --name <string> --init-source <string> [--parent-branch-id <string>] [--parent-timestamp <string>] [--expires-at <string>] [--no-expiry]

Branch a ready database, optionally from a parent branch (nested branching).

Arguments & options:

khotan databases branches delete

Usage: khotan databases branches delete <databaseId> <branchId>

Permanently delete a branch. Delete its child branches first.

Arguments & options:

Safety: destructive — prompts for confirmation in a terminal and refuses in non-interactive sessions unless you pass --yes.

khotan databases branches get

Usage: khotan databases branches get <databaseId> <branchId>

Get one branch by id (no credentials).

Arguments & options:

khotan databases branches list

Usage: khotan databases branches list <databaseId>

List a database's branches (no credentials).

Arguments & options:

khotan databases branches rotate-credentials

Usage: khotan databases branches rotate-credentials <databaseId> <branchId>

Rotate a branch's credentials and return the new connection as { connectionUri }. Secret-bearing.

Arguments & options:

Safety: secret — returns credential-bearing values; never shown in list/table output.

khotan databases connection

Usage: khotan databases connection <databaseId>

Retrieve a database connection URI. Secret-bearing; explicit-only.

Arguments & options:

Safety: secret — returns credential-bearing values; never shown in list/table output.

khotan databases create

Usage: khotan databases create --name <string> [--region-id <string>]

Provision a production Postgres database.

Arguments & options:

khotan databases delete

Usage: khotan databases delete <databaseId>

Permanently delete a database.

Arguments & options:

Safety: destructive — prompts for confirmation in a terminal and refuses in non-interactive sessions unless you pass --yes.

khotan databases get

Usage: khotan databases get <databaseId>

Get one database by id (no credentials).

Arguments & options:

khotan databases list

Usage: khotan databases list

List the organization's production databases (no credentials).

khotan databases rotate-credentials

Usage: khotan databases rotate-credentials <databaseId>

Rotate a database's credentials and return the new connection as { connectionUri }. Secret-bearing.

Arguments & options:

Safety: secret — returns credential-bearing values; never shown in list/table output.

khotan databases schema-promotions apply

Usage: khotan databases schema-promotions apply <databaseId> <promotionId>

Apply the exact reviewed schema-only promotion SQL to the production database. Fails if branch or production schema hashes changed after planning.

Arguments & options:

Safety: destructive — prompts for confirmation in a terminal and refuses in non-interactive sessions unless you pass --yes.

khotan databases schema-promotions get

Usage: khotan databases schema-promotions get <databaseId> <promotionId>

Read one schema promotion record, including summary, blocked changes, failure state, and SQL.

Arguments & options:

khotan databases schema-promotions plan

Usage: khotan databases schema-promotions plan <databaseId> <branchId>

Generate and validate a schema-only promotion plan from a ready branch to the production database. Data is never copied.

Arguments & options:

khotan databases tags set

Usage: khotan databases tags set <databaseId> --tags <a,b>

Replace the tags on a database and return the stored list.

Arguments & options:

Examples: