State Inspection
wd state exposes the contents of .wrangler-deploy/<stage>/state.json
(or your remote KV state) without making you parse the file by hand.
Commands
Section titled “Commands”wd state list --stage staging # table of resources, ids, statuswd state get cache --stage staging # full output + props for one resourcewd state tree --stage staging # ASCII tree: workers → bindingsAll commands honour --stage (defaulting to $USER) and --json for
machine-readable output.
Tree output
Section titled “Tree output” stage: staging (workers: 2, deployed: 1) ├── apps/api deployed https://api.example.com │ ├── CACHE kv → cache (kv_abc123) │ ├── DB d1 → my-db (d1_def456) │ └── BACKEND service → apps/worker └── apps/worker pendingThe tree mixes live state with the source config so a worker that
hasn’t deployed yet still appears, and bindings show their resolved
Cloudflare IDs once wd apply has run.
Read-only check
Section titled “Read-only check”wd run --stage stagingwd run validates the config, reads (but never writes) state, and prints
a summary — handy in CI before mutating commands or for sanity checks
when switching between profiles.