Skip to main content
The AI chat is the primary interface of the LeadMagic CLI. Describe what you need in plain English and the AI orchestrates the right tools automatically.
lm chat
Running lm with no arguments also starts chat — it’s the default command.

How It Works

When you type a message, the AI:
  1. Interprets your intent — understands what you’re trying to do
  2. Selects tools — picks the right LeadMagic tools (file loading, enrichment, validation, SQL queries)
  3. Executes the workflow — calls tools in sequence, handles errors, and presents results
  4. Streams responses — shows progress in real-time as operations run

Example Conversations

You: Load contacts.csv and show me a summary
AI:  Loaded 1,247 rows with columns: name, email, company, title...

You: Find work emails for contacts that are missing them
AI:  Found 342 contacts without emails. I'll use the email finder...
     [Processing: ████████░░ 85/342 — 1 credit each]
     Found 298 emails. 44 contacts had insufficient data.

You: Export the results
AI:  Saved to .leadmagic/export/20260306-email-finder/contacts_enriched.csv
You: Validate all emails in campaign-list.csv
AI:  Loaded 5,000 emails from column "email"...
     [Validating: ████████████ 5000/5000 — 0.05 credits each]
     Results: 4,102 valid, 612 invalid, 286 catch-all

You: Remove the invalid ones and export
AI:  Removed 612 invalid emails. Exported 4,388 contacts to
     .leadmagic/export/20260306-validation/campaign-list_validated.csv
You: What can you tell me about stripe.com?
AI:  Company: Stripe, Inc.
     Industry: Financial Technology
     Employees: 8,000+
     HQ: San Francisco, CA
     ...

You: What's their tech stack?
AI:  [Calling get_technographics...]
     React, Node.js, Ruby, Go, AWS, PostgreSQL...

You: Who are their main competitors?
AI:  [Calling find_competitors...]
     Adyen, Square, PayPal, Braintree, Checkout.com...

Slash Commands

Type / followed by a command name for quick actions. Type /help to see all available commands.
CommandDescription
/browseBrowse files in a directory
/findFind CSV or XLSX files
/filesShow files in current directory
/outputSet output directory for exports
/cleanOpen cleaning operation picker
/mergeMerge CSV or Excel files

Model Selection

Switch the AI model during a chat session:
/model
This opens an interactive model selector. You can also set a default model:
lm config model
lm config set aiModel claude-sonnet
List all available models from the command line:
lm config list-models

Session Management

Chat sessions are automatically saved and can be resumed later.
ActionHow
List sessions/sessions
Start fresh/clear
Export history/export
Sessions are stored in the local database and persist across CLI restarts.

Keyboard Shortcuts

ShortcutAction
EnterSend message / execute command
↑ / ↓Recall previous commands
TabAutocomplete commands
EscapeClear input
Ctrl+CExit application
Ctrl+LClear screen
Ctrl+KOpen command palette
/Start a slash command
@Reference a file

Next Steps