Clay logo

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

Recap
LeadMagicDocs

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.

NameMeaning
LeadMagic CLIThe terminal workspace and scriptable commands
lmThe installed command you run
CLIDirect, scriptable commands such as lm enrich, lm find, and lm recipe
Interactive workspaceThe 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.

CommandAliasesWhat it does
lm / lm chatInteractive workspace (default)
lm runpromptOne-shot AI prompt on a file
lm thinkreasonAI prompt with reasoning mode
CommandAliasesWhat it does
lm loginauth, signin, sign-inBrowser OAuth (PKCE)
lm logoutsignout, sign-outClear local session
CommandAliasesWhat it does
lm scanlsDiscover CSV / TSV / Excel
lm analyzehealthData quality report
lm querysqlQuery local data
lm dbdatabaseinit, stats, vacuum, analyze, repair, unlock, reset
CommandAliasesWhat it does
lm enrichboostBatch enrich a CSV/Excel file
lm validateverifyEmail deliverability
lm findlookupLookups (see subcommands below)

lm find subcommands: email · mobile · role · employees · profile · linkedin-to-email · personal-email · profile-search · people · companies · jobs

CommandWhat it does
lm recipeYAML pipelines: list, show, validate, estimate, run, delete
lm watchHot folder: setup, start, status, stop
lm scheduleCron/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/.

lm integrations (int):

ProviderCommon actions
instantly / smartlead / emailbisonconnect, campaigns, create, push, stats, leads, history
hubspot / salesforceconnect, push, stats, history (secure browser connection)

Third-party API keys: lm config set instantlyApiKey (and EmailBison / Smartlead equivalents).

CommandAliasesWhat it does
lm job-changejccheck, batch, history, runs
lm intent-signalsisfunding, tech, hiring, all, history
lm researchcompetitors, funding, tech
lm icpcreate, list, show, delete definitions; score in the workspace via /icp score
CommandAliasesWhat it does
lm creditsbalanceCredit balance
lm pricingpriceEnrichment pricing cheat sheet
lm dashboarddashAccount, credits, and usage
lm whoamiwhoIdentity, plan, status
lm statusAuth, config path, system info
lm planstatus, upgrade, compare
lm keysScoped API keys for programmatic use
lm teammembers, credits, invite
lm initsetupProject dirs + database
lm doctorcheckupHealth check + auto-repair
lm configcfgget, set, show, interactive, sync
lm completionsbash / zsh / fish tab-completions
lm updateupgradeSelf-upgrade
lm telemetrystatus, on, off
lm welcomePost-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:

  1. LeadMagic Data Enrichment Agent: load, clean, validate, enrich, export
  2. LeadMagic Prospecting Agent: find people, roles, companies, jobs
  3. LeadMagic Analysis Agent: SQL, profiling, ICP scoring, summaries

Slash commands (overview)

Type / then filter. /help = full reference · /commands = compact list.

CategoryCommands
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

  1. 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.
  2. Shared credits: LeadMagic CLI, MCP, the web app, and direct API requests spend the same account balance. Preview LeadMagic CLI work with --dry-run or lm recipe estimate.
  3. 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.
  4. AI-assisted work: interactive analysis and ICP scoring use your signed-in session; model selection is managed for you and /model is read-only.
  5. Scoped keys: lm keys manages keys for separate programmatic REST clients; those keys are not LeadMagic CLI's normal authentication method.

Details: Authentication · Configuration · Credits.

Get started