---
title: Installation and Setup | CodeWeaver Docs
description: CodeWeaver is a code search engine for AI agents, designed to provide precise results that give agents exactly what they need for their tasks -- no more, no less.
url: "https://docs.knitli.com/guides/installation"
type: static
generatedAt: "2026-04-17T17:21:09.966Z"
---

# Installation and Setup
       [Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F.%20I%20want%20to%20ask%20questions%20about%20it.)[View in Markdown](/codeweaver/guides/installation.md)       [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F)[Share on X](https://x.com/intent/tweet?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F&text=Installation%20and%20Setup)[Share on Threads](https://threads.net/intent/post?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F&text=Installation%20and%20Setup)[Share on Bluesky](https://bsky.app/intent/compose?text=Installation%20and%20Setup%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F)[Share on Reddit](https://reddit.com/submit?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F&title=Installation%20and%20Setup)[Share on Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F&t=Installation%20and%20Setup)[Share on Email](mailto:?subject=Installation%20and%20Setup&body=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F)[Share on WhatsApp](https://wa.me/?text=Installation%20and%20Setup%20https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F)[Share on Telegram](https://t.me/share/url?url=https%3A%2F%2Fdocs.knitli.com%2Fcodeweaver%2Fguides%2Finstallation%2F&text=Installation%20and%20Setup)
# Installation & Setup
[Section titled “Installation & Setup”](#installation--setup)
> **TL;DR:** This guide handles the initial installation and configuration of CodeWeaver. Use it to set up your environment and prepare your codebase for AI agent interaction. It saves time by providing a streamlined path from empty directory to “Exquisite Context.”

CodeWeaver transforms your codebase into a structured, semantic search engine for AI agents. This guide walks you through the 5-minute setup process to get CodeWeaver running on your machine.

---

## 1. Prerequisites
[Section titled “1. Prerequisites”](#1-prerequisites)
Before installing CodeWeaver, ensure you have the following:

 - **Python 3.12 or 3.13:** CodeWeaver leverages modern Python features.
 - **`uv` Package Manager:** We recommend [uv ↗](https://astral.sh/uv) for fast, reliable dependency management.
 - **A Codebase:** Any local directory containing source code or documentation.

---

## 2. Install CodeWeaver
[Section titled “2. Install CodeWeaver”](#2-install-codeweaver)
Add CodeWeaver to your project using `uv`. This ensures that CodeWeaver and its dependencies are isolated and manageable.


*Terminal window*

```
# Add CodeWeaver as a development dependencyuv add --dev code-weaver
```

---

## 3. Initialize Your Project
[Section titled “3. Initialize Your Project”](#3-initialize-your-project)
The `cw init` command sets up your configuration and prepares your repository for indexing. You must choose a **Profile** during initialization.

### Option A: The Recommended Setup (Cloud + Local)
[Section titled “Option A: The Recommended Setup (Cloud + Local)”](#option-a-the-recommended-setup-cloud--local)
Best for production use and high-precision search. It requires a [Voyage AI API Key ↗](https://voyage.ai).


*Terminal window*

```
cw init --profile recommended
```

### Option B: The Quickstart Setup (100% Local)
[Section titled “Option B: The Quickstart Setup (100% Local)”](#option-b-the-quickstart-setup-100-local)
Best for privacy and offline development. It requires no API keys and runs entirely on your machine.


*Terminal window*

```
cw init --profile quickstart
```

---

## 4. Configure Your Environment
[Section titled “4. Configure Your Environment”](#4-configure-your-environment)
If you chose the `recommended` profile, you must provide your API keys. CodeWeaver reads these from your environment or a `.env` file in your project root.


*Terminal window*

```
# Example .env fileVOYAGE_API_KEY="your-voyage-key-here"ANTHROPIC_API_KEY="your-anthropic-key-here"  # Required for the Context Agent
```

---

## 5. Start the Services
[Section titled “5. Start the Services”](#5-start-the-services)
CodeWeaver runs as a background daemon that manages indexing and serves the MCP (Model Context Protocol) interface.

### Start the Daemon
[Section titled “Start the Daemon”](#start-the-daemon)
This command starts the background indexer and the management server.


*Terminal window*

```
cw start
```

### Verify the Installation
[Section titled “Verify the Installation”](#verify-the-installation)
Run the diagnostic tool to ensure everything is configured correctly.


*Terminal window*

```
cw doctor
```

---

## 6. Next Steps
[Section titled “6. Next Steps”](#6-next-steps)
Now that CodeWeaver is running, you can:

 - **Index your code:** Run `cw index` to build your first search index.
 - **Search manually:** Use `cw search "your query"` to test the results.
 - **Connect an Agent:** Add CodeWeaver to your `.mcp.json` to give Claude or other agents exquisite context.

For a deeper dive into how to customize your setup, see the [Configuration Architecture](./configuration/) guide.