CLI Authentication | FlightStack
Authentication & session
Section titled “Authentication & session”Five top-level commands cover authentication and CLI session:
| Command | Purpose |
|---|---|
flightstack login | OAuth-flow login through your browser. |
flightstack logout | Sign out and clear stored credentials. |
flightstack config | View or change CLI config (API URL, auto-update). |
flightstack doctor | Diagnose common CLI environment issues. |
flightstack update | Update the CLI binary to the latest release. |
flightstack login
Section titled “flightstack login”Authenticate against FlightStack. Opens a browser tab, completes OAuth, writes credentials to
~/.flightstack/config.json.
flightstack loginOptions
Section titled “Options”| Flag | Alias | Description |
|---|---|---|
--api-url <url> | -a | Override the API URL for this login (use for self-hosted). |
--force | -f | Re-authenticate even if a valid session already exists. |
Examples
Section titled “Examples”# Cloud loginflightstack login
# Self-hosted loginflightstack login --api-url https://flightstack.acme.internal
# Force re-auth (rotate tokens)flightstack login --forceAfter a successful login you’ll see:
✓ Logged in successfully!
Welcome back, you@example.comToken storage
Section titled “Token storage”Credentials are stored at ~/.flightstack/config.json (on Windows: %USERPROFILE%\.flightstack\config.json).
Tokens are refreshed automatically when they expire — no manual intervention required.
flightstack logout
Section titled “flightstack logout”Sign out and remove stored credentials.
flightstack logoutInteractive — confirms before clearing the local config. Use this when switching accounts or preparing a machine for transfer.
flightstack config
Section titled “flightstack config”View and change CLI configuration. By default (no flags) prints the current configuration — API URL, auth state, token expiry, and auto-update setting.
flightstack config [--show] [--api-url <url>] [--auto-update true|false] [--reset]Options
Section titled “Options”| Flag | Alias | Description |
|---|---|---|
--show | -s | Print the current configuration (default). |
--api-url <url> | Set the API URL (must be http:// or https://). | |
--auto-update true|false | Enable or disable auto-update of the CLI. | |
--reset | Reset to defaults (clears credentials and API URL). |
Examples
Section titled “Examples”# Print current configflightstack config
# Switch to self-hostedflightstack config --api-url https://flightstack.acme.internal
# Disable auto-updateflightstack config --auto-update false
# Wipe everythingflightstack config --resetSample output of flightstack config:
FlightStack CLI Configuration────────────────────────────────────────
API URL: https://api.flightstack.voostack.comConfig Path: ~/.flightstack/config.jsonAuto-Update: Enabled
Authentication: Logged inAccount: you@example.comUser ID: 7d2a8c84-…Token Expires: 2026-06-15T01:42:00Zflightstack doctor
Section titled “flightstack doctor”Diagnose common CLI environment issues — Flutter, Dart, Xcode, Android SDK, network reachability, config sanity. Run this first when something is misbehaving.
flightstack doctorDistinct from flightstack agent doctor, which checks agent-side concerns (service installation,
binary version, PID file). See agent commands.
flightstack update
Section titled “flightstack update”Manually update the CLI binary to the latest release. Most installs auto-update — this is the escape hatch.
flightstack updateIf auto-update is enabled, the CLI checks once per day and applies updates in the background.
Disable with flightstack config --auto-update false.
Troubleshooting
Section titled “Troubleshooting”Browser doesn’t open during login
Section titled “Browser doesn’t open during login”The login flow prints the URL on the terminal — copy it into a browser manually.
Token expired
Section titled “Token expired”flightstack login --force issues fresh tokens. Most expirations refresh transparently on the
next command.
Wrong API URL for self-hosted
Section titled “Wrong API URL for self-hosted”flightstack config --api-url https://flightstack.acme.internalflightstack login --forceReset everything
Section titled “Reset everything”flightstack config --resetflightstack login