Repository navigation
Flipside CLI v0.6.4
feat(cli): add API key auth fallback for CI/non-interactive environments (#7472)
- feat(cli): add API key auth fallback for CI/non-interactive environments
Add support for API key authentication as a fallback when session-based
auth isn't available. This is useful for CI pipelines and LLM coding
environments where interactive login isn't possible.
Changes:
- Add APIKey field to SimpleConfig for storing API keys in config file
- Update GetSimpleAPIClient to check for API key when no session token
- Support FLIPSIDE_API_KEY environment variable (overrides config)
- Add
flipside config set api-key <key>command - Update
flipside config showto display auth method - Update
flipside whoamito work with API key auth using v3 endpoints
Auth priority: session token > FLIPSIDE_API_KEY env var > config apiKey
Generated with Claude Code
via Happy
Co-Authored-By: Claude noreply@anthropic.com
Co-Authored-By: Happy yesreply@happy.engineering
- feat(api): add API key auth support to v3AuthUser middleware
Update v3AuthUser middleware to support both JWT and API key authentication.
This enables CLI users to use API keys for all v3 endpoints, not just org-scoped ones.
When using API key auth, the middleware also sets organization context from
the key's associated organization, making it seamless for CLI users.
Auth priority:
- JWT (Authorization: Bearer) - tried first if present
- API Key (X-API-Key header) - fallback for CI/headless environments
Generated with Claude Code
via Happy
Co-Authored-By: Claude noreply@anthropic.com
Co-Authored-By: Happy yesreply@happy.engineering
- feat(api): add API key auth support to v3AuthUser middleware
Update v3AuthUser middleware to support both JWT and API key authentication.
This enables CLI users to use API keys for all v3 endpoints.
Changes:
- v3AuthUser now checks for X-API-Key header when no Bearer token present
- API key auth sets organization context from the key's associated org
- Validate createdById is a valid UUID before using it, fallback to profileId lookup
- Reorder /me routes before /{id} to prevent route matching issues
Auth priority:
- JWT (Authorization: Bearer) - tried first if present
- API Key (X-API-Key header) - fallback for CI/headless environments
Generated with Claude Code
via Happy
Co-Authored-By: Claude noreply@anthropic.com
Co-Authored-By: Happy yesreply@happy.engineering
Co-authored-by: Erik erik@flipside.xyz
Co-authored-by: Claude noreply@anthropic.com
Co-authored-by: Happy yesreply@happy.engineering
Install
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/FlipsideCrypto/flipside-tools/main/install.sh | shWindows: Download the .exe from assets below, or use WSL.