> ## Documentation Index
> Fetch the complete documentation index at: https://leadmagic.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Your first enrichment workflow with the LeadMagic CLI in 5 minutes

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**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -fsSL https://releases.leadmagic.io/install.sh | bash
```

Open a new terminal after install, then verify:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lm --version
```

**2. Sign in**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lm login
```

`lm login` opens your browser and saves a local OAuth session for chat, enrichment, dashboard, and account-backed commands.

**3. Verify your setup**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lm doctor
```

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

**4. Scan for data files**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
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:

> [tab] Validate Emails
>
> Validate specific emails:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm validate alex.rivera@example.com alex.rivera@example.com sam.taylor@example.com
> ```
>
> Validate from a CSV file:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm validate -f contacts.csv -c email
> ```

> [tab] Find Contacts
>
> Find a work email:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm find email -f "Alex" -l "Rivera" -d example.com
> ```
>
> Find a mobile number:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm find mobile -f "Alex" -l "Rivera" -c "Example Robotics"
> ```

> [tab] Batch Enrich
>
> Enrich an entire CSV file:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm enrich -i contacts.csv
> ```
>
> Specify columns explicitly:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> lm enrich -i contacts.csv \
>   --email-column email \
>   --first-name-column first_name \
>   --last-name-column last_name \
>   --domain-column company_domain
> ```

## 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:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lm dashboard
```

Or ask in chat: *"How many credits do I have?"*

## Next Steps

> [card] [Command Reference](https://leadmagic.io/docs/cli/commands.md)
>
> Commands for enrichment, local SQL, recipes, schedules, watch mode, and outbound integrations.

> [card] [AI Chat Guide](https://leadmagic.io/docs/cli/chat.md)
>
> Slash commands, sessions, and natural language workflows.

> [card] [Configuration](https://leadmagic.io/docs/cli/configuration.md)
>
> Database, model, and theme settings.

> [card] [Credits & Pricing](https://leadmagic.io/docs/v1/credits.md)
>
> Credit costs per service and plan options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.