Skip to content
FlightStack Docs
Sign in Start free

CLI Configuration | FlightStack

The CLI keeps everything in a single hidden directory in your home folder. No global system config, no XDG state — just one place to look.

PlatformLocation
macOS, Linux~/.flightstack/
Windows%USERPROFILE%\.flightstack\

The CLI’s main configuration — written by flightstack login and managed by flightstack config.

{
"apiUrl": "https://api.flightstack.voostack.com",
"accessToken": "eyJhbG...",
"refreshToken": "eyJhbG...",
"tokenExpiresAt": "2026-06-15T01:42:00Z",
"userId": "7d2a8c84-...",
"email": "you@example.com",
"autoUpdate": true,
"lastUpdateCheck": "2026-06-14T12:00:00Z"
}
FieldDescription
apiUrlControl-plane base URL. Self-hosted users set this to their domain.
accessTokenCurrent OAuth access token.
refreshTokenUsed to refresh accessToken automatically when it expires.
tokenExpiresAtISO-8601 timestamp when accessToken expires.
userId, emailIdentifies the signed-in user. Convenient for flightstack config.
autoUpdateWhen true, the CLI checks for updates daily and self-installs.
lastUpdateCheckUsed to throttle the update check.

If this machine is also registered as a build agent, the agent writes its own config:

{
"agentId": "a1b2c3d4-…",
"token": "eyJhbG...",
"apiUrl": "https://api.flightstack.voostack.com",
"agentName": "macbook-pro",
"platform": "macOS",
"organizationId": null,
"organizationName": null
}

Written by flightstack agent register. The token here is the agent token — distinct from your user accessToken. It’s used in the Agent-Token HTTP header (see API authentication).

  • agent.log — runtime logs when the agent runs in daemon mode (rotates at ~10 MB).
  • agent.pid — process ID of the running agent. Used by flightstack agent stop and status.
VariableDescription
FLIGHTSTACK_API_URLOverride the API URL for this process only.
FLIGHTSTACK_TOKENOverride the access token for this process only.

Both are read at startup and take precedence over config.json. Useful in CI scripts where you want to inject credentials without writing them to disk.

Terminal window
FLIGHTSTACK_API_URL=https://flightstack.acme.internal \
FLIGHTSTACK_TOKEN=eyJhbG... \
flightstack repo --list

The supported way is flightstack config --api-url <url>:

Terminal window
# Move to self-hosted
flightstack config --api-url https://flightstack.acme.internal
flightstack login --force
# Move back to cloud
flightstack config --api-url https://api.flightstack.voostack.com
flightstack login --force

You can also edit config.json directly, but you’ll need to re-authenticate either way — tokens are tied to the API URL they were issued against.

Wipe everything (config, tokens, agent registration):

Terminal window
flightstack config --reset
# or, manually:
rm -rf ~/.flightstack

Then run flightstack login again.

See Self-hosting → options for picking a deployment model, and Self-hosting → configuration for what URL to point the CLI at.