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:
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 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:

Sign Out

To clear your authentication:
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:
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.