# KV

URL: https://docs.hanzo.ai/docs/cli/kv

> The `hanzo kv` commands.

Also for this capability: [API](https://docs.hanzo.ai/docs/openapi/kv) · **CLI** · [MCP](https://docs.hanzo.ai/docs/mcp-tools/kv) · [SDKs](https://docs.hanzo.ai/docs/sdks)

Your key-value store: buckets of versioned values your apps read and write by key.

[API reference →](https://docs.hanzo.ai/docs/openapi/kv)

| Command                 | What it does                                                                                                  |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `hanzo kv add <bucket>` | Creates a KV bucket and returns it.                                                                           |
| `hanzo kv rm <bucket>`  | Removes one bucket of the caller's org — every key and every revision with it — and answers 204 with no body. |

### Bucket

| Command                                  | What it does                                                                                                                   |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `hanzo kv bucket get <bucket> <key>`     | Returns one key's current value and revision.                                                                                  |
| `hanzo kv bucket history <bucket> <key>` | Returns one key's retained revisions, oldest first — every put and every delete marker up to the bucket's History depth.       |
| `hanzo kv bucket rm <bucket> <key>`      | Removes one key — a delete marker in the key's history, so watchers see it and Get answers 404 — and answers 204 with no body. |
| `hanzo kv bucket set <bucket> <key>`     | Sets one key to one value and returns the revision the write created.                                                          |
