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

# Installation

> Install Complior CLI — npx, npm, curl, or cargo.

## Install

<Tabs>
  <Tab title="npx (recommended)">
    No install needed — runs directly:

    ```bash theme={null}
    npx complior scan
    npx complior init
    npx complior eval --target http://localhost:3000/api/chat
    ```

    For persistent use, install globally:

    ```bash theme={null}
    npm install -g complior
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -fsSL https://get.complior.dev | sh
    ```

    Detects your OS and architecture, downloads the latest release, and adds `complior` to your PATH.
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    npm install -g complior
    ```
  </Tab>

  <Tab title="cargo (Rust binary)">
    ```bash theme={null}
    cargo install complior-cli
    ```

    Builds from source. Requires Rust toolchain.
  </Tab>

  <Tab title="GitHub Release (binary)">
    Download the prebuilt binary for your platform from [GitHub Releases](https://github.com/complior/complior/releases/latest):

    | Platform            | Asset                         |
    | ------------------- | ----------------------------- |
    | Linux x86\_64       | `complior-linux-x86_64`       |
    | Linux ARM64         | `complior-linux-aarch64`      |
    | macOS Intel         | `complior-macos-x86_64`       |
    | macOS Apple Silicon | `complior-macos-arm64`        |
    | Windows             | `complior-windows-x86_64.exe` |

    ```bash theme={null}
    # Example: Linux x86_64
    curl -fsSL -o complior https://github.com/complior/complior/releases/latest/download/complior-linux-x86_64
    chmod +x complior
    sudo mv complior /usr/local/bin/

    # Verify checksum (optional but recommended)
    curl -fsSL -o checksums.txt https://github.com/complior/complior/releases/latest/download/checksums.txt
    sha256sum -c checksums.txt --ignore-missing
    ```
  </Tab>
</Tabs>

<Info>
  **Requirements:** Node.js 18+ for the Engine. Rust toolchain is only needed for `cargo install` or building TUI from source. The GitHub Release binary embeds the Rust CLI; the Engine still requires Node.js when invoked.
</Info>

## Verify installation

```bash theme={null}
complior --version
# complior 1.0.1

complior doctor
# ✓ Engine: OK
# ✓ Node.js: v22.1.0
# ✓ TUI: OK
# ✓ MCP: OK
```

<Check>
  All green checks mean Complior is ready. If any component shows an issue, `complior doctor` will suggest how to fix it.
</Check>

## LLM configuration

Some features require an LLM API key: `complior scan --llm`, `complior eval --llm`, `complior fix --ai`.

After `complior init`, add your LLM settings to `.complior/.env`:

```bash theme={null}
# .complior/.env
LLM_PROVIDER=openai              # openai | anthropic | openrouter | ollama
LLM_MODEL=gpt-4o                 # model name
LLM_API_KEY=sk-...               # your API key
```

<Tabs>
  <Tab title="OpenAI">
    ```bash theme={null}
    LLM_PROVIDER=openai
    LLM_MODEL=gpt-4o
    LLM_API_KEY=sk-...
    ```
  </Tab>

  <Tab title="Anthropic">
    ```bash theme={null}
    LLM_PROVIDER=anthropic
    LLM_MODEL=claude-sonnet-4-20250514
    LLM_API_KEY=sk-ant-...
    ```
  </Tab>

  <Tab title="OpenRouter">
    ```bash theme={null}
    LLM_PROVIDER=openrouter
    LLM_MODEL=anthropic/claude-sonnet-4-20250514
    LLM_API_KEY=sk-or-...
    ```
  </Tab>

  <Tab title="Ollama (local)">
    ```bash theme={null}
    LLM_PROVIDER=ollama
    LLM_MODEL=llama3
    # No API key needed — runs locally
    ```
  </Tab>
</Tabs>

<Warning>
  `.complior/.env` is gitignored by default. Never commit API keys to version control.
</Warning>

## What gets installed

| Component      | Description                                                    | Size               |
| -------------- | -------------------------------------------------------------- | ------------------ |
| **Engine**     | TypeScript daemon — scanner, fixer, passport service, HTTP API | \~15 MB            |
| **CLI**        | Rust binary — 30+ commands, headless mode for CI/CD            | \~10 MB            |
| **TUI**        | Terminal dashboard — 9 interactive pages (ratatui)             | Included in CLI    |
| **MCP Server** | Protocol server for AI agents (stdio)                          | Included in Engine |

## Configure for AI agents

To use Complior with Claude Code, Cursor, or other MCP-compatible agents:

<Tabs>
  <Tab title="Claude Code">
    Add to `~/.claude/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "complior": {
          "command": "complior",
          "args": ["mcp"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Add to Cursor MCP settings:

    ```json theme={null}
    {
      "complior": {
        "command": "complior",
        "args": ["mcp"]
      }
    }
    ```
  </Tab>

  <Tab title="Windsurf">
    Add to Windsurf MCP config:

    ```json theme={null}
    {
      "complior": {
        "command": "complior",
        "args": ["mcp"]
      }
    }
    ```
  </Tab>
</Tabs>

## Next steps

<Card title="Quick Start" icon="rocket" href="/getting-started/quickstart">
  Run your first scan in under 3 minutes.
</Card>
