Clay logo

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

Recap
LeadMagicDocs

lm Command Reference

Complete reference for the lm command installed by LeadMagic CLI, including chat, enrich, find, recipes, watch, schedules, integrations, and setup.

Run lm help, lm help <command> or lm <command> --help for details. Binary aliases: lm and leadmagic.

For slash commands, agent modes and keyboard shortcuts inside the interactive workspace, see the LeadMagic CLI Workspace guide.

Global Options

OptionDescription
-v, --versionPrint the CLI version
--debugEnable debug logging (also LM_DEBUG=1)
-h, --helpShow help

AI

Interactive workspace for data wrangling and enrichment. Default command: lm with no args starts it.

See the AI Chat guide.

Run an AI prompt on a file. Alias: prompt.

OptionDescription
-f, --file <path>Input CSV or Excel file
-p, --prompt <text>Prompt to execute
-o, --output <path>Save result to file

AI prompt with reasoning mode. Alias: reason.

OptionDescription
-f, --file <path>Input file
-p, --prompt <text>Prompt
-o, --output <path>Save result
-y, --yesSkip permission prompt

Auth

CommandAliasesDescription
lm loginauth, signin, sign-inSign in via browser OAuth. -y skips the confirmation prompt
lm logoutsignout, sign-outSign out

Data

Discover CSV, TSV, and Excel files. Alias: ls.

OptionDefault
[path].
-d, --depth <n>2

Data health report. Alias: health.

Enrich

Batch enrich a CSV/Excel file. Alias: boost.

OptionDescriptionDefault
-i, --input <file>Input file (required)
-o, --output <file>Output path{input}_enriched
--email-column / --first-name-column / --last-name-column / --company-column / --domain-columnColumn overridesAuto-detect
--skip-validationSkip email validationfalse
--batch-size <n>Records per batch (1–100)10
--dry-runEstimate credits without API calls
--jsonJSON output

Validate email deliverability. Alias: verify.

Look up emails, mobiles, people, companies, and jobs. Alias: lookup.

SubcommandPurpose
emailWork email from name + domain/company
mobileMobile number
rolePeople by role at a company
employeesEmployees at a company
profileB2B profile URL from email
linkedin-to-emailWork email from B2B profile URL (CLI name kept for compatibility)
personal-emailPersonal emails from a B2B profile URL
profile-searchFull professional profile
peoplePeople search by company, title, and role
companiesCompany search by identifiers or audience filters
jobsJob postings search by company, title, and hiring signals

Automation

YAML enrichment pipelines.

Built-ins: default-enrich, validate-and-export, full-pipeline. Custom YAML lives in ~/.leadmagic/recipes/.

Hot folder: auto-run a recipe when CSVs arrive.

Recurring enrichment jobs (cron or interval).

Integrations

Push enriched leads to outbound tools and CRMs with lm integrations. Alias: int.

ProviderCommon subcommands
instantly / emailbison / smartleadconnect, campaigns, create, push, stats, leads, history
hubspot / salesforceconnect, push, stats, history

Third-party API keys: lm config set instantlyApiKey (and EmailBison / Smartlead equivalents). CRM connections open a secure browser window.

Research & Signals

Detect job changes. Alias: jc.

Funding, tech-stack, and hiring signals. Alias: is.

Company research helpers.

Ideal Customer Profile definitions (stored in .leadmagic/icp.json / ~/.leadmagic/icp.json).

Scoring runs in the interactive workspace without using enrichment credits:

Database

Run a query against local data. Alias: sql.

Database management. Alias: database.

lm db reset drops all loaded data. Exports in .leadmagic/export/ are kept.

Account & Info

CommandAliasDescription
lm dashboarddashAccount, credits, and usage
lm creditsbalanceCredit balance
lm pricingpriceEnrichment pricing cheat sheet
lm statusAuth status, config path, system info
lm whoamiwhoIdentity, plan, and account status
lm planView and manage your plan: status, upgrade, compare
lm teamTeam and organization: members, credits, invite

keys

Scoped API keys for separate programmatic REST access (not required for LeadMagic CLI, which uses OAuth).

Setup

Initialize project dirs + database. Alias: setup.

Health check + auto-repair. Alias: checkup.

OptionDescription
--check-onlyDiagnostics only: skip repair
--fixApply repairs (default when fixable issues exist)
--verboseExtra diagnostics

Configuration. Alias: cfg.

SubcommandDescription
get / setRead or write a key
showFull config view
interactive (ui, tui)Interactive config UI
syncFetch team-wide config and show diff

AI model routing is managed by LeadMagic (aiModel is read-only). See Configuration.

Shell tab-completions (bash, zsh, fish).

Self-upgrade. Alias: upgrade.

CommandDescription
lm telemetryDiagnostic telemetry controls: status, on, off
lm welcomePost-install welcome screen. Flag: --fast