Clay logo

LeadMagic has made more than one billion API calls with Clay and won The Unstoppable Wheel award.

Recap
LeadMagicDocs

LeadMagic CLI Configuration

Configure LeadMagic CLI paths, project-local or global storage, themes, exports, and third-party outbound integrations.

LeadMagic CLI stores configuration in JSON and supports a small set of environment overrides. LeadMagic authentication comes from lm login and browser OAuth, not a static LeadMagic apiKey in config.

Config File Location

LocationPathWhen used
Project-local.leadmagic/config.json.leadmagic/ exists in current or parent directory
Global~/.leadmagic/config.jsonFallback

Managing Config

Common keys

KeyDescription
baseUrlLeadMagic API base (https://api.leadmagic.io)
dbPathLocal data file path
dbMemoryLimite.g. 2GB, 512MB
dbThreadsThread count (1–256)
workerBaseUrlLeadMagic service URL
outputDirExport directory
scrollSpeedWorkspace scroll speed (1–10)
themeColor theme name
plainTextMessagesRender messages as plain text
instantlyApiKeyInstantly.ai
emailBisonApiKey / emailBisonInstanceUrlEmailBison
smartleadApiKeySmartlead

Managed automatically

KeyNotes
authToken / refreshToken / authTokenExpiresAtFrom lm login
userInfoCached profile
aiModelRead-only: managed by LeadMagic
acceptedTermsAtTerms acceptance timestamp

Environment Variables

VariableDescription
LM_WORKER_URLOverride the LeadMagic service URL
LM_DEBUG=1Debug logging

Database

CommandDescription
lm db initCreate DB + migrations
lm db statsStats and memory
lm db vacuumCompact / reclaim space
lm db analyzeOptimizer stats
lm db repairFix corruption + re-migrate
lm db resetDrop all tables
lm db unlockClear stale locks

lm db reset is destructive. Exports under .leadmagic/export/ are preserved.

Themes

Or in chat: /theme

Available themes: leadmagic (default), catppuccin, dracula, tokyo-night, nord, gruvbox, rosepine, monokai, solarized, github, one-dark.

Export Directory

Recipes & Watch Paths

PathPurpose
~/.leadmagic/recipes/Custom recipe YAML
~/.leadmagic/watch/Hot-folder config + inbound/processing/done/failed
.leadmagic/icp.jsonICP definitions

Next Steps