Skip to content

Global --account flag (like --zone) instead of only CLOUDFLARE_ACCOUNT_ID #553

Open

Description

@heredia21

Version: 1.0.0-beta.28

When a login can see more than one account, account-level commands (for example cf ai-gateway gateways list, cf ai-gateway logs list, cf accounts billing get-credits) pick the account only from the CLOUDFLARE_ACCOUNT_ID environment variable. There's a global -z, --zone flag for zones, but no matching flag for accounts. Passing --account-id is rejected.

This makes one-off commands and scripts that touch two accounts in a row more awkward: each call has to be prefixed with the env var, and the account isn't visible in the command itself.

Suggestion: a global -a, --account <id or name> flag that overrides CLOUDFLARE_ACCOUNT_ID, the same way --zone overrides CLOUDFLARE_ZONE_ID.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions