Wrangler CLI
Use the project's Wrangler version and command runner. Check whether it is available before installing anything. Add or upgrade it only when the requested work needs that change, using the project's package manager.
Current Sources
Verify the command or configuration fields needed for the task against current Wrangler documentation and the installed version's help or node_modules/wrangler/config-schema.json. Bundled examples can lag behind the CLI. Retrieve only the relevant documentation.
Preserve existing configuration format, compatibility date, and environments unless the task requires a change. Generate binding types after changes that affect them.
Task References
Read only the reference for the requested operation. Load another when a dependency requires it.
| Task | Reference |
|---|---|
| Worker configuration and binding types | Configuration |
| Local server, bindings, and local secrets | Local development |
| Worker deployment, secrets, versions, and rollback | Deployment |
| KV namespaces and keys | KV |
| R2 buckets and objects | R2 |
| D1 queries, migrations, and backups | D1 |
| Vector indexes and queries | Vectorize |
| Database connections | Hyperdrive |
| AI models and bindings | Workers AI |
| Queues and consumers | Queues |
| Container images and registries | Containers |
| Workflows and instances | Workflows |
| Ingestion pipelines | Pipelines |
| Shared secret stores | Secrets Store |
| Pages deployment | Pages |
| Logs and observability configuration | Observability |
| Local tests and scheduled handlers | Testing |
| Authentication, startup, or binding failures | Troubleshooting |
Operating Boundaries
- Verify the account, resource, and environment before authenticated operations. Confirm authorization before deployment, remote writes, or deletion.
- Safe local checks with disposable data can run within the requested task. Check remote bindings and service usage before treating local execution as isolated.
- Keep secrets out of source control, logs, output, and command arguments. Use a supported secure input method. Do not run a bundled example that violates this constraint.
- Resource creation, paid services, and remote tests require appropriate authorization. Command examples do not grant it.
Completion
For implementation, continue until the requested behavior is exercised and relevant checks pass, or a concrete blocker requires user input. Fix failures caused by the change and rerun affected checks. Use existing test tooling; do not add a framework for a routine CLI task.
Report commands run, results, and unresolved checks. A local test or deployment dry run proves only local validation. If deployment is authorized, verify the deployed version and affected behavior before reporting live success.