Flagship (2)·续1

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags pull

Pull feature flags from a Flagship app into the local flag store

npmyarnpnpm

npx wrangler flagship flags pull <APP-ID>
yarn wrangler flagship flags pull <APP-ID>
pnpm wrangler flagship flags pull <APP-ID>
  • <APP-ID> string required

The ID of the app to pull flags from - --persist-to string Specify directory to use for local persistence - --json boolean default: false

Return output as JSON

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags update

Update a feature flag in a Flagship app

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --enable boolean Enable the flag - --disable boolean Disable the flag - --description string alias: --d

A new description for the flag (pass "" to clear it) - --default-variation string alias: --default

The name of the variation to serve by default - --type string alias: --t

The value type used to coerce --set-variation values - --set-variation string Add or replace a variation, in the form "name=value" - --remove-variation string Remove a variation by name - --rule string Replace the flag's targeting rules (repeatable) - --rule-json string Replace the flag's targeting rules using JSON (repeatable) - --add-rule string Append a targeting rule, keeping the existing rules (repeatable) - --add-rule-json string Append a targeting rule using JSON, keeping the existing rules (repeatable) - --clear-rules boolean default: false

Remove all targeting rules - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags set

Set the default variation served by a feature flag

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --variation string aliases: --variant, --Vrequired

The variation to serve by default - --clear-rules boolean default: false

Clear targeting rules so this variation is always served - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags rules list

List targeting rules for a feature flag

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags rules update

Update one targeting rule for a feature flag

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --priority number required

The priority of the rule to update - --serve string The variation to serve when this rule matches - --when string The rule conditions, using the same syntax as --rule when=... - --clear-conditions boolean default: false

Remove conditions so the rule matches all contexts - --rollout string The rollout, in the form "percentage" or "percentage%@attribute" - --clear-rollout boolean default: false

Remove the rollout from this rule - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags rules delete

Delete one targeting rule from a feature flag

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --priority number required

The priority of the rule to delete - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags rules reorder

Reorder targeting rules for a feature flag

npmyarnpnpm

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 required

The ID of the app - <KEY> string required

The key of the flag - --order string required

Comma-separated existing rule priorities in their new order, for example 2,1,3 - --json boolean default: false

Return output as JSON - --local boolean Use the local flag store instead of the remote app - --remote boolean Use the remote app instead of the local flag store - --persist-to string Specify directory to use for local persistence

<details>

<summary>

Global flags

</summary>

  • <code>--v</code><code>boolean</code> alias: --version

Show version number - <code>--cwd</code><code>string</code>Run as if Wrangler was started in the specified directory instead of the current working directory - <code>--config</code><code>string</code> alias: --c

Path to Wrangler configuration file - <code>--env</code><code>string</code> alias: --e

Environment to use for operations, and for selecting .env and .dev.vars files - <code>--env-file</code><code>string</code>Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files - <code>--install-skills</code><code>boolean</code> default: false

Install Cloudflare skills for detected AI coding agents before running the command - <code>--profile</code><code>string</code>Use a specific auth profile

</details>

flagship flags split

Split traffic across variations by percentage

npmyarnpnpm

npx wrangler flagship flags split <APP-ID> <KEY>