Authentication
Authenticate the CLI to access your blueprints, pull from the marketplace, and sync configurations with your LynxPrompt account.
Login
The login command opens your browser for secure OAuth authentication. You'll sign in with your existing LynxPrompt account (GitHub, Google, or Magic Link).
$ lynxprompt login
š Opening browser to authenticate...
https://lynxprompt.com/auth/signin?cli_session=abc123
Waiting for authentication... ā
ā
Logged in as [email protected]
Plan: Pro
Token stored securely in config
You're ready to use LynxPrompt CLI!How it works
- CLI generates a unique session ID
- Your browser opens to the LynxPrompt sign-in page
- You authenticate using your preferred method
- A CLI-specific API token is automatically created
- Token is securely stored in your config directory
Check Login Status
Use the whoami command to verify your authentication status and see account details.
$ lynxprompt whoami
š¤ Logged in as [email protected]
Plan: Pro
Member since: January 2025If you're not logged in, the command will show:
$ lynxprompt whoami
ā Not logged in
Run 'lynxprompt login' to authenticate.Logout
Remove stored credentials and log out of the CLI.
$ lynxprompt logout
ā
Logged out successfully
Credentials removed from configCI/CD Authentication
For CI/CD pipelines and automation, use the LYNXPROMPT_TOKEN environment variable instead of interactive login.
Generate a dedicated API token from Settings ā API Tokens for CI/CD use. Never expose your personal token in scripts or logs.
GitHub Actions
# .github/workflows/sync-config.yml
name: Sync AI Config
on:
push:
branches: [main]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install LynxPrompt CLI
run: npm install -g lynxprompt
- name: Pull blueprint
env:
LYNXPROMPT_TOKEN: ${{ secrets.LYNXPROMPT_TOKEN }}
run: lynxprompt pull bp_your_blueprint_id --yesShell script
# Export the token (or set in .env)
export LYNXPROMPT_TOKEN=lp_your_token_here
# Commands will use the token automatically
lynxprompt list
lynxprompt pull bp_abc123 --yesToken Storage
When you log in interactively, the CLI stores your API token in a config file:
| Platform | Config Location |
|---|---|
| macOS | ~/Library/Application Support/lynxprompt/config.json |
| Linux | ~/.config/lynxprompt/config.json |
| Windows | %APPDATA%\lynxprompt\config.json |
Security
The config file is stored with user-only permissions. The token has a long expiry (1 year) and can be revoked anytime from your Settings page.
Troubleshooting
Browser doesn't open
If the browser doesn't open automatically, copy the URL shown in the terminal and paste it in your browser manually.
Authentication times out
The CLI waits 5 minutes for authentication. If it times out, run lynxprompt login again.
Token expired
If you see "Token expired" errors, run lynxprompt login to generate a new token.
Next: Commands
Learn all the available CLI commands and options.