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

# Installation

> Install the LeadMagic CLI on macOS, Linux, or Windows

Install the LeadMagic CLI in one command. The installer downloads a self-contained binary with a bundled runtime — no additional dependencies required.

## Install

> [tab] macOS / Linux
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> curl -fsSL https://releases.leadmagic.io/install.sh | bash
> ```
>
> The installer:
>
> * Downloads the correct binary for your platform and architecture
>
> * Installs to `~/.leadmagic/bin/lm`
>
> * Adds `~/.leadmagic/bin` to your `PATH` (updates your shell profile)
>
> * Runs `lm welcome` to confirm the install
>
> > [!TIP]
> >
> > Open a new terminal or run `source ~/.zshrc` (or `~/.bashrc`) after install for the `PATH` update to take effect.

> [tab] Windows
>
> ```powershell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> irm https://releases.leadmagic.io/install.ps1 | iex
> ```
>
> The installer downloads the binary and adds it to your `PATH`.
>
> > [!WARNING]
> >
> > Windows support is experimental. The installer downloads the Linux binary and rebuilds native modules locally, which requires additional tooling.

> [tab] Direct Download
>
> Download a tarball directly from the releases server:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> # Latest version
> curl -O https://releases.leadmagic.io/latest/lm-darwin-arm64.tar.gz
>
> # Specific version
> curl -O https://releases.leadmagic.io/v2.1.16/lm-v2.1.16-darwin-arm64.tar.gz
> ```
>
> Extract and move to your `PATH`:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> tar -xzf lm-darwin-arm64.tar.gz
> mv lm ~/.leadmagic/bin/lm
> chmod +x ~/.leadmagic/bin/lm
> ```
>
> **Checksums** are available for verification:
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> curl -O https://releases.leadmagic.io/latest/checksums.txt
> sha256sum -c checksums.txt
> ```

## Platform Support

| Platform | Architecture | Status |
| - | - | - |
| macOS | Apple Silicon (arm64) | Supported |
| macOS | Intel (x64) | Supported |
| Linux | x64 | Supported |
| Linux | arm64 | Supported |
| Windows | x64 | Experimental |

## Version Pinning

Install a specific version by setting the `VERSION` environment variable:

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

Change the install directory with `LEADMAGIC_INSTALL_DIR`:

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

## Verify Installation

Run the health check to confirm everything is working:

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

If issues are found, auto-repair with:

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

Use `--verbose` for detailed diagnostic output:

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

## Shell Completions

Enable tab completions for your shell:

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

Supports bash, zsh, and fish. The shell is auto-detected, or specify it explicitly:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
lm completions install --shell zsh
```

Remove completions with:

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

## Update

The CLI checks for updates automatically and shows a one-line notice when a newer version is available.

To update manually:

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

To check for updates without installing:

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

## Uninstall

Remove the CLI and all associated files:

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

This removes the binary and the `~/.leadmagic/bin` directory. Your data (config, database, exports) in `~/.leadmagic/` is preserved. Delete that directory manually if you want a complete removal.

## Next Steps

> [card] [Authentication](https://leadmagic.io/docs/cli/authentication.md)
>
> Sign in with browser OAuth.

> [card] [Quickstart](https://leadmagic.io/docs/cli/quickstart.md)
>
> Your first enrichment workflow in 5 minutes.


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