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

# Document Search

> Index markdown files for RAG

Codanna is a local code intelligence MCP server and CLI for AI coding agents. Document search indexes markdown and text files for semantic retrieval alongside code — project documentation, RAG pipelines.

## Collections

Organize documents into searchable groups:

```bash theme={null}
# Add a collection
codanna documents add-collection docs docs/

# List collections
codanna documents list

# Remove a collection
codanna documents remove-collection docs
```

## Indexing

Index all configured collections:

```bash theme={null}
codanna documents index
```

Disable progress bars:

```bash theme={null}
codanna documents index --no-progress
```

Index a specific collection:

```bash theme={null}
codanna documents index --collection docs
```

## Searching

### CLI

```bash theme={null}
codanna documents search "authentication flow"
codanna documents search "error handling" --collection docs --limit 5
```

### MCP

```bash theme={null}
codanna mcp search_documents query:"setup guide" limit:5
codanna mcp search_documents query:"configuration" collection:docs
```

## Configuration

Document settings in `.codanna/settings.toml`:

```toml theme={null}
[documents]
enabled = true

[documents.collections.docs]
paths = ["docs/"]
patterns = ["**/*.md"]
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Languages" icon="code" href="/features/languages">
    Supported programming languages.
  </Card>

  <Card title="Customization" icon="sliders" href="/reference/customization">
    Configure document collections.
  </Card>
</CardGroup>


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