The LeadMagic CLI includes chat-first workflows plus direct commands for deterministic enrichment, analytics, automation, and outbound handoff. Run lm help for the current command list or lm COMMAND --help for command-specific flags.
Global Options
Option Description -v, --versionPrint the CLI version --debugEnable debug logging, also available with LM_DEBUG=1 -h, --helpShow help for a command
Everyday Commands
Command What it does Example lm / lm chatStart the AI data chat lmlm loginSign in with browser OAuth lm loginlm logoutSign out lm logoutlm dashboardShow account and credit details lm dashboardlm creditsShow credit balance lm creditslm pricingShow enrichment pricing cheat sheet lm pricinglm statusShow auth, config, AI routing, and credit status lm statuslm doctorDiagnose CLI, auth, database, and system issues lm doctor --fixlm updateCheck for and install CLI updates lm update --check
Data And AI Commands
Use these when you want file-level analysis or one-off AI assistance outside chat.
Command What it does Example lm scanFind CSV, TSV, and Excel files lm scan ./exports -d 3lm analyzeProfile data quality, columns, and coverage lm analyze contacts.csvlm runRun an AI prompt on a file lm run -f contacts.csv -p "summarize this data"lm thinkRun an AI prompt with reasoning mode lm think -f leads.csv -p "which rows should I prioritize?"
Enrichment Commands
Direct enrichment commands call LeadMagic for specific lookup types.
Command What it does Example lm enrichEnrich a CSV or Excel file with auto-detected columns lm enrich -i contacts.csv --batch-size 25lm validateValidate email deliverability for addresses or a file column lm validate -f contacts.csv -c emaillm find emailFind a work email from name plus domain or company lm find email -f Alex -l Rivera -d example.comlm find mobileFind a mobile number from profile URL, work email, or personal email lm find mobile -p https://linkedin.com/in/morgan-leelm find roleFind people by title or function at a company lm find role -c Example Robotics -t "VP Sales"lm find employeesList employees at a company lm find employees -d example.com --limit 25lm find profileResolve an email to a LinkedIn/B2B profile lm find profile -e alex.rivera@example.comlm find profile-searchFetch a full professional profile from a profile URL or handle lm find profile-search -p linkedin.com/in/morgan-leelm find linkedin-to-emailConvert a LinkedIn profile URL to a work email lm find linkedin-to-email -p https://linkedin.com/in/morgan-leelm find personal-emailFind personal emails from a LinkedIn profile lm find personal-email -p https://linkedin.com/in/morgan-leelm find jobsSearch job postings by company, title, location, seniority, remote status, and recency lm find jobs -c Example Robotics --level senior --remote
Company Research
The research command focuses on account intelligence signals.
Command What it does Example lm research competitorsFind competitor companies lm research competitors -d example.comlm research fundingShow funding rounds, investors, revenue, and financial context lm research funding -d example.orglm research techShow a company’s technology stack lm research tech -d example.com -c Example Robotics
Local Database
LeadMagic stores imported data, enrichment output, chat history, recipes, schedules, and run history in a local analytics database. Use SQL when you want exact answers.
Command What it does Example lm query sqlRun SQL against local tables lm query sql "SELECT status, COUNT(*) FROM contacts GROUP BY status"lm query tablesList local tables lm query tableslm query schemaShow table schema lm query schema contactslm db initInitialize the database and migrations lm db initlm db statsShow memory, database size, table count, and row counts lm db statslm db healthRun deep health checks with cleanup and performance hints lm db healthlm db vacuumCompact the database, checkpoint WAL, and update stats lm db vacuumlm db analyzeUpdate query optimizer statistics lm db analyzelm db repairRepair stale WAL/temp files and re-run migrations lm db repairlm db unlockRelease stale local database locks lm db unlock --yeslm db resetRecreate the database from scratch lm db reset --confirm
lm db reset --confirm deletes local tables and run history. Export anything important first.
Recipes, Schedules, And Watch Mode
Recipes are YAML enrichment pipelines. They make repeated cleanup and enrichment work predictable, estimable, and automatable.
Command What it does Example lm recipe listList built-in and custom recipes lm recipe listlm recipe showPrint recipe YAML lm recipe show outbound-cleanuplm recipe validateValidate a recipe file lm recipe validate outbound-cleanuplm recipe estimateEstimate credits before a run lm recipe estimate outbound-cleanup -i leads.csvlm recipe runExecute a recipe on a CSV lm recipe run outbound-cleanup -i leads.csv -o ./outlm recipe deleteDelete a custom recipe lm recipe delete my-recipelm schedule createRun a recipe on a cron or interval lm schedule create --recipe outbound-cleanup -i leads.csv --every dailylm schedule listList schedules lm schedule listlm schedule pause / resume / deleteManage schedules lm schedule pause SCHEDULE_IDlm schedule run-nowExecute a schedule immediately lm schedule run-now SCHEDULE_IDlm schedule historyShow recent scheduled run history lm schedule history -n 20lm schedule daemonStart the foreground scheduler lm schedule daemon --poll-interval 60lm watch setupConfigure an inbound folder workflow lm watch setuplm watch startProcess new files as they arrive lm watch start --recipe outbound-cleanuplm watch statusShow watch folder status lm watch statuslm watch stopStop an active watcher lm watch stop
Job Change Monitoring
Use job-change commands to check whether contacts still work where you expect.
Command What it does Example lm job-change checkCheck one profile against an expected company lm job-change check --profile https://linkedin.com/in/alex-rivera --company-domain example.comlm job-change batchCheck eligible contacts from the local contacts table lm job-change batch -ylm job-change historyShow recent contact-level results lm job-change history -n 20lm job-change runsShow batch and scheduled run summaries lm job-change runs
Alias: lm jc.
Outbound Integrations
Push enriched, eligible contacts from the local database into outbound platforms. Each integration can verify credentials, list or create campaigns, push leads, show push history, export campaign leads, and read campaign stats.
Platform Commands Instantly connect, campaigns, create, push, history, stats, leadsEmailBison connect, campaigns, create, push, history, stats, leadsExample Robotics connect, campaigns, create, push, history, stats, leads
Examples:
lm integrations instantly connect
lm integrations instantly campaigns
lm integrations instantly push --campaign < i d >
lm integrations emailbison leads < campaign-i d > --output leads.csv
lm integrations smartlead stats < campaign-i d >
Alias: lm int.
Configuration And Setup
Command What it does Example lm initInitialize project or global LeadMagic workspace lm init --locallm config getRead a config value lm config get dbPathlm config setSet a config value, prompting securely for sensitive keys lm config set instantlyApiKeylm config showShow account, database, AI, integration, and display config lm config showlm config interactiveOpen the interactive configuration UI lm config interactivelm completions installInstall shell completions for bash, zsh, or fish lm completions install -s zshlm completions showPrint completion script lm completions show -s fishlm completions uninstallRemove installed completions lm completions uninstalllm welcomeShow the welcome and setup status screen lm welcome --fast
Useful config keys include dbPath, dbMemoryLimit, dbThreads, outputDir, theme, plainTextMessages, instantlyApiKey, emailBisonApiKey, emailBisonInstanceUrl, and smartleadApiKey.
Common Workflows
Clean and enrich a lead file
lm analyze leads.csv
lm enrich -i leads.csv --batch-size 25
lm query sql "SELECT * FROM contacts WHERE email_status = 'valid'"
lm research funding -d example.com
lm research competitors -d example.com
lm research tech -d example.com -c Example Robotics
lm find jobs -c Example Robotics --posted-within 30
Automate weekly enrichment
lm recipe estimate outbound-cleanup -i weekly-leads.csv
lm schedule create --recipe outbound-cleanup -i weekly-leads.csv --cron "0 9 * * 1"
lm schedule daemon
Push ready leads to outbound
lm integrations instantly connect
lm integrations instantly campaigns
lm integrations instantly push --campaign < i d >
lm integrations instantly history