Data InspectionPRO
Corral lets you browse the local development data that Cloudflare’s runtime stores on disk. This includes D1 databases, KV namespaces, R2 buckets, Durable Objects, Workflows, and the Secrets Store.
Pro enforcement is at the core layer. The ProBindings wrapper struct in corral-core is the single entitlement gate — it’s constructed via ProBindings::entitled(is_pro)? and returns an error for free-tier callers. All Pro-gated surfaces (D1/KV/R2/DO/Workflows/Secrets inspection, the exec/npm/npx/pm resolver) are methods on ProBindings, so there’s no “forgot to add the gate” failure mode. Free-tier helpers like binding_summary and *_data_exists remain as module-level free functions — you can check whether data exists without a Pro license, but you can’t read the data itself.
All data is read from .wrangler/state/v3/ inside each project’s directory — the same local storage used by wrangler dev. CLI access is read-only except for the Secrets Store (create/delete). The macOS app adds Pro write verbs for KV, R2, and D1 — see In the macOS App.
Binding Summary
Get a quick overview of all bindings for a project and whether they have local data:
corral data bindings my-worker
This shows each binding’s type, name, and whether local data exists for it.
D1 Databases
List tables in a D1 binding:
corral data d1 tables my-worker MY_DB
Query rows from a table:
corral data d1 query my-worker MY_DB users
Pagination:
corral data d1 query my-worker MY_DB users --limit 20 --offset 40
The default limit is 50 rows. Results include column names and typed values.
View the column schema for a table:
corral data d1 schema my-worker MY_DB users
This shows each column’s name, type, nullable status, default value, and primary key.
KV Namespaces
List keys in a KV binding:
corral data kv keys my-worker MY_KV
Filter by prefix:
corral data kv keys my-worker MY_KV --prefix user:
Pagination:
corral data kv keys my-worker MY_KV --limit 20 --offset 0
Get a specific key’s value:
corral data kv get my-worker MY_KV user:123
This returns the value, expiration (if set), and metadata.
R2 Object Storage
List objects in an R2 binding:
corral data r2 objects my-worker MY_BUCKET
Filter by prefix:
corral data r2 objects my-worker MY_BUCKET --prefix uploads/
Pagination:
corral data r2 objects my-worker MY_BUCKET --limit 20 --offset 0
Each object shows its key, size (formatted as B/KB/MB), and ETag.
Download an object:
corral data r2 get my-worker MY_BUCKET image.png --output ./image.png
corral data r2 get my-worker MY_BUCKET config.json > /tmp/config.json
Without --output, raw bytes are written to stdout for piping. With --json, the data is base64-encoded.
Durable Objects
List instances for a Durable Object binding:
corral data do instances my-worker MY_DO
Each instance shows its ID and storage size.
Browse storage entries for a specific instance:
corral data do storage my-worker MY_DO abc123def456
corral data do storage my-worker MY_DO abc123def456 --limit 20 --offset 0
Each entry shows its key and value. The default limit is 50 entries.
Workflows
List instances for a workflow binding:
corral data workflow instances my-worker MY_WORKFLOW
Each instance shows its ID, status (Created/Running/Completed), step count, and size.
View details for a specific instance:
corral data workflow detail my-worker MY_WORKFLOW abc123def456
This shows the instance params, trigger, and an ordered list of steps with their type (Do/Sleep), status, and result.
Secrets Store
The Secrets Store is the only binding type that supports write operations from Corral.
List secrets:
corral data secrets list my-worker API_KEY
Get a secret’s value:
corral data secrets get my-worker API_KEY my-api-key
Create a secret (value is read from stdin for security — never passed as a CLI argument):
corral data secrets create my-worker API_KEY my-api-key
echo "sk-1234" | corral data secrets create my-worker API_KEY my-api-key
Delete a secret:
corral data secrets delete my-worker API_KEY my-api-key
The macOS app’s Secrets Store browser provides a visual interface with masked/revealable values and confirmation before deletion.
In the macOS App
The macOS app provides visual data browsers for all binding types. From a project’s Overview tab, click any binding card to open its browser in a sheet.
Each browser features a split-view layout with a list on the left and detail view on the right, plus pagination controls and search/filter capabilities.
Beyond browsing, the app exposes Pro write verbs the CLI does not — right-click a row (or use the browser’s toolbar):
- KV — Delete a key, or Edit TTL to set or clear its expiration.
- R2 — Delete an object (removes its row and data blob).
- D1 — Reset Local Data truncates every user table in place; the schema and the
.sqlitefile are preserved. - Secrets Store — Add and Delete secrets (also available from the CLI above).
Destructive actions confirm before running.
JSON Output
All CLI data commands support --json for machine-readable output:
corral data d1 tables my-worker MY_DB --json