cloudflare / cloudflare/workers-sdk
Allow browsing KV-style Durable Object storage in the dashboard SQL Studio
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 186
Description
### Title: Allow browsing KV-style Durable Object storage in the dashboard SQL Studio
### Body:
**Problem**
Durable Objects that use the KV-style storage API (`storage.put()`, `storage.get()`, `storage.list()`) store their data in an internal `_cf_KV` table. When a user opens the Durable Objects SQL Studio in the Cloudflare dashboard to inspect this data, the schema appears empty — no tables are shown. Attempting to query `_cf_KV` directly returns:
```
Error: access to _cf_KV.key is prohibited: SQLITE_AUTH
```
This means there is **no way in the dashboard** to inspect, debug, or verify data stored via the KV API in a deployed Durable Object. The only workarounds are:
- Adding a temporary debug endpoint to the Worker source and redeploying
- Running `wrangler dev` locally and using Local Explorer (which only works for local data, not production data)
**Proposed solution**
Add a **Key-Value browser** view to the Durable Objects dashboard (similar to the KV namespace browser) that can display the keys and values stored via the KV-style storage API for a given Durable Object instance. This would:
- List all keys stored in a Durable Object instance
- Display the value (and type) for each key
- Support pagination for objects with many keys
- Optionally allow searching/filtering by key prefix
**Why this matters**
- The SQL Studio already provides a table browser for Durable Objects using the SQL storage API (`storage.exec()`). KV-style storage has no equivalent dashboard view.
- Many Durable Objects in production use the KV API, and developers have no visibility into what's stored without writing and deploying custom debug code.
- This creates a debugging gap, especially for production issues where local dev doesn't reflect the deployed state.
**Current workarounds (and why they're insufficient)**
| Workaround | Limitation |
|---|---|
| Add a debug endpoint to the Worker | Requires code change + redeploy; risky in production |
| Use Local Explorer via `wrangler dev` | Only shows local data, not production storage |
| Query `_cf_KV` in the Studio | Blocked with `SQLITE_AUTH` error |
**Additional context**
- The namespace already reports `use_sqlite: true`, so the data is in SQLite — it's just access-restricted.
- The KV namespace dashboard already has a key-value browser UI that could serve as a model for this feature.
Contributor guide
Research direction
Start by locating the Durable Objects SQL Studio entry point and the existing KV namespace browser, then compare how each retrieves and displays stored keys and values. Define the dashboard flow for selecting a Durable Object instance, listing KV-style records, showing value types, and handling pagination or prefix filtering; done means production KV-style storage is browsable without querying the restricted _cf_KV table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite, typescript
- Domain
- databases, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100