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.
| Variable | Purpose |
|---|---|
GAMEFLOW_API_KEY | API key to use instead of the stored one. |
GAMEFLOW_TOKEN | Short-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:
GAMEFLOW_TOKENGAMEFLOW_API_KEY- The session stored by
gameflow login - 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
| Role | Can run |
|---|---|
viewer | Commands that read. |
engineer | Commands that change something. |
gameflow schema lists the role of every command. A command your role is too low for fails with role_too_low.