本页还没有译文
本页 133 段还没译成日本語,下面显示的是英文原文。Flagship
还没翻译译自英文(developers.cloudflare.com)本页 133 段都还没译
Use wrangler flagship to manage Flagship apps and feature flags from the command line.
wrangler flagship is available in Wrangler v4.107.0 and later.
Authentication
Run wrangler login, or set CLOUDFLARE_API_TOKEN to an API token with Flagship permissions.
| Permission | Required for |
|---|---|
flagship:read | Listing apps, inspecting flags, evaluating flags, and reading changelogs. |
flagship:write | Creating, updating, deleting, enabling, disabling, rolling out, and splitting apps or flags. |
Most write workflows also read the current flag before writing the updated definition, so grant both permissions for operational use.
App IDs
wrangler flagship flags commands always take the app ID as the first argument. Most subcommands then take a flag key; list-style commands, such as flags list, take only the app ID:
wrangler flagship flags get <APP_ID> new-checkout
wrangler flagship flags disable <APP_ID> new-checkout
wrangler flagship flags list <APP_ID>Create an app first if you do not already have one:
wrangler flagship apps create checkout-servicePass --binding <NAME> when creating an app to add it to your wrangler.json or wrangler.jsonc file as a Worker binding.
Common workflows
Create a boolean flag. With no variations, Wrangler creates on=true, off=false, and serves off by default:
wrangler flagship flags create <APP_ID> new-checkoutAdd targeting rules with the compact rule syntax:
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"Use uppercase AND and OR outside quoted values to combine conditions. Quote values that contain reserved words or separators:
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"]'For deeply nested condition groups, use --rule-json. Wrangler validates both compact rules and JSON rules before sending requests.
Change one existing rule without rewriting the full rule set:
wrangler flagship flags rules update <APP_ID> premium-banner \
--priority 1 \
--rollout 50%@user_idEvaluate a flag for a user:
wrangler flagship flags evaluate <APP_ID> premium-banner \
--context plan=enterprise \
--context country=US \
--targeting-key user-42Use disable as an immediate kill switch:
wrangler flagship flags disable <APP_ID> premium-bannerEnable, disable, or delete multiple flags by passing the app ID followed by multiple keys:
wrangler flagship flags disable <APP_ID> new-checkout dark-mode premium-banner
wrangler flagship flags delete <APP_ID> coming-soon old-banner --forceDelete commands require --force when used with --json so prompts cannot corrupt JSON output. rollout and split require the same when they would replace existing targeting rules that have conditions.
Refer to the Flagship Wrangler commands reference for a complete workflow guide covering targeting rules, rollouts, traffic splits, changelogs, and scripting with --json.
Commands
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>string requiredThe name of the app
-
--jsonboolean default: 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
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
--namestring requiredThe new name of the app
-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredOne or more app IDs to delete
-
--forceboolean alias: --y default: falseSkip the confirmation prompt
-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--variationstring alias: --VA flag variation, in the form "name=value" (repeatable)
-
--default-variationstring alias: --defaultThe name of the variation to serve by default (defaults to off for boolean flags, otherwise the first variation)
-
--typestring alias: --tThe variation value type (inferred when omitted)
-
--descriptionstring alias: --dA description of the flag
-
--disabledboolean default: 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)
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
--limitnumberThe maximum number of flags to return (1-200)
-
--cursorstringThe pagination cursor from a previous list call
-
--allboolean default: falseFetch every flag, following pagination automatically
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: falseInstall Cloudflare skills for detected AI coding agents before running the command
-
--profilestringUse a specific auth profile
flagship flags pull
Pull feature flags from a Flagship app into the local flag store
npx wrangler flagship flags pull <APP-ID>yarn wrangler flagship flags pull <APP-ID>pnpm wrangler flagship flags pull <APP-ID>-
<APP-ID>string requiredThe ID of the app to pull flags from
-
--persist-tostringSpecify directory to use for local persistence
-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--enablebooleanEnable the flag
-
--disablebooleanDisable the flag
-
--descriptionstring alias: --dA new description for the flag (pass "" to clear it)
-
--default-variationstring alias: --defaultThe name of the variation to serve by default
-
--typestring alias: --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-rulesboolean default: falseRemove all targeting rules
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--variationstring aliases: --variant, --V requiredThe variation to serve by default
-
--clear-rulesboolean default: falseClear targeting rules so this variation is always served
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--prioritynumber requiredThe 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-conditionsboolean default: falseRemove conditions so the rule matches all contexts
-
--rolloutstringThe rollout, in the form "percentage" or "percentage%@attribute"
-
--clear-rolloutboolean default: falseRemove the rollout from this rule
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--prioritynumber requiredThe priority of the rule to delete
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--orderstring requiredComma-separated existing rule priorities in their new order, for example 2,1,3
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--weightstring alias: --wA variation weight, in the form "variation=weight" (repeatable)
-
--bystringContext attribute used for sticky bucketing
-
--default-variationstring alias: --defaultFallback variation when bucketing cannot run
-
--forceboolean alias: --y default: falseSkip the confirmation prompt when this split replaces existing targeting rules
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--tostring requiredVariation to roll out
-
--percentagenumber requiredPercentage of traffic to serve the rollout variation (0-100)
-
--bystringContext attribute used for sticky bucketing
-
--from-variationstring alias: --fromFallback variation for the remaining traffic
-
--forceboolean alias: --y default: falseSkip the confirmation prompt when this rollout replaces existing targeting rules
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredOne or more flag keys to enable
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredOne or more flag keys to disable
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--contextstring aliases: --ctx, --CEvaluation context, in the form "name=value" (repeatable)
-
--targeting-keystringStable bucketing key for percentage rollouts
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredOne or more flag keys to delete
-
--forceboolean alias: --y default: falseSkip the confirmation prompt
-
--jsonboolean default: falseReturn output as JSON
-
--localbooleanUse the local flag store instead of the remote app
-
--remotebooleanUse the remote app instead of the local flag store
-
--persist-tostringSpecify directory to use for local persistence
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: 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>string requiredThe ID of the app
-
<KEY>string requiredThe key of the flag
-
--limitnumberThe maximum number of entries to return (1-200)
-
--cursorstringThe pagination cursor from a previous changelog call
-
--allboolean default: falseFetch every entry, following pagination automatically
-
--jsonboolean default: falseReturn output as JSON
Global flags
-
--vboolean alias: --versionShow version number
-
--cwdstringRun as if Wrangler was started in the specified directory instead of the current working directory
-
--configstring alias: --cPath to Wrangler configuration file
-
--envstring alias: --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
-
--install-skillsboolean default: falseInstall Cloudflare skills for detected AI coding agents before running the command
-
--profilestringUse a specific auth profile