Manage and export KV data
List, inspect, and bulk-edit KV entries from the CLI, plus a restorable export format.
KV commands address a namespace by its account-level name.
Individual keys
bunx sproutboat kv key list registrations --prefix email:
bunx sproutboat kv key get registrations email:[email protected] --text
bunx sproutboat kv key put registrations email:[email protected] joined
bunx sproutboat kv key delete registrations email:[email protected] --yesnpx sproutboat kv key list registrations --prefix email:
npx sproutboat kv key get registrations email:[email protected] --text
npx sproutboat kv key put registrations email:[email protected] joined
npx sproutboat kv key delete registrations email:[email protected] --yesExport
bunx sproutboat kv export registrations \
--prefix email: \
--output registrations.jsonnpx sproutboat kv export registrations \
--prefix email: \
--output registrations.jsonThe export pages through matching keys, reads values in bounded batches, and writes incrementally to a permission-restricted temporary file.
Exports use the version 1 text-value format accepted by kv bulk put:
[
{ "key": "email:[email protected]", "value": "joined" }
]
Bulk operations
Bulk get and delete take a JSON array of key strings:
["email:[email protected]", "email:[email protected]"]
bunx sproutboat kv bulk get registrations keys.json --output values.json
bunx sproutboat kv bulk put registrations registrations.json
bunx sproutboat kv bulk delete registrations keys.json --yesnpx sproutboat kv bulk get registrations keys.json --output values.json
npx sproutboat kv bulk put registrations registrations.json
npx sproutboat kv bulk delete registrations keys.json --yes