amp flags
このページはまだあなたの言語に翻訳されていません。 現在取り組んでいますので、後でもう一度確認してください。
amp flags manages feature flags. This command family requires the flags:read and flags:write scopes.
amp flags list
List feature flags.
amp flags list --project <project_id> --limit 5
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | Yes | Amplitude project identifier, backed by the canonical app ID. Alias: --project-id. |
--cursor | string | No | Opaque cursor from pagination.next_cursor on the previous response. Numeric offsets are capped by the underlying search index (10,000 results per query). Well-formed pagination stops before that window; requests whose cursor would exceed it return 400 pagination_not_supported. Alias: --next-cursor. |
--limit | integer | No | Number of items to return. Defaults to 50, max 200. |
--key | string | No | Filter this list by an exact flag key within the project. Returns the standard list response, or an empty list when no active flag matches. Get, update, and archive require the returned numeric id; those operations do not accept a flag key or resolve one automatically. |
Requires the flags:read scope.
amp flags get
Get feature flag.
amp flags get --project <project_id> --flag <flag_id>
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | Yes | Amplitude project identifier, backed by the canonical app ID. Alias: --project-id. |
--flag | string | Yes | Numeric feature flag ID required by get, update, and archive. A flag key is not accepted or resolved automatically. Find the ID with list flags filtered by the key query parameter. Alias: --flag-id, --key. |
Requires the flags:read scope.
amp flags create
Create feature flag.
amp flags create --project <project_id> --key my-flag --name "My Flag"
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | Yes | Amplitude project identifier, backed by the canonical app ID. Alias: --project-id. |
--idempotency-key | string | No | Generated automatically when omitted. Header acceptance alone does not guarantee retry deduplication. |
--key | string | Yes | Lowercase letters, numbers, hyphens, and underscores only. |
--name | string | Yes | |
--description | string | No | |
--evaluation-mode | string: local, remote | No | |
--bucketing-key | string | No | |
--variants | array | No | JSON array, or a comma-separated list for strings. |
--deployment-ids | array | No | JSON array, or a comma-separated list for strings. |
--rollout-percentage | integer | No | |
--rollout-weights | object | No | Variant-keyed rollout weights. Values may be normalized to sum to 100 (percentages) or expressed as unnormalized relative weights (for example { "control": 1, "treatment": 1 } for an even split). Weights are non-negative and may be fractional. |
--testers | array | No | JSON array, or a comma-separated list for strings. |
--target-segments | array | No | JSON array, or a comma-separated list for strings. |
Requires the flags:write scope.
amp flags update
Updates feature flag metadata and rollout settings. Use --project and --flag to identify an existing flag, then pass the fields to update. Pass --body-json to merge fields that don't have their own flag.
Known issue
amp flags update --enabled false fails for flags that have no deployment. Avoid disabling a deployment-less flag this way until Amplitude fixes the issue.
amp flags update --project <project_id> --flag <flag_id> --body-json '{"description": "Updated description"}'
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | Yes | Amplitude project identifier, backed by the canonical app ID. Alias: --project-id. |
--flag | string | Yes | Numeric feature flag ID required by get, update, and archive. A flag key is not accepted or resolved automatically. Find the ID with list flags filtered by the key query parameter. Alias: --flag-id, --key. |
--idempotency-key | string | No | Generated automatically when omitted. Header acceptance alone does not guarantee retry deduplication. |
--name | string | No | |
--description | string | No | |
--enabled | boolean | No | |
--evaluation-mode | string: local, remote | No | |
--bucketing-key | string | No | |
--rollout-percentage | integer | No | |
--tags | array | No | JSON array, or a comma-separated list for strings. |
Requires the flags:write scope.
amp flags archive
Archives a feature flag. Archiving is destructive: preview it first with --dry-run, then run the same command without it.
amp flags archive --project <project_id> --flag <flag_id> --dry-run # preview
amp flags archive --project <project_id> --flag <flag_id> # archive
| Flag | Type | Required | Description |
|---|---|---|---|
--project | string | Yes | Amplitude project identifier, backed by the canonical app ID. Alias: --project-id. |
--flag | string | Yes | Numeric feature flag ID required by get, update, and archive. A flag key is not accepted or resolved automatically. Find the ID with list flags filtered by the key query parameter. Alias: --flag-id, --key. |
--dry-run | boolean | No | Validate request without performing mutation. |
--idempotency-key | string | No | Generated automatically when omitted. Header acceptance alone does not guarantee retry deduplication. |
Requires the flags:write scope.
これは役に立ちましたか?
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.