LeadMagic CLI: Work in Your Terminal
Install the LeadMagic CLI to work with local lists, verified enrichment, and repeatable automation from your terminal.
LeadMagic CLI is LeadMagic's terminal product. Install it once to get the lm command, then choose between scriptable CLI commands and an interactive keyboard-first workspace.
It is for developers, agencies, operators, and GTM engineers who want to inspect files locally, enrich records, automate repeat workflows, or work with data through an AI agent without leaving the terminal.
| Name | Meaning |
|---|---|
| LeadMagic CLI | The terminal workspace and scriptable commands |
lm | The installed command you run |
| CLI | Direct, scriptable commands such as lm enrich, lm find, and lm recipe |
| Interactive workspace | The guided workspace launched by lm or lm chat |
Hosted MCP is a separate remote interface for Cursor, Claude, ChatGPT, VS Code, and other AI clients. It shares your LeadMagic account and credits, but you do not install LeadMagic CLI to use MCP. See the MCP docs.
That opens the interactive workspace. For a direct command instead, run something like lm find email, lm validate, or lm enrich.
Feedback: support@leadmagic.io or the Help Center.
What LeadMagic CLI ships
Run lm help or lm help <command> locally. lm --version shows the installed version.
AI
AI
| Command | Aliases | What it does |
|---|---|---|
lm / lm chat | Interactive workspace (default) | |
lm run | prompt | One-shot AI prompt on a file |
lm think | reason | AI prompt with reasoning mode |
Auth
Auth
| Command | Aliases | What it does |
|---|---|---|
lm login | auth, signin, sign-in | Browser OAuth (PKCE) |
lm logout | signout, sign-out | Clear local session |
Data
Data
| Command | Aliases | What it does |
|---|---|---|
lm scan | ls | Discover CSV / TSV / Excel |
lm analyze | health | Data quality report |
lm query | sql | Query local data |
lm db | database | init, stats, vacuum, analyze, repair, unlock, reset |
Enrich
Enrich
| Command | Aliases | What it does |
|---|---|---|
lm enrich | boost | Batch enrich a CSV/Excel file |
lm validate | verify | Email deliverability |
lm find | lookup | Lookups (see subcommands below) |
lm find subcommands: email · mobile · role · employees · profile · linkedin-to-email · personal-email · profile-search · people · companies · jobs
Automation
Automation
| Command | What it does |
|---|---|
lm recipe | YAML pipelines: list, show, validate, estimate, run, delete |
lm watch | Hot folder: setup, start, status, stop |
lm schedule | Cron/interval jobs: create, list, pause, resume, delete, run-now, history, daemon |
Built-in recipes: default-enrich, validate-and-export, full-pipeline. Custom YAML: ~/.leadmagic/recipes/.
Outbound and CRM
Outbound and CRM
lm integrations (int):
| Provider | Common actions |
|---|---|
instantly / smartlead / emailbison | connect, campaigns, create, push, stats, leads, history |
hubspot / salesforce | connect, push, stats, history (secure browser connection) |
Third-party API keys: lm config set instantlyApiKey (and EmailBison / Smartlead equivalents).
Research and signals
Research and signals
| Command | Aliases | What it does |
|---|---|---|
lm job-change | jc | check, batch, history, runs |
lm intent-signals | is | funding, tech, hiring, all, history |
lm research | competitors, funding, tech | |
lm icp | create, list, show, delete definitions; score in the workspace via /icp score |
Account and setup
Account and setup
| Command | Aliases | What it does |
|---|---|---|
lm credits | balance | Credit balance |
lm pricing | price | Enrichment pricing cheat sheet |
lm dashboard | dash | Account, credits, and usage |
lm whoami | who | Identity, plan, status |
lm status | Auth, config path, system info | |
lm plan | status, upgrade, compare | |
lm keys | Scoped API keys for programmatic use | |
lm team | members, credits, invite | |
lm init | setup | Project dirs + database |
lm doctor | checkup | Health check + auto-repair |
lm config | cfg | get, set, show, interactive, sync |
lm completions | bash / zsh / fish tab-completions | |
lm update | upgrade | Self-upgrade |
lm telemetry | status, on, off | |
lm welcome | Post-install welcome |
Full flags and examples: Command reference.
Interactive workspace
Ask for a workflow, or drive the workspace with slash commands and shortcuts. AI-assisted actions use your signed-in LeadMagic session.
Agent modes
Shift+Tab cycles:
- LeadMagic Data Enrichment Agent: load, clean, validate, enrich, export
- LeadMagic Prospecting Agent: find people, roles, companies, jobs
- LeadMagic Analysis Agent: SQL, profiling, ICP scoring, summaries
Slash commands (overview)
Type / then filter. /help = full reference · /commands = compact list.
| Category | Commands |
|---|---|
| Files | /browse · /find · /files · /output · /clean · /merge |
| Info | /commands · /help · /status · /whoami · /credits · /pricing · /shortcuts |
| Config | /config · /theme · /scroll · /auth · /model |
| Chat | /sessions · /editor · /export · /search · /thinking · /expand · /clear · /clear-context |
| Data | /table · /columns · /compact · /analyze · /optimize · /profile · /query · /exit |
| Enrichment | /validate · /find-email · /find-mobile · /enrich-company · /icp · /role-finder · /employees · /email-to-profile · /personal-email |
| Automation | /recipe · /watch · /schedule · /job-change · /intent-signals |
| Outbound / CRM | /instantly · /smartlead · /emailbison · /hubspot · /salesforce |
Complete slash tables, aliases, and shortcuts: AI Chat guide.
How LeadMagic CLI differs from hosted MCP
LeadMagic CLI is software you install and run locally. Hosted MCP is a remote tool server you connect to from an AI client. They share the same LeadMagic account and credit balance, but they are different ways to work.
| You ask… | Typical tool |
|---|---|
| "Tell me about Stripe" | account_intel |
| "Everything about jane@acme.com" | enrich_contact |
| "Find people at stripe.com" | search_people |
| "Is this email valid?" | validate_work_email |
| "Enrich this CSV" | process_attached_csv / submit_detected_bulk_job |
| "How many credits?" | check_credit_balance (free) |
You do not need LeadMagic CLI for MCP. Conversely, normal LeadMagic CLI workflows do not require an MCP client. Both use OAuth; direct REST requests use API keys.
Hosted MCP endpoint: https://mcp.leadmagic.io/mcp for every client. OAuth only: no static API keys in client config.
MCP introduction · Setup · Tools
How auth & data work
lm login: browser OAuth; LeadMagic CLI stores the session in~/.leadmagic/config.json(or project.leadmagic/). You do not paste a LeadMagic API key into LeadMagic CLI.- Shared credits: LeadMagic CLI, MCP, the web app, and direct API requests spend the same account balance. Preview LeadMagic CLI work with
--dry-runorlm recipe estimate. - Local-first data: LeadMagic CLI works with files under
~/.leadmagic/or.leadmagic/and writes exports there. Only fields needed for each enrichment call leave the machine. - AI-assisted work: interactive analysis and ICP scoring use your signed-in session; model selection is managed for you and
/modelis read-only. - Scoped keys:
lm keysmanages keys for separate programmatic REST clients; those keys are not LeadMagic CLI's normal authentication method.
Details: Authentication · Configuration · Credits.
Get started
Was this page helpful?
We value your feedback.