Skip to Content
DocumentationQuickstart

Quickstart

Get from zero to semantic search in 5 minutes.

Prerequisites

  • Node.js 22+ installed
  • Antfly  — search backend (installed automatically by dev setup)
  • Cursor IDE (or Claude Code)
  • A code repository to index

Step 1: Install and setup

npm install -g @prosdevlab/dev-agent dev setup

dev setup installs Antfly, pulls the embedding model, and starts the server. One-time step.

Step 2: Index your repository

cd ~/your-project dev index

You’ll see output like:

Scanning repository... Found 247 files to index Generating embeddings... ████████████████████████████████████████ 100% Indexed 1,832 code components in 12.3s

Step 3: Connect to Cursor

dev mcp install --cursor

Then restart Cursor.

Open Cursor’s AI chat and ask:

“Use dev_search to find where we handle user authentication”

You’ll get results like:

1. [89%] class: AuthMiddleware (src/auth/middleware.ts:15) 2. [84%] function: verifyToken (src/auth/jwt.ts:5) 3. [72%] function: validateSession (src/auth/session.ts:23)

Step 5: Explore more tools

Try these prompts:

Find similar code:

“Use dev_patterns to compare src/utils/cache.ts with similar implementations”

What’s Happening Under the Hood

When you run dev index:

  1. Scanner parses your code using the TypeScript Compiler API (ts-morph) and tree-sitter (Go)
  2. Extractor identifies functions, classes, interfaces, types, arrow functions, hooks, and exported constants
  3. Storage sends documents to Antfly, which generates embeddings locally via Termite (ONNX)

When AI tools call dev_search:

  1. Hybrid search runs BM25 (keyword matching) + vector similarity in parallel
  2. RRF fusion combines both signals into a single ranked result set
  3. Formatter returns results optimized for LLM context windows

Next Steps

Pro tip: Re-index after major code changes to keep search results accurate:

dev index --force
Last updated on