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

# CLI

> Manage Telnyx KV namespaces and keys from your terminal with the CLI — create, list, put, get, and delete.

Manage KV namespaces and keys using the `telnyx-edge` CLI.

## Namespace Management

```bash theme={null}
# List all namespaces
telnyx-edge storage kv list

# Create a namespace (name: lowercase letters, numbers, hyphens)
telnyx-edge storage kv create --name my-cache

# Get a namespace
telnyx-edge storage kv get <namespace-id>

# Delete a namespace
telnyx-edge storage kv delete <namespace-id>
```

## Key Operations

The value is stored verbatim — pass it as a positional argument, or use `--path` to store the contents of a file.

```bash theme={null}
# List keys in a namespace
telnyx-edge storage kv key list <namespace-id>

# List keys filtered by prefix
telnyx-edge storage kv key list <namespace-id> --prefix user/

# Get a value (prints the raw stored bytes)
telnyx-edge storage kv key get <namespace-id> user/123

# Put a value
telnyx-edge storage kv key put <namespace-id> user/123 "hello"

# Put a value from a file
telnyx-edge storage kv key put <namespace-id> user/123 --path ./value.json

# Put a value with a server-side TTL (key expires after the duration)
telnyx-edge storage kv key put <namespace-id> session/abc "hello" --ttl 30s

# Delete a key
telnyx-edge storage kv key delete <namespace-id> user/123
```

### Key Put Flags

| Flag     | Description                                                                               |
| -------- | ----------------------------------------------------------------------------------------- |
| `--path` | Store the contents of a file as the value, instead of a positional argument               |
| `--ttl`  | Server-side expiry as a duration (`30s`, `5m`, `1h`); the key is deleted after it elapses |

### Key List Flags

| Flag       | Description                                                   |
| ---------- | ------------------------------------------------------------- |
| `--prefix` | Filter keys by prefix                                         |
| `--cursor` | Pagination cursor from a previous response                    |
| `--limit`  | Maximum number of keys to return, `1`–`1000` (default `1000`) |

<Note>
  Keys may contain `a-z`, `A-Z`, `0-9`, and `-` `_` `/` `=` `.` (no colons). Use `--ttl` for server-side expiry (see [Key Expiration](/docs/edge-compute/kv/ttl-and-metadata)). KV has no per-key metadata, so there is no `--metadata` flag.
</Note>
