Skip to content

非公式本サイトは非公式の日本語ドキュメントであり、Cloudflare 公式サイトではありません。最新情報はdevelopers.cloudflare.comをご確認ください。

Flagship

最終更新 Markdown で表示Agent セットアップ

コマンドラインから Flagship アプリとフィーチャーフラグを管理するには、wrangler flagship を使います。

wrangler flagship は Wrangler v4.107.0 以降で使えます。

認証

wrangler login を実行するか、Flagship の権限を持つ API トークンを CLOUDFLARE_API_TOKEN に設定します。

権限 必要な操作
flagship:read アプリの一覧、フラグの確認、フラグの評価、変更履歴の読み取り。
flagship:write アプリまたはフラグの作成、更新、削除、有効化、無効化、ロールアウト、分割。

ほとんどの書き込みワークフローは、更新前に現在のフラグを読み取ります。運用では両方の権限を付与してください。

アプリ ID

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=trueoff=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"

引用符で囲んでいない値の外側では、大文字の ANDOR で条件を組み合わせます。予約語や区切り文字を含む値は引用符で囲みます。

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 ルールの両方を、リクエスト送信前に検証します。

ルールセット全体を書き直さずに、既存のルールを 1 つだけ変更します。

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 出力を壊さないようにするためです。条件付きの既存ターゲティングルールを置き換える場合、rolloutsplit も同様に --force が必要です。

ターゲティングルール、ロールアウト、トラフィック分割、変更履歴、--json によるスクリプティングを含む一連の手順は、Flagship Wrangler コマンドリファレンス を参照してください。

コマンド

flagship apps create

Create a Flagship app

npx wrangler flagship apps create [NAME]
  • [NAME]string required

    The name of the app

  • --jsonboolean default: false

    Return output as JSON

  • --use-remoteboolean

    Use a remote binding when adding the newly created resource to your config

  • --update-configboolean

    Automatically update your config file with the newly added resource

  • --bindingstring

    The binding name of this resource in your Worker

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship apps list

List Flagship apps

npx wrangler flagship apps list
  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship apps get

Get a Flagship app

npx wrangler flagship apps get [APP-ID]
  • [APP-ID]string required

    The ID of the app

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship apps update

Update a Flagship app

npx wrangler flagship apps update [APP-ID]
  • [APP-ID]string required

    The ID of the app

  • --namestring required

    The new name of the app

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship apps delete

Delete a Flagship app

npx wrangler flagship apps delete [APP-ID]
  • [APP-ID]string required

    One or more app IDs to delete

  • --forceboolean alias: --ydefault: false

    Skip the confirmation prompt

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags create

Create a feature flag in a Flagship app

npx wrangler flagship flags create [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --variationstring alias: --V

    A flag variation, in the form "name=value" (repeatable)

  • --default-variationstring alias: --default

    The name of the variation to serve by default (defaults to off for boolean flags, otherwise the first variation)

  • --typestring alias: --t

    The variation value type (inferred when omitted)

  • --descriptionstring alias: --d

    A description of the flag

  • --disabledboolean default: false

    Create the flag in a disabled state

  • --rulestring

    A 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-jsonstring

    A targeting rule as a JSON object (repeatable)

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags list

List feature flags in a Flagship app

npx wrangler flagship flags list [APP-ID]
  • [APP-ID]string required

    The ID of the app

  • --limitnumber

    The maximum number of flags to return (1-200)

  • --cursorstring

    The pagination cursor from a previous list call

  • --allboolean default: false

    Fetch every flag, following pagination automatically

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags get

Get a feature flag from a Flagship app

npx wrangler flagship flags get [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags update

Update a feature flag in a Flagship app

npx wrangler flagship flags update [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --enableboolean

    Enable the flag

  • --disableboolean

    Disable the flag

  • --descriptionstring alias: --d

    A new description for the flag (pass "" to clear it)

  • --default-variationstring alias: --default

    The name of the variation to serve by default

  • --typestring alias: --t

    The value type used to coerce --set-variation values

  • --set-variationstring

    Add or replace a variation, in the form "name=value"

  • --remove-variationstring

    Remove a variation by name

  • --rulestring

    Replace the flag's targeting rules (repeatable)

  • --rule-jsonstring

    Replace the flag's targeting rules using JSON (repeatable)

  • --add-rulestring

    Append a targeting rule, keeping the existing rules (repeatable)

  • --add-rule-jsonstring

    Append a targeting rule using JSON, keeping the existing rules (repeatable)

  • --clear-rulesboolean default: false

    Remove all targeting rules

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags set

Set the default variation served by a feature flag

npx wrangler flagship flags set [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --variationstring aliases: --variant, --Vrequired

    The variation to serve by default

  • --clear-rulesboolean default: false

    Clear targeting rules so this variation is always served

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags rules list

List targeting rules for a feature flag

npx wrangler flagship flags rules list [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use 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]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --prioritynumber required

    The priority of the rule to update

  • --servestring

    The variation to serve when this rule matches

  • --whenstring

    The rule conditions, using the same syntax as --rule when=...

  • --clear-conditionsboolean default: false

    Remove conditions so the rule matches all contexts

  • --rolloutstring

    The rollout, in the form "percentage" or "percentage%@attribute"

  • --clear-rolloutboolean default: false

    Remove the rollout from this rule

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use 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]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --prioritynumber required

    The priority of the rule to delete

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags rules reorder

Reorder targeting rules for a feature flag

npx wrangler flagship flags rules reorder [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --orderstring required

    Comma-separated existing rule priorities in their new order, for example 2,1,3

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags split

Split traffic across variations by percentage

npx wrangler flagship flags split [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --weightstring alias: --w

    A variation weight, in the form "variation=weight" (repeatable)

  • --bystring

    Context attribute used for sticky bucketing

  • --default-variationstring alias: --default

    Fallback variation when bucketing cannot run

  • --forceboolean alias: --ydefault: false

    Skip the confirmation prompt when this split replaces existing targeting rules

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags rollout

Roll out one variation to a percentage of traffic

npx wrangler flagship flags rollout [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --tostring required

    Variation to roll out

  • --percentagenumber required

    Percentage of traffic to serve the rollout variation (0-100)

  • --bystring

    Context attribute used for sticky bucketing

  • --from-variationstring alias: --from

    Fallback variation for the remaining traffic

  • --forceboolean alias: --ydefault: false

    Skip the confirmation prompt when this rollout replaces existing targeting rules

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags enable

Enable a feature flag

npx wrangler flagship flags enable [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    One or more flag keys to enable

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags disable

Disable a feature flag

npx wrangler flagship flags disable [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    One or more flag keys to disable

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags evaluate

Evaluate a feature flag with optional context

npx wrangler flagship flags evaluate [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --contextstring aliases: --ctx, --C

    Evaluation context, in the form "name=value" (repeatable)

  • --targeting-keystring

    Stable bucketing key for percentage rollouts

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags delete

Delete a feature flag from a Flagship app

npx wrangler flagship flags delete [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    One or more flag keys to delete

  • --forceboolean alias: --ydefault: false

    Skip the confirmation prompt

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

flagship flags changelog

Show the changelog for a feature flag

npx wrangler flagship flags changelog [APP-ID] [KEY]
  • [APP-ID]string required

    The ID of the app

  • [KEY]string required

    The key of the flag

  • --limitnumber

    The maximum number of entries to return (1-200)

  • --cursorstring

    The pagination cursor from a previous changelog call

  • --allboolean default: false

    Fetch every entry, following pagination automatically

  • --jsonboolean default: false

    Return output as JSON

Global flags

  • --vboolean alias: --version

    Show version number

  • --cwdstring

    Run as if Wrangler was started in the specified directory instead of the current working directory

  • --configstring alias: --c

    Path to Wrangler configuration file

  • --envstring alias: --e

    Environment to use for operations, and for selecting .env and .dev.vars files

  • --env-filestring

    Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files

  • --experimental-provisionboolean aliases: --x-provisiondefault: true

    Experimental: Enable automatic resource provisioning

  • --experimental-auto-createboolean alias: --x-auto-createdefault: true

    Automatically provision draft bindings with new resources

  • --install-skillsboolean default: false

    Install Cloudflare skills for detected AI coding agents before running the command

  • --profilestring

    Use a specific auth profile

役に立ちましたか?