> For the complete documentation index, see [llms.txt](https://docs.khotan.com/llms.txt). A markdown version of any page is available at its `index.md` URL.

# Redis (KV)

Use the `khotan` CLI to operate Khotan Redis (KV) databases. Add `--json` for machine-readable output; results go to stdout, diagnostics to stderr.

## Commands

### khotan redis connection

Usage: `khotan redis connection <databaseId>`

Retrieve the Redis connection URI and REST URL and tokens. Secret-bearing; explicit-only.

Arguments & options:
- `<databaseId>` — The Redis database id. (required, path)

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

### khotan redis create

Usage: `khotan redis create --name <string> [--primary-region <string>]`

Provision a global Upstash Redis (KV) database. Not idempotent: retrying a succeeded create provisions a second database. Omit primaryRegion for the default region.

Arguments & options:
- `--name` — The database name. (required, body)
- `--primary-region` — Optional primary region id; omit for the default region. (optional, body)

### khotan redis delete

Usage: `khotan redis delete <databaseId>`

Permanently delete a Redis (KV) database and tear down its Upstash resources. Fails if deletion protection is enabled; remove protection from the dashboard first.

Arguments & options:
- `<databaseId>` — The Redis database id. (required, path)

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

### khotan redis get

Usage: `khotan redis get <databaseId>`

Get one Redis (KV) database by id (no credentials).

Arguments & options:
- `<databaseId>` — The Redis database id. (required, path)

### khotan redis list

Usage: `khotan redis list`

List the organization's Redis (KV) databases (no credentials).

### khotan redis tags set

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

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

Arguments & options:
- `<databaseId>` — The Redis database id. (required, path)
- `--tags` — Full tag list, comma-separated or repeatable; it replaces the stored list, and an empty value clears it. The server lowercases each tag and turns spaces into hyphens. Up to 10 tags of 1-32 lowercase letters, digits, or single hyphens. (required, body)

Examples:
- `khotan redis tags set <databaseId> --tags live,eu`

<!-- generated from khotan catalog v2026-10-30 (adapter 0.10.0); do not edit by hand -->
