# Repository Briefing: bartolli/codanna
> Source: https://repoforai.com/repo/bartolli/codanna (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/bartolli/codanna
- **Official Docs / Website**: https://docs.codanna.sh/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Rust
- **License**: Apache-2.0
- **Engineering Health**: A+ (90/100 · Maintenance 35/35 · Adoption 15/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.18.0 (2026-11-22) — https://github.com/bartolli/codanna/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, CLI, Local AI, Self-Hosted
- **Momentum**: 765 ★ total (+0 24h / +3 7d) · 69 forks
- **Topics**: `ai-agents`, `call-graph-analysis`, `code-indexing`, `code-intelligence`, `code-search`, `coding-agents`, `developer-tools-ai-agent`, `local-first`, `mcp`, `mcp-server`, `mcp-tools`, `rag`
- **When to Use**: Best for: Teams using coding agents on private or multilingual repositories that need semantic discovery, cross-file call tracing, and a first pass at refactor impact. Skip if: You only need exact text search, require compiler-grade guarantees from the index, or must run a current release on Intel macOS or an incompatible Linux baseline.

## Overview
```text
### Architecture & Core Mechanics
Codanna is a Rust code-intelligence service and CLI built around a persistent on-disk project index under `.codanna/`. Tree-sitter provides source parsing, Tantivy backs the search index, and fastembed runs local embeddings through ONNX Runtime. Separating indexing from querying lets an agent retrieve symbols and their relationships without reparsing the repository for every question.

The same tool surface is exposed through persistent `codanna serve` sessions over stdio, HTTP, or HTTPS and through one-shot `codanna mcp` invocations. `serve --watch` tracks file changes during editing. The Claude Code plugin adds scoped symbol and impact views through `x-ray` and broader codebase visualizations through `graph`; neither skill is required for a standard MCP client.

### Key Capabilities & Differentiators
Codanna indexes symbols and relationships across 15 languages, including Rust, Python, JavaScript, TypeScript, Java, Kotlin, Go, C, and C++. Its most useful agent-facing operation, `semantic_search_with_context`, combines semantic matches with symbol identities, signatures, docstrings, callers, callees, and recursive change-impact results. File-and-line coordinates let the agent open the code directly, while symbol IDs help it distinguish same-named definitions. `--json` makes the result suitable for scripts or other tools.

It also indexes Markdown and plain text in named collections, so agents can retrieve design notes or project guides alongside implementation details. Local embeddings are the default. An OpenAI-compatible remote embedding endpoint can be configured explicitly through `remote_url` in `[semantic_search]` or `CODANNA_EMBED_*` environment variables; the API key is supplied only through the environment.

### Trade-offs & Limitations
Compared with grep, Codanna requires an initial indexing pass and ongoing freshness management. In return it can rank code by intent and provide relationships that text search alone cannot resolve. Treat its impact results as leads for review, not proof that every runtime dependency has been captured. Use an LSP, compiler, or tests where correctness depends on language-specific resolution or build behavior.

The local default avoids sending source, symbols, or queries to a remote embedding API, but shifts model storage and indexing work to the host. Remote embeddings change the data boundary, as can the agent client consuming MCP results. Apache-2.0 supports commercial self-hosting; redistribution still carries applicable license and notice obligations. For agents running on the same machine, stdio avoids opening a network listener. Review access controls before choosing a network transport for a private index.

### Hardware & Deployment Guide
Install via Homebrew, Nix, or the project installer on supported macOS, Linux, or WSL setups, then run `codanna init` and index the intended source paths. Source builds for v0.18.0 require Rust 1.95+ and `pkg-config`. The Linux `cargo install` path requires glibc 2.38+ and GCC 13+ libstdc++; published Linux binaries are built on Ubuntu 24.04 with glibc 2.39. Current macOS releases target Apple Silicon; v0.17.0 was the last Intel Mac release. Windows support is experimental.

First use downloads an approximately 150 MB embedding model, after which the default embedding path runs locally. Plan for separate disk space for the index and test memory and CPU usage under the intended indexing and query load. v0.17.0 triggered a one-time rebuild when it introduced emission semantics v4. v0.17.1 moved to ONNX Runtime 1.28 and removed OpenSSL from the dependency graph; v0.18.0 moved to ONNX Runtime 1.31 and updated Tree-sitter, Tantivy, and reqwest without requiring another index rebuild.
```

## Key Capabilities
```text
- Context query: `semantic_search_with_context` returns signatures, docstrings, callers, callees, and recursive impact in one result.
- Navigable results: File-and-line coordinates point to source, symbol IDs disambiguate names, and `--json` supports programmatic consumption.
- Index lifecycle: The project index lives under `.codanna/`; `serve --watch` updates it as files change.
- Transport choice: Persistent MCP over stdio, HTTP, or HTTPS, plus daemon-free access through `codanna mcp`.
- Embedding boundaries: fastembed and ONNX Runtime run locally by default; OpenAI-compatible remote embeddings are opt-in.
- Upgrade compatibility: v0.18.0 retains emission semantics v4 and the Tantivy index format, so v0.17.x indexes do not need rebuilding for this upgrade.
```

## Quick Start / Clone
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://install.codanna.sh | sh
```
