Skip to main content

Authentication

Browser login​

On your own machine, sign in through the browser:

gameflow login

The CLI opens GameFlow in your browser. Once you approve, it stores a session in ~/.gameflow/config.yaml and renews it for you. gameflow whoami confirms who you are authenticated as, and gameflow logout ends the session and removes the stored credentials.

API keys​

For CI, scripts and machines without a browser, use an API key instead:

gameflow login --api-key gf_******************

To keep the key out of your shell history, read it from stdin:

echo "$GAMEFLOW_KEY" | gameflow login --api-key-stdin

Environment variables​

In CI and scripts you can skip the config file and pass the key through the environment. When GAMEFLOW_API_KEY is set, the CLI does not use the stored login.

VariablePurpose
GAMEFLOW_API_KEYAPI key to use instead of the stored one.
GAMEFLOW_TOKENShort-lived token, used by GameFlow's own tools. Takes precedence over the API key.

In CI, pass the key from your platform's secret store rather than committing it, and give that key an expiry so a leaked pipeline secret stops working on its own.

Credential order​

The CLI uses the first credential it finds:

  1. GAMEFLOW_TOKEN
  2. GAMEFLOW_API_KEY
  3. The session stored by gameflow login
  4. A stored API key

An environment variable always wins over what is stored, so gameflow logout does not sign you out of a shell that exports GAMEFLOW_API_KEY.

Roles​

RoleCan run
viewerCommands that read.
engineerCommands that change something.

gameflow schema lists the role of every command. A command your role is too low for fails with role_too_low.