Clay logo

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

Recap
LeadMagicDocs

LeadMagic CLI Workspace

Use the interactive LeadMagic CLI workspace for AI-assisted local data work, enrichment, slash commands, file references, sessions, and keyboard shortcuts.

The LeadMagic CLI workspace is the interactive surface installed with the lm command. Ask for what you need, or use / slash commands and keyboard shortcuts. It works with local files, LeadMagic enrichment and configured integrations, with live progress in your terminal.

Requires a real TTY. If lm doctor warns about a non-interactive terminal, run from a normal terminal app (not a piped CI shell).

AI replies are billed in credits from your organization's balance, by model usage. A short reply on the default model is about 0.2 credits; long sessions with large files cost more. Enrichment tools the AI runs are billed at their normal prices, and a daily AI spend limit applies per user and per organization. If your balance is too low for a reply, the workspace shows how many credits it needs and links to billing.

Agent modes

Press Shift+Tab to cycle between modes (shown in the workspace header):

ModeBest for
LeadMagic Data Enrichment AgentLoad, clean, validate, enrich, export
LeadMagic Prospecting AgentFind people, roles, companies, jobs
LeadMagic Analysis AgentSQL, column profiling, ICP scoring, summaries

Example conversations

Or slash: /instantly, /smartlead, /emailbison.

CLI equivalents: lm research tech|funding|competitors -d stripe.com.

Or: /icp score "SaaS Series A": scoring uses AI usage credits, not enrichment credits. Manage definitions with lm icp create|list|show|delete.

Slash commands

Type / then a command (filter as you type). /help: full reference with examples. /commands: compact list.

CommandAliasesDescription
/browsels, dirBrowse files in a directory
/findsearch, locateFind CSV or XLSX files
/filescwd, pwdShow files in the current directory
/outputexport-dir, outdirSet export directory
/cleandedupe, normalizeCleaning operation picker
/mergecombine, append, joinMerge CSV/Excel files

Also: @ in the input bar to reference a file or directory.

CommandAliasesDescription
/commandscmd, list, allCompact slash-command list
/helph, ?, docsFull reference with examples
/statuss, statSystem status
/whoamime, user, identityLogged-in user
/creditsc, balance, balCredit balance / session usage
/pricingprice, costsAPI pricing cheat sheet
/shortcutskeys, hotkeysKeyboard shortcuts dialog
CommandAliasesDescription
/configcfg, settingsCurrent configuration
/themethemes, color, colorsTheme picker or /theme <name>
/scrollscrollspeed, speedScroll speed (1–10)
/authlogin, accountAuth / session status for enrichment
/modelmAI routing status (read-only)

Themes: leadmagic · catppuccin · dracula · tokyo-night · nord · gruvbox · rosepine · monokai · solarized · github · one-dark

CommandAliasesDescription
/sessionssess, sessionList and switch sessions
/editore, edit, composeCompose in $EDITOR
/exportexp, saveExport session as Markdown to .leadmagic/export/
/searchfind-messageSearch messages in the current session
/thinkingthink, reasoningToggle visibility of model reasoning blocks
/expandreasoning-expand, expand-reasoningExpand/collapse reasoning blocks
/clear-contextclearctx, forgetClear enrichment follow-up context (collapse result tables)
/clearcls, resetClear all chat history

Sessions persist in the local database across restarts.

CommandAliasesDescription
/tableshow, dataShow current data as a table
/columnscolsToggle visible columns on the last table
/compactminiToggle compact mode
/analyzehealthData health of the loaded file
/optimizevacuumOptimize the local workspace
/profilestats, col-statsColumn statistics and data quality
/querysqlRun SQL against the local database
/exitquit, q, byeExit the workspace

Available after the chat session initializes the shared database.

CommandAliasesDescription
/validateval, check-emailValidate a single email: /validate john@acme.com
/find-emailfindemail, get-email, emailFind a work email for a contact
/find-mobilefindmobile, get-mobile, phone, mobileFind a mobile number
/enrich-companycompany, enrichcompanyCompany enrichment by domain or name
/icpicp-scoreScore local contacts: /icp score [name]
/role-finderrf, find-role, findrolePeople by role at a company
/employeesemp, find-employeesEmployees at a company
/email-to-profilee2p, profile-lookupEmail → B2B profile
/personal-emailpe, find-personal-emailPersonal emails from a B2B profile URL

For batch file workflows, prefer natural language ("validate the email column") or CLI: lm enrich, lm validate -f …, lm find ….

CommandAliasesDescription
/reciperecipesList / work with recipes
/watchHot-folder status / start / stop
/scheduleschedules, schedList schedules or scheduling help
/job-changejc, jobchangeJob-change detection helpers
/intent-signalsis, intentsignals, signalsFunding / tech / hiring signals
CommandAliasesDescription
/instantlyintInstantly campaigns and push
/smartleadslSmartlead campaigns and push
/emailbisonbisonEmailBison campaigns and push
/hubspotconnect · push · stats (secure browser connection)
/salesforceconnect · push · stats (secure browser connection)

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

Keyboard shortcuts

Open in-app with /shortcuts.

KeysAction
/Slash commands: type to filter
@Reference a file or directory
TabAutocomplete
Shift+TabCycle agent mode
↑ / ↓Recall previous messages
Shift+EnterNewline in input
Ctrl+JAlternative newline
EnterSend message

Tips

  • Natural language first for multi-step CSV workflows; use slash commands for precise one-offs.
  • /clear-context when result tables are crowding follow-up questions; /clear for a full reset.
  • Credits: ask "How many credits?" or /credits. Pricing: /pricing or lm pricing.
  • Non-interactive / CI: use lm enrich, lm recipe, lm validate instead of chat.

Next steps