On this page

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.

amp flags

amp flags manages feature flags. This command family requires the flags:read and flags:write scopes.

amp flags list

bash
amp flags list --project <project_id> --limit 5

In an interactive terminal, amp flags list prints a human-friendly table. Pipe the output to a file or another command, or pass --json, to get raw API JSON instead.

amp flags create

bash
amp flags create --project <project_id> --key my-flag --name "My Flag"

amp flags get

bash
amp flags get --project <project_id> --flag <flag_id>

amp flags update

Use --project and --flag to identify an existing flag, then pass the fields to update. Run amp flags update --help for the full list of fields it can change, or pass --body-json to merge additional fields into the request:

bash
amp flags update --project <project_id> --flag <flag_id> --body-json '{"description": "Updated description"}'

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 archive

Archiving is destructive. Preview it first with --dry-run, then run the same command without it to archive the flag:

bash
amp flags archive --project <project_id> --flag <flag_id> --dry-run   # preview
amp flags archive --project <project_id> --flag <flag_id>             # archive

Configuration documents --project, --json, --dry-run, and --body-json in full.

Was this helpful?