List keys by prefix

kv

// what it does

Lists key names in a namespace, optionally filtered by `--prefix`. Use it to audit what's stored, or to generate a keyset you feed into `kv bulk delete`.

// shell

$ wrangler kv key list --binding=SESSIONS --prefix "user:"

// gotcha

It returns key metadata only — name, expiration, and metadata — never the values. You still need a `kv key get` per key to see contents.