Skip to main content
Go from zero to enriched data in 5 minutes. This guide walks you through installing the CLI, authenticating, and running your first enrichment.

Step-by-Step

1

Install the CLI

curl -fsSL https://releases.leadmagic.io/install.sh | bash
Open a new terminal after install, then verify:
lm --version
2

Sign in and set your API key

lm login
lm config set apiKey
lm login opens your browser. lm config set apiKey prompts securely for your key from Settings > API.
3

Verify your setup

lm doctor
You should see all checks passing. If not, run lm doctor --fix to auto-repair.
4

Scan for data files

lm scan
This scans the current directory for CSV, TSV, and Excel files. You’ll see a list of files with row counts and detected columns.
5

Analyze a file

lm analyze contacts.csv
Get a data health report: quality score, column coverage, and enrichment recommendations. Save the report with -o report.md.
6

Start an AI chat

lm chat
This opens the interactive AI chat. Try these prompts:
> Load contacts.csv
> How many rows have valid emails?
> Validate all emails in the email column
> Find work emails for contacts missing them
> Export the enriched data
The AI loads your file, calls the right LeadMagic tools, and saves results to .leadmagic/export/.

Alternative: Direct Commands

If you prefer commands over chat, you can enrich and validate directly:
Validate specific emails:
lm validate john@acme.com jane@stripe.com bob@notion.so
Validate from a CSV file:
lm validate -f contacts.csv -c email

What Happens to Your Data

  • Local storage: CSV/Excel files are loaded into a local database in ~/.leadmagic/ (or project-local .leadmagic/).
  • Exports: Enriched results are saved to .leadmagic/export/{timestamp}-{operation}/ with timestamped directories.
  • Privacy: Only the specific fields needed for enrichment (emails, names, domains) are sent to the LeadMagic API. Your full dataset stays local.

Check Your Credits

See your account balance and usage:
lm dashboard
Or ask in chat: “How many credits do I have?”

Next Steps