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

# Installation

> Install Codanna and index your first project

Codanna is a local code intelligence MCP server and CLI for AI coding agents. Install on macOS, Linux, Windows (WSL), or Nix; initialize and index your first project below.

## Install

<Tabs>
  <Tab title="Native">
    ```bash theme={null}
    curl -fsSL --proto '=https' --tlsv1.2 https://install.codanna.sh | sh
    ```

    Works on macOS, Linux, and WSL. Downloads pre-built binary.
  </Tab>

  <Tab title="Homebrew">
    ```bash theme={null}
    brew install codanna
    ```

    Works on macOS and Linux.
  </Tab>

  <Tab title="Cargo">
    ```bash theme={null}
    # From crates.io
    cargo install codanna --locked

    # Prebuilt binaries (faster)
    cargo binstall codanna
    ```

    Requires [cargo-binstall](https://github.com/cargo-bins/cargo-binstall) for prebuilt binaries.
  </Tab>

  <Tab title="Nix">
    ```bash theme={null}
    # Run directly
    nix run github:bartolli/codanna

    # Development shell
    nix develop github:bartolli/codanna
    ```

    Requires [Nix with flakes enabled](https://nixos.wiki/wiki/Flakes).
  </Tab>
</Tabs>

## Quick Start

<Steps>
  <Step title="Initialize">
    Navigate to your project and run:

    ```bash theme={null}
    codanna init
    ```
  </Step>

  <Step title="Index your code">
    ```bash theme={null}
    codanna index .
    ```
  </Step>

  <Step title="Search">
    ```bash theme={null}
    codanna mcp semantic_search_with_context query:"where do we handle errors" limit:3
    ```
  </Step>
</Steps>

<Tip>
  **Connecting AI assistants:** Configure your MCP client to spawn the server automatically.

  See [MCP Persistent](/reference/mcp-persistent) for stdio setup (Claude Code, Cursor, etc.) or [MCP Network](/reference/mcp-network) for HTTP/HTTPS.
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Semantic Search" icon="magnifying-glass" href="/features/semantic-search">
    Search code by concept.
  </Card>

  <Card title="Tool Tiers" icon="layer-group" href="/workflows/tool-tiers">
    Which tool to use when.
  </Card>
</CardGroup>


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