Skip to main content
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

OptionDescription
-v, --versionPrint the CLI version
--debugEnable debug logging, also available with LM_DEBUG=1
-h, --helpShow help for a command

Everyday Commands

CommandWhat it doesExample
lm / lm chatStart the AI data chatlm
lm loginSign in with browser OAuthlm login
lm logoutSign outlm logout
lm dashboardShow account and credit detailslm dashboard
lm creditsShow credit balancelm credits
lm pricingShow enrichment pricing cheat sheetlm pricing
lm statusShow auth, config, AI routing, and credit statuslm status
lm doctorDiagnose CLI, auth, database, and system issueslm doctor --fix
lm updateCheck for and install CLI updateslm update --check

Data And AI Commands

Use these when you want file-level analysis or one-off AI assistance outside chat.
CommandWhat it doesExample
lm scanFind CSV, TSV, and Excel fileslm scan ./exports -d 3
lm analyzeProfile data quality, columns, and coveragelm analyze contacts.csv
lm runRun an AI prompt on a filelm run -f contacts.csv -p "summarize this data"
lm thinkRun an AI prompt with reasoning modelm think -f leads.csv -p "which rows should I prioritize?"

Enrichment Commands

Direct enrichment commands call LeadMagic for specific lookup types.
CommandWhat it doesExample
lm enrichEnrich a CSV or Excel file with auto-detected columnslm enrich -i contacts.csv --batch-size 25
lm validateValidate email deliverability for addresses or a file columnlm validate -f contacts.csv -c email
lm find emailFind a work email from name plus domain or companylm find email -f Alex -l Rivera -d example.com
lm find mobileFind a mobile number from profile URL, work email, or personal emaillm find mobile -p https://linkedin.com/in/morgan-lee
lm find roleFind people by title or function at a companylm find role -c Example Robotics -t "VP Sales"
lm find employeesList employees at a companylm find employees -d example.com --limit 25
lm find profileResolve an email to a LinkedIn/B2B profilelm find profile -e alex.rivera@example.com
lm find profile-searchFetch a full professional profile from a profile URL or handlelm find profile-search -p linkedin.com/in/morgan-lee
lm find linkedin-to-emailConvert a LinkedIn profile URL to a work emaillm find linkedin-to-email -p https://linkedin.com/in/morgan-lee
lm find personal-emailFind personal emails from a LinkedIn profilelm find personal-email -p https://linkedin.com/in/morgan-lee
lm find jobsSearch job postings by company, title, location, seniority, remote status, and recencylm find jobs -c Example Robotics --level senior --remote

Company Research

The research command focuses on account intelligence signals.
CommandWhat it doesExample
lm research competitorsFind competitor companieslm research competitors -d example.com
lm research fundingShow funding rounds, investors, revenue, and financial contextlm research funding -d example.org
lm research techShow a company’s technology stacklm 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.
CommandWhat it doesExample
lm query sqlRun SQL against local tableslm query sql "SELECT status, COUNT(*) FROM contacts GROUP BY status"
lm query tablesList local tableslm query tables
lm query schemaShow table schemalm query schema contacts
lm db initInitialize the database and migrationslm db init
lm db statsShow memory, database size, table count, and row countslm db stats
lm db healthRun deep health checks with cleanup and performance hintslm db health
lm db vacuumCompact the database, checkpoint WAL, and update statslm db vacuum
lm db analyzeUpdate query optimizer statisticslm db analyze
lm db repairRepair stale WAL/temp files and re-run migrationslm db repair
lm db unlockRelease stale local database lockslm db unlock --yes
lm db resetRecreate the database from scratchlm 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.
CommandWhat it doesExample
lm recipe listList built-in and custom recipeslm recipe list
lm recipe showPrint recipe YAMLlm recipe show outbound-cleanup
lm recipe validateValidate a recipe filelm recipe validate outbound-cleanup
lm recipe estimateEstimate credits before a runlm recipe estimate outbound-cleanup -i leads.csv
lm recipe runExecute a recipe on a CSVlm recipe run outbound-cleanup -i leads.csv -o ./out
lm recipe deleteDelete a custom recipelm recipe delete my-recipe
lm schedule createRun a recipe on a cron or intervallm schedule create --recipe outbound-cleanup -i leads.csv --every daily
lm schedule listList scheduleslm schedule list
lm schedule pause / resume / deleteManage scheduleslm schedule pause SCHEDULE_ID
lm schedule run-nowExecute a schedule immediatelylm schedule run-now SCHEDULE_ID
lm schedule historyShow recent scheduled run historylm schedule history -n 20
lm schedule daemonStart the foreground schedulerlm schedule daemon --poll-interval 60
lm watch setupConfigure an inbound folder workflowlm watch setup
lm watch startProcess new files as they arrivelm watch start --recipe outbound-cleanup
lm watch statusShow watch folder statuslm watch status
lm watch stopStop an active watcherlm watch stop

Job Change Monitoring

Use job-change commands to check whether contacts still work where you expect.
CommandWhat it doesExample
lm job-change checkCheck one profile against an expected companylm job-change check --profile https://linkedin.com/in/alex-rivera --company-domain example.com
lm job-change batchCheck eligible contacts from the local contacts tablelm job-change batch -y
lm job-change historyShow recent contact-level resultslm job-change history -n 20
lm job-change runsShow batch and scheduled run summarieslm 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.
PlatformCommands
Instantlyconnect, campaigns, create, push, history, stats, leads
EmailBisonconnect, campaigns, create, push, history, stats, leads
Example Roboticsconnect, campaigns, create, push, history, stats, leads
Examples:
lm integrations instantly connect
lm integrations instantly campaigns
lm integrations instantly push --campaign <id>
lm integrations emailbison leads <campaign-id> --output leads.csv
lm integrations smartlead stats <campaign-id>
Alias: lm int.

Configuration And Setup

CommandWhat it doesExample
lm initInitialize project or global LeadMagic workspacelm init --local
lm config getRead a config valuelm config get dbPath
lm config setSet a config value, prompting securely for sensitive keyslm config set instantlyApiKey
lm config showShow account, database, AI, integration, and display configlm config show
lm config interactiveOpen the interactive configuration UIlm config interactive
lm completions installInstall shell completions for bash, zsh, or fishlm completions install -s zsh
lm completions showPrint completion scriptlm completions show -s fish
lm completions uninstallRemove installed completionslm completions uninstall
lm welcomeShow the welcome and setup status screenlm welcome --fast
Useful config keys include dbPath, dbMemoryLimit, dbThreads, outputDir, theme, plainTextMessages, instantlyApiKey, emailBisonApiKey, emailBisonInstanceUrl, and smartleadApiKey.

Common Workflows

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
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
lm integrations instantly connect
lm integrations instantly campaigns
lm integrations instantly push --campaign <id>
lm integrations instantly history