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
| Option | Description |
|---|---|
-v, --version | Print the CLI version |
--debug | Enable debug logging (also LM_DEBUG=1) |
-h, --help | Show help |
AI
chat
chat
Interactive workspace for data wrangling and enrichment. Default command: lm with no args starts it.
See the AI Chat guide.
run
run
Run an AI prompt on a file. Alias: prompt.
| Option | Description |
|---|---|
-f, --file <path> | Input CSV or Excel file |
-p, --prompt <text> | Prompt to execute |
-o, --output <path> | Save result to file |
think
think
AI prompt with reasoning mode. Alias: reason.
| Option | Description |
|---|---|
-f, --file <path> | Input file |
-p, --prompt <text> | Prompt |
-o, --output <path> | Save result |
-y, --yes | Skip permission prompt |
Auth
| Command | Aliases | Description |
|---|---|---|
lm login | auth, signin, sign-in | Sign in via browser OAuth. -y skips the confirmation prompt |
lm logout | signout, sign-out | Sign out |
Data
scan
scan
Discover CSV, TSV, and Excel files. Alias: ls.
| Option | Default |
|---|---|
[path] | . |
-d, --depth <n> | 2 |
analyze
analyze
Data health report. Alias: health.
Enrich
enrich
enrich
Batch enrich a CSV/Excel file. Alias: boost.
| Option | Description | Default |
|---|---|---|
-i, --input <file> | Input file (required) | |
-o, --output <file> | Output path | {input}_enriched |
--email-column / --first-name-column / --last-name-column / --company-column / --domain-column | Column overrides | Auto-detect |
--skip-validation | Skip email validation | false |
--batch-size <n> | Records per batch (1–100) | 10 |
--dry-run | Estimate credits without API calls | |
--json | JSON output |
validate
validate
Validate email deliverability. Alias: verify.
find
find
Look up emails, mobiles, people, companies, and jobs. Alias: lookup.
| Subcommand | Purpose |
|---|---|
email | Work email from name + domain/company |
mobile | Mobile number |
role | People by role at a company |
employees | Employees at a company |
profile | B2B profile URL from email |
linkedin-to-email | Work email from B2B profile URL (CLI name kept for compatibility) |
personal-email | Personal emails from a B2B profile URL |
profile-search | Full professional profile |
people | People search by company, title, and role |
companies | Company search by identifiers or audience filters |
jobs | Job postings search by company, title, and hiring signals |
Automation
recipe
recipe
YAML enrichment pipelines.
Built-ins: default-enrich, validate-and-export, full-pipeline. Custom YAML lives in ~/.leadmagic/recipes/.
watch
watch
Hot folder: auto-run a recipe when CSVs arrive.
schedule
schedule
Recurring enrichment jobs (cron or interval).
Integrations
Push enriched leads to outbound tools and CRMs with lm integrations. Alias: int.
| Provider | Common subcommands |
|---|---|
instantly / emailbison / smartlead | connect, campaigns, create, push, stats, leads, history |
hubspot / salesforce | connect, push, stats, history |
Third-party API keys: lm config set instantlyApiKey (and EmailBison / Smartlead equivalents). CRM connections open a secure browser window.
Research & Signals
job-change
job-change
Detect job changes. Alias: jc.
intent-signals
intent-signals
Funding, tech-stack, and hiring signals. Alias: is.
research
research
Company research helpers.
icp
icp
Ideal Customer Profile definitions (stored in .leadmagic/icp.json / ~/.leadmagic/icp.json).
Scoring runs in the interactive workspace without using enrichment credits:
Database
query
query
Run a query against local data. Alias: sql.
db
db
Database management. Alias: database.
Account & Info
| Command | Alias | Description |
|---|---|---|
lm dashboard | dash | Account, credits, and usage |
lm credits | balance | Credit balance |
lm pricing | price | Enrichment pricing cheat sheet |
lm status | Auth status, config path, system info | |
lm whoami | who | Identity, plan, and account status |
lm plan | View and manage your plan: status, upgrade, compare | |
lm team | Team and organization: members, credits, invite |
keys
Scoped API keys for separate programmatic REST access (not required for LeadMagic CLI, which uses OAuth).
Setup
init
init
Initialize project dirs + database. Alias: setup.
doctor
doctor
Health check + auto-repair. Alias: checkup.
| Option | Description |
|---|---|
--check-only | Diagnostics only: skip repair |
--fix | Apply repairs (default when fixable issues exist) |
--verbose | Extra diagnostics |
config
config
Configuration. Alias: cfg.
| Subcommand | Description |
|---|---|
get / set | Read or write a key |
show | Full config view |
interactive (ui, tui) | Interactive config UI |
sync | Fetch team-wide config and show diff |
AI model routing is managed by LeadMagic (aiModel is read-only). See Configuration.
completions
completions
Shell tab-completions (bash, zsh, fish).
update
update
Self-upgrade. Alias: upgrade.
| Command | Description |
|---|---|
lm telemetry | Diagnostic telemetry controls: status, on, off |
lm welcome | Post-install welcome screen. Flag: --fast |
Related
LeadMagic CLI Workflows
Practical LeadMagic CLI workflows for local list cleanup, enrichment, hot folders, schedules, job changes, ICP scoring, outbound tools, and CRM sync.
LeadMagic CLI Workspace
Use the interactive LeadMagic CLI workspace for AI-assisted local data work, enrichment, slash commands, file references, sessions, and keyboard shortcuts.
Was this page helpful?
We value your feedback.