Apps

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

Commands

khotan apps create

Usage: khotan apps create --name <string> [--region-preference <string>] [--env KEY=VALUE]... [--database <json>] [--redis <json>] [--idempotency-key <string>]

Provision a new app.

Arguments & options:

khotan apps delete

Usage: khotan apps delete <appId>

Permanently delete an app and tear down its provider resources.

Arguments & options:

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

khotan apps deployments

Usage: khotan apps deployments <appId>

List an app's recent deployments, newest first, read live from the hosting provider. It includes every deployment, such as one a git push started, with its state, commit, and time, so it shows whether the latest update went live or failed. apps.get shows only the deployment Khotan started last.

Arguments & options:

khotan apps email-subscriptions create

Usage: khotan apps email-subscriptions create <appId> --email-integration-id <string> --delivery-url <string>

Watch a connected Gmail mailbox for this deployment; Google pushes notifications directly to the delivery URL.

Arguments & options:

khotan apps email-subscriptions delete

Usage: khotan apps email-subscriptions delete <appId> <subscriptionId>

Remove an email subscription (deletes the Pub/Sub push subscription).

Arguments & options:

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

khotan apps email-subscriptions get

Usage: khotan apps email-subscriptions get <appId> <subscriptionId>

Get one email subscription by id.

Arguments & options:

khotan apps email-subscriptions list

Usage: khotan apps email-subscriptions list <appId>

List the connected mailboxes this deployment watches.

Arguments & options:

khotan apps env bulk-set

Usage: khotan apps env bulk-set <appId> [--var KEY=VALUE]... [--target <a,b>]

Create or update many env vars in one request. Writes every environment unless you pass target.

Arguments & options:

khotan apps env list

Usage: khotan apps env list <appId>

List env var metadata (never values) for a app.

Arguments & options:

khotan apps env reveal

Usage: khotan apps env reveal <appId> <key> [--target <string>]

Reveal a single decrypted env var value for one environment. Secret-bearing; explicit-only.

Arguments & options:

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

khotan apps env set

Usage: khotan apps env set <appId> <key> --value <string> [--target <a,b>]

Create or update one env var. Writes every environment unless you pass target.

Arguments & options:

khotan apps env unset

Usage: khotan apps env unset <appId> <key> [--target <string>]

Delete one env var. Removes it from every environment unless you pass target.

Arguments & options:

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

khotan apps get

Usage: khotan apps get <appId>

Get one app by id, including its current deployment.

Arguments & options:

khotan apps list

Usage: khotan apps list

List the organization's apps.

khotan apps oauth disconnect

Usage: khotan apps oauth disconnect <appId>

Revoke the OAuth client and remove its injected environment variables.

Arguments & options:

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

khotan apps oauth export

Usage: khotan apps oauth export <appId>

Export secret-bearing .env.local content for local development.

Arguments & options:

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

khotan apps oauth rotate

Usage: khotan apps oauth rotate <appId> [--redeploy]

Invalidate the current secret, inject a new one, and optionally redeploy.

Arguments & options:

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

khotan apps oauth set-redirects

Usage: khotan apps oauth set-redirects <appId> --redirect-uris <a,b>

Replace additional redirect URIs while preserving the managed production callback.

Arguments & options:

khotan apps oauth setup

Usage: khotan apps oauth setup <appId>

Create OAuth credentials once and return the plaintext secret.

Arguments & options:

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

khotan apps oauth status

Usage: khotan apps oauth status <appId>

Show non-secret OAuth client state and redirect URIs.

Arguments & options:

khotan apps oauth sync

Usage: khotan apps oauth sync <appId>

Repair OAuth redirects and environment values without rotating the secret.

Arguments & options:

khotan apps redeploy

Usage: khotan apps redeploy <appId>

Trigger a new deployment of an app.

Arguments & options:

khotan apps setup

Usage: khotan apps setup <appId> --name <string> --website <string> [--logo <string>] [--idempotency-key <string>]

Start a cloud setup run for an app: a cloud agent provisions its database, Redis, and env, brands it from the website, and Khotan merges the setup PR when its checks pass. The app must be ready: after creating one, wait until apps get shows status ready, because setup refuses a app that is still being created. Returns the run in status running; follow it with apps setup status.

Arguments & options:

khotan apps setup status

Usage: khotan apps setup status <appId>

Show the newest cloud setup run for an app: its status, the reason when it is not ready, the setup PR, and the live URL.

Arguments & options:

khotan apps source

Usage: khotan apps source <appId>

Download the app's source files (its subdirectory in the org mono-root repo) as a JSON listing with paths rooted at the app. Text files come back utf-8, binary files base64.

Arguments & options:

khotan apps tags set

Usage: khotan apps tags set <appId> --tags <a,b>

Replace the tags on an app and return the stored list.

Arguments & options:

Examples: