Sign In
The recommended way to authenticate is the browser-based OAuth flow:-y:
Set Your API Key
After signing in, set your API key for enrichment and validation:Environment Variable
As an alternative to the config file, set theLEADMAGIC_API_KEY environment variable:
~/.zshrc, ~/.bashrc, etc.) for persistence. The environment variable takes precedence over the config file.
Config File
Authentication state and API key are stored in the config file:- Global:
~/.leadmagic/config.json - Project-local:
.leadmagic/config.json(when run inside a project directory)
.leadmagic/ directory exists in the current or parent directory. Otherwise it falls back to the global config.
One Key for Everything
Your LeadMagic API key powers all CLI features:| Feature | Requires API Key |
|---|---|
AI Chat (lm chat) | Yes — routes through AI Gateway |
Enrichment (lm enrich) | Yes |
Email Validation (lm validate) | Yes |
Contact Finding (lm find) | Yes |
Credit Check (lm dashboard) | Yes |
File Analysis (lm analyze) | No |
Database Queries (lm query) | No |
Health Check (lm doctor) | No |
Sign Out
To clear your authentication:lm signout, lm sign-out.
Verify Authentication
Check that your credentials are working:lm doctor to diagnose the issue.
Next Steps
Quickstart
Run your first enrichment workflow.
Configuration
All config options including database, model, and theme.