Authentication Methods
OpenLinear tries methods in this priority order:GitHub CLI reuse
If GitHub CLI (
gh) is already authenticated on your machine, openlinear github login reuses that local token automatically.Browser-based OAuth
If
OPENLINEAR_GITHUB_CLIENT_SECRET is set, OpenLinear starts a temporary callback server on http://localhost:<port>/callback, opens GitHub in your browser, and stores the token locally.Commands
Login
Status
Identity
Logout
Environment Variables
These are only needed for the browser-based OAuth flow. Device flow works without any configuration.
| Variable | Required | Description |
|---|---|---|
OPENLINEAR_GITHUB_CLIENT_SECRET | For browser flow | GitHub OAuth app client secret |
OPENLINEAR_GITHUB_CALLBACK_HOST | No | Callback host override (default: localhost) |
OPENLINEAR_GITHUB_CALLBACK_PORT | No | Callback port override (default: 0 — random available port) |
OPENLINEAR_GITHUB_CALLBACK_PATH | No | Callback path override (default: /callback) |
Browser Flow Setup
To use the browser OAuth flow, you need a GitHub OAuth app:Create a GitHub OAuth App
Go to GitHub Developer Settings and create a new OAuth App.
Token Storage
Tokens are stored locally at:Desktop App Integration
The desktop app also supports GitHub authentication through its UI:- Local GitHub CLI — The sidecar API checks for an existing
ghauth token - Browser OAuth — The desktop app can initiate OAuth via the sidecar API
- Device Flow — Available as a fallback from the Settings page

