Skip to content

Latest commit

 

History

History
147 lines (98 loc) · 2.86 KB

File metadata and controls

147 lines (98 loc) · 2.86 KB

Installation

Requirements

  • Node.js 22+ (LTS recommended)
  • Antfly — search backend (installed automatically by dev setup)
  • Cursor or Claude Code (for MCP integration)

Install dev-agent

npm:

npm install -g @prosdevlab/dev-agent

pnpm:

pnpm add -g @prosdevlab/dev-agent

yarn:

yarn global add @prosdevlab/dev-agent

Verify the installation:

dev --version

One-time setup

Run dev setup to start the search backend:

dev setup                 # Uses native Antfly (default)
dev setup --docker        # Or use Docker

This does three things:

  1. Installs Antfly if not found (offers to install via Homebrew)
  2. Pulls the embedding model — downloads the ONNX model for local embeddings
  3. Starts the Antfly server — handles hybrid search and embeddings locally

What is Antfly? Antfly is the search engine that powers dev-agent. It runs locally on your machine — your code never leaves. It provides hybrid search (BM25 keyword matching + vector similarity) which is significantly better than pure vector search for code.

Setup for Cursor

1. Index your repository

Navigate to your project and index it:

cd /path/to/your/project
dev index

2. Install MCP integration

dev mcp install --cursor

This configures Cursor to use dev-agent's MCP server.

3. Restart Cursor

Restart Cursor to pick up the new MCP configuration.

4. Verify it works

In Cursor's AI chat, ask:

"Use dev_search to find authentication code"

If dev-agent is working, you'll see semantic search results from your codebase.

Setup for Claude Code

1. Index your repository

cd /path/to/your/project
dev index

2. Install MCP integration

dev mcp install

3. Restart Claude Code

The MCP tools should now be available in Claude Code.

Configuration

dev-agent stores its data in ~/.dev-agent/:

~/.dev-agent/
├── indexes/           # Vector databases (per-repo)
├── github/            # GitHub metadata cache
└── config.json        # Global configuration (optional)

Note: Each repository gets its own index. Indexes are keyed by the repository's absolute path.

Troubleshooting

"Command not found: dev"

Make sure npm's global bin is in your PATH:

# Check where npm installs global packages
npm config get prefix

# Add to PATH (add to ~/.zshrc or ~/.bashrc)
export PATH="$(npm config get prefix)/bin:$PATH"

MCP tools not showing in Cursor

  1. Check the MCP configuration:

    dev mcp list --cursor
  2. Verify your repository is indexed:

    dev status
  3. Restart Cursor completely (not just reload window)

Index errors

If indexing fails, try:

# Clean and re-index
dev clean
dev index