使用 wrangler flagship 从命令行管理 Flagship 应用和功能标志。
wrangler flagship 在 Wrangler v4.107.0 及更高版本中可用。
运行 wrangler login,或将 CLOUDFLARE_API_TOKEN 设置为具有 Flagship 权限的 API 令牌。
| 权限 | 所需操作 |
|---|---|
flagship:read |
列出应用、检查标志、评估标志和读取更新日志。 |
flagship:write |
创建、更新、删除、启用、禁用、逐步发布和拆分应用或标志。 |
大多数写入工作流在写入更新的定义之前也会读取当前标志,因此请为操作使用授予两种权限。
wrangler flagship flags 命令始终将应用 ID 作为第一个参数。大多数子命令然后接受标志键;列表式命令(如 flags list)仅接受应用 ID:
wrangler flagship flags get <APP_ID> new-checkout
wrangler flagship flags disable <APP_ID> new-checkout
wrangler flagship flags list <APP_ID>如果还没有应用,请先创建一个:
wrangler flagship apps create checkout-service创建应用时传递 --binding <NAME>,将其作为 Worker 绑定添加到 wrangler.json 或 wrangler.jsonc 文件中。
创建布尔标志。没有变体时,Wrangler 创建 on=true、off=false,默认提供 off:
wrangler flagship flags create <APP_ID> new-checkout使用紧凑规则语法添加定向规则:
wrangler flagship flags create <APP_ID> premium-banner \
-V on=true \
-V off=false \
--default off \
--rule "serve=on; when=plan equals enterprise AND country in [US,CA]; rollout=25%@user_id"在引号外的值中使用大写 AND 和 OR 组合条件。对包含保留字或分隔符的值加引号:
wrangler flagship flags create <APP_ID> banner-copy \
-V shown=true \
-V hidden=false \
--default hidden \
--rule 'serve=shown; when=title equals "WAR AND PEACE" OR country in ["US","CA"]'对于深度嵌套的条件组,使用 --rule-json。Wrangler 在发送请求之前验证紧凑规则和 JSON 规则。
在不重写完整规则集的情况下更改一条现有规则:
wrangler flagship flags rules update <APP_ID> premium-banner \
--priority 1 \
--rollout 50%@user_id为用户评估标志:
wrangler flagship flags evaluate <APP_ID> premium-banner \
--context plan=enterprise \
--context country=US \
--targeting-key user-42使用 disable 作为即时终止开关:
wrangler flagship flags disable <APP_ID> premium-banner通过传递应用 ID 后跟多个键来启用、禁用或删除多个标志:
wrangler flagship flags disable <APP_ID> new-checkout dark-mode premium-banner
wrangler flagship flags delete <APP_ID> coming-soon old-banner --force与 --json 一起使用时,删除命令需要 --force,这样提示不会破坏 JSON 输出。当 rollout 和 split 会替换具有条件的现有定向规则时,也需要相同的 --force。
有关涵盖定向规则、逐步发布、流量拆分、更新日志和使用 --json 进行脚本的完整工作流指南,请参阅 Flagship Wrangler 命令参考。
flagship apps create
Create a Flagship app
npx wrangler flagship apps create [NAME]yarn wrangler flagship apps create [NAME]pnpm wrangler flagship apps create [NAME][NAME]stringrequiredThe name of the app
--jsonbooleandefault: falseReturn output as JSON
--use-remotebooleanUse a remote binding when adding the newly created resource to your config
--update-configbooleanAutomatically update your config file with the newly added resource
--bindingstringThe binding name of this resource in your Worker
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship apps list
List Flagship apps
npx wrangler flagship apps listyarn wrangler flagship apps listpnpm wrangler flagship apps list--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship apps get
Get a Flagship app
npx wrangler flagship apps get [APP-ID]yarn wrangler flagship apps get [APP-ID]pnpm wrangler flagship apps get [APP-ID][APP-ID]stringrequiredThe ID of the app
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship apps update
Update a Flagship app
npx wrangler flagship apps update [APP-ID]yarn wrangler flagship apps update [APP-ID]pnpm wrangler flagship apps update [APP-ID][APP-ID]stringrequiredThe ID of the app
--namestringrequiredThe new name of the app
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship apps delete
Delete a Flagship app
npx wrangler flagship apps delete [APP-ID]yarn wrangler flagship apps delete [APP-ID]pnpm wrangler flagship apps delete [APP-ID][APP-ID]stringrequiredOne or more app IDs to delete
--forcebooleanalias: --ydefault: falseSkip the confirmation prompt
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags create
Create a feature flag in a Flagship app
npx wrangler flagship flags create [APP-ID] [KEY]yarn wrangler flagship flags create [APP-ID] [KEY]pnpm wrangler flagship flags create [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--variationstringalias: --VA flag variation, in the form "name=value" (repeatable)
--default-variationstringalias: --defaultThe name of the variation to serve by default (defaults to off for boolean flags, otherwise the first variation)
--typestringalias: --tThe variation value type (inferred when omitted)
--descriptionstringalias: --dA description of the flag
--disabledbooleandefault: falseCreate the flag in a disabled state
--rulestringA targeting rule, e.g. "serve=on; when=plan equals pro AND region in [US,CA]; rollout=30%@user_id". Conditions support AND/OR; priority is optional and defaults to declaration order (repeatable)
--rule-jsonstringA targeting rule as a JSON object (repeatable)
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags list
List feature flags in a Flagship app
npx wrangler flagship flags list [APP-ID]yarn wrangler flagship flags list [APP-ID]pnpm wrangler flagship flags list [APP-ID][APP-ID]stringrequiredThe ID of the app
--limitnumberThe maximum number of flags to return (1-200)
--cursorstringThe pagination cursor from a previous list call
--allbooleandefault: falseFetch every flag, following pagination automatically
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags get
Get a feature flag from a Flagship app
npx wrangler flagship flags get [APP-ID] [KEY]yarn wrangler flagship flags get [APP-ID] [KEY]pnpm wrangler flagship flags get [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags update
Update a feature flag in a Flagship app
npx wrangler flagship flags update [APP-ID] [KEY]yarn wrangler flagship flags update [APP-ID] [KEY]pnpm wrangler flagship flags update [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--enablebooleanEnable the flag
--disablebooleanDisable the flag
--descriptionstringalias: --dA new description for the flag (pass "" to clear it)
--default-variationstringalias: --defaultThe name of the variation to serve by default
--typestringalias: --tThe value type used to coerce --set-variation values
--set-variationstringAdd or replace a variation, in the form "name=value"
--remove-variationstringRemove a variation by name
--rulestringReplace the flag's targeting rules (repeatable)
--rule-jsonstringReplace the flag's targeting rules using JSON (repeatable)
--add-rulestringAppend a targeting rule, keeping the existing rules (repeatable)
--add-rule-jsonstringAppend a targeting rule using JSON, keeping the existing rules (repeatable)
--clear-rulesbooleandefault: falseRemove all targeting rules
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags set
Set the default variation served by a feature flag
npx wrangler flagship flags set [APP-ID] [KEY]yarn wrangler flagship flags set [APP-ID] [KEY]pnpm wrangler flagship flags set [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--variationstringaliases: --variant, --VrequiredThe variation to serve by default
--clear-rulesbooleandefault: falseClear targeting rules so this variation is always served
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags rules list
List targeting rules for a feature flag
npx wrangler flagship flags rules list [APP-ID] [KEY]yarn wrangler flagship flags rules list [APP-ID] [KEY]pnpm wrangler flagship flags rules list [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags rules update
Update one targeting rule for a feature flag
npx wrangler flagship flags rules update [APP-ID] [KEY]yarn wrangler flagship flags rules update [APP-ID] [KEY]pnpm wrangler flagship flags rules update [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--prioritynumberrequiredThe priority of the rule to update
--servestringThe variation to serve when this rule matches
--whenstringThe rule conditions, using the same syntax as --rule when=...
--clear-conditionsbooleandefault: falseRemove conditions so the rule matches all contexts
--rolloutstringThe rollout, in the form "percentage" or "percentage%@attribute"
--clear-rolloutbooleandefault: falseRemove the rollout from this rule
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags rules delete
Delete one targeting rule from a feature flag
npx wrangler flagship flags rules delete [APP-ID] [KEY]yarn wrangler flagship flags rules delete [APP-ID] [KEY]pnpm wrangler flagship flags rules delete [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--prioritynumberrequiredThe priority of the rule to delete
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags rules reorder
Reorder targeting rules for a feature flag
npx wrangler flagship flags rules reorder [APP-ID] [KEY]yarn wrangler flagship flags rules reorder [APP-ID] [KEY]pnpm wrangler flagship flags rules reorder [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--orderstringrequiredComma-separated existing rule priorities in their new order, for example 2,1,3
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags split
Split traffic across variations by percentage
npx wrangler flagship flags split [APP-ID] [KEY]yarn wrangler flagship flags split [APP-ID] [KEY]pnpm wrangler flagship flags split [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--weightstringalias: --wA variation weight, in the form "variation=weight" (repeatable)
--bystringContext attribute used for sticky bucketing
--default-variationstringalias: --defaultFallback variation when bucketing cannot run
--forcebooleanalias: --ydefault: falseSkip the confirmation prompt when this split replaces existing targeting rules
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags rollout
Roll out one variation to a percentage of traffic
npx wrangler flagship flags rollout [APP-ID] [KEY]yarn wrangler flagship flags rollout [APP-ID] [KEY]pnpm wrangler flagship flags rollout [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--tostringrequiredVariation to roll out
--percentagenumberrequiredPercentage of traffic to serve the rollout variation (0-100)
--bystringContext attribute used for sticky bucketing
--from-variationstringalias: --fromFallback variation for the remaining traffic
--forcebooleanalias: --ydefault: falseSkip the confirmation prompt when this rollout replaces existing targeting rules
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags enable
Enable a feature flag
npx wrangler flagship flags enable [APP-ID] [KEY]yarn wrangler flagship flags enable [APP-ID] [KEY]pnpm wrangler flagship flags enable [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredOne or more flag keys to enable
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags disable
Disable a feature flag
npx wrangler flagship flags disable [APP-ID] [KEY]yarn wrangler flagship flags disable [APP-ID] [KEY]pnpm wrangler flagship flags disable [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredOne or more flag keys to disable
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags evaluate
Evaluate a feature flag with optional context
npx wrangler flagship flags evaluate [APP-ID] [KEY]yarn wrangler flagship flags evaluate [APP-ID] [KEY]pnpm wrangler flagship flags evaluate [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--contextstringaliases: --ctx, --CEvaluation context, in the form "name=value" (repeatable)
--targeting-keystringStable bucketing key for percentage rollouts
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags delete
Delete a feature flag from a Flagship app
npx wrangler flagship flags delete [APP-ID] [KEY]yarn wrangler flagship flags delete [APP-ID] [KEY]pnpm wrangler flagship flags delete [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredOne or more flag keys to delete
--forcebooleanalias: --ydefault: falseSkip the confirmation prompt
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile
flagship flags changelog
Show the changelog for a feature flag
npx wrangler flagship flags changelog [APP-ID] [KEY]yarn wrangler flagship flags changelog [APP-ID] [KEY]pnpm wrangler flagship flags changelog [APP-ID] [KEY][APP-ID]stringrequiredThe ID of the app
[KEY]stringrequiredThe key of the flag
--limitnumberThe maximum number of entries to return (1-200)
--cursorstringThe pagination cursor from a previous changelog call
--allbooleandefault: falseFetch every entry, following pagination automatically
--jsonbooleandefault: falseReturn output as JSON
Global flags
--vbooleanalias: --versionShow version number
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
--configstringalias: --cPath to Wrangler configuration file
--envstringalias: --eEnvironment to use for operations, and for selecting .env and .dev.vars files
--env-filestringPath to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files
--experimental-provisionbooleanaliases: --x-provisiondefault: trueExperimental: Enable automatic resource provisioning
--experimental-auto-createbooleanalias: --x-auto-createdefault: trueAutomatically provision draft bindings with new resources
--install-skillsbooleandefault: falseInstall Cloudflare skills for detected AI coding agents before running the command
--profilestringUse a specific auth profile