wrangler

软件研发 云服务与部署 1 文件 EN 原文

Wrangler 命令行

Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.

说明语言:英文

来源cloudflareskills ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/cloudflare/skills --skill wrangler

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: wrangler description: Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead. ---

Wrangler CLI

Use this skill only when the project has wrangler.jsonc, wrangler.json, or wrangler.toml and no cloudflare.config.ts, or when the user asks for Wrangler. For a new project, a project with cloudflare.config.ts, or a project with no Cloudflare configuration, use the Cloudflare CLI (cf) instead: load the cf-cli skill if it is installed, or follow Use cf with coding agents. Do not add Wrangler to those projects.

Use the project's Wrangler version and retrieve the relevant documentation before writing commands or configuration. CLI flags and configuration fields change; do not rely on memorized examples.

Inspect the Project

Retrieve What the Task Needs

Use the Cloudflare MCP docs tool if available, or fetch the relevant linked page directly. Follow links to the specific command or product involved; avoid loading the entire reference. If a page moves, rediscover it through the Wrangler command index or Cloudflare docs search.

TaskSource
Discover commands and flags, including resource management, deployments, rollback, and diagnosticsProject-local wrangler --help and wrangler <command> --help; command reference
Edit config or add a bindingInstalled wrangler/config-schema.json (usually under node_modules); configuration reference
Deploy a framework applicationFramework guides; follow the guide for the project's existing framework and adapter
Migrate an application to Workers when requestedPages to Workers; Vercel to Workers
Configure staging or productionEnvironments
Set secrets locally, in CI, or on a deployed WorkerSecrets
Generate binding and runtime typesTypeScript
Run locally or choose a testing approachLocal development; testing
Choose roles, scopes, or API token permissions for WranglerRoles and permissions; Workers roles and permissions
Create or manage a branch or pull request environmentPreviews overview; get started; configuration
Decide whether Preview resources are isolated or sharedResources and isolation, including its current limitations
Configure Preview URLs, access, debugging, or CICustom domains; test and debug; examples
Choose between Previews, Version URLs, and Wrangler environmentsCompare workflows
Diagnose authentication or select an accountGeneral commands, including whoami; authentication profiles
Deploy an unauthenticated prototypeClaim deployments for eligibility, expiry, and claim URL handling; use a permanent account for production or CI

Use installed help and schema to check whether documented features exist in the project's version. If a required feature needs an upgrade, make that dependency explicit. If retrieval is unavailable, state the gap and use available local evidence rather than inventing syntax.

Apply the Change

Work with Workers Previews

Validate

After changing config or bindings in a TypeScript project, regenerate types with the project's wrangler types command rather than hand-editing generated declarations. Run the relevant existing typecheck or tests.

For deployment changes, use the project's build workflow and wrangler deploy --dry-run where supported, with the intended config and environment. A successful dry run checks the build and packaging; it does not prove remote resources or runtime behavior work. Use task-specific local or remote checks as appropriate to the requested work.

For Previews, a returned URL does not validate behavior that depends on bindings Wrangler reports as missing. Validate the behavior the user requested, using Preview-specific logs and configuration when needed. Writes to production resources, destructive testing, and deletion of named Previews must match the user's explicit intent.

Report what changed, the target environment, checks performed, and any unresolved validation gaps. Link the documentation used when the result depends on current command or configuration behavior.

同类技能
agents-sdkbasincf-clicloudflarecloudflare-email-servicecloudflare-onecloudflare-one-migrationsdurable-objects
本页内容来自开源项目 cloudflare, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。