Skip to main content
The LeadMagic CLI uses browser OAuth for chat, enrichment, validation, credits, and account-backed features. Your session is stored locally and refreshed when possible.

Sign In

The recommended way to authenticate is the browser-based OAuth flow:
lm login
This opens your browser to sign in to LeadMagic. After authentication, your session is saved locally. You can skip the browser confirmation prompt with -y:
lm login -y
lm login also accepts the aliases lm auth, lm signin, and lm sign-in.

Config File

Authentication state is stored in the config file:
  • Global: ~/.leadmagic/config.json
  • Project-local: .leadmagic/config.json (when run inside a project directory)
The CLI uses project-local config when a .leadmagic/ directory exists in the current or parent directory. Otherwise it falls back to the global config.
Keep authentication files secret. Never commit config.json to version control. The .leadmagic/ directory should be in your .gitignore.

One Login For Everything

Your LeadMagic login powers account-backed CLI features:
FeatureRequires Login
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 logout
This removes the stored auth token while preserving non-auth configuration such as database, theme, and integration settings. Aliases: lm signout, lm sign-out.

Verify Authentication

Check that your credentials are working:
lm dashboard
This displays your account info and credit balance. If authentication is failing, run lm doctor to diagnose the issue.

Next Steps

Quickstart

Run your first enrichment workflow.

Configuration

All config options including database, model, and theme.