Quickstart
Get from zero to semantic search in 5 minutes.
Prerequisites
- Node.js 22+ installed
- Cursor IDE (or Claude Code)
- A code repository to index
Step 1: Install dev-agent
npm install -g @lytics/dev-agentStep 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.3sStep 3: Connect to Cursor
dev mcp install --cursorThen restart Cursor.
Step 4: Try semantic search
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:
Planning from GitHub issues:
“Use dev_plan to create an implementation plan for issue #42”
Find similar code:
“Use dev_explore to find code similar to src/utils/cache.ts”
Search GitHub issues:
“Use dev_gh to search for issues about performance”
What’s Happening Under the Hood
When you run dev index .:
- Scanner parses your code using the TypeScript Compiler API
- Extractor identifies functions, classes, interfaces, types, arrow functions, hooks, and exported constants
- Embedder generates vector embeddings locally (MiniLM-L6-v2)
- Storage saves everything to LanceDB (
~/.dev-agent/indexes/)
When AI tools call dev_search:
- Query gets embedded using the same model
- Vector search finds semantically similar code
- Formatter returns results optimized for LLM context windows
Next Steps
- MCP Tools → — Learn about all available tools
- Architecture → — Understand how dev-agent works
Pro tip: Re-index after major code changes to keep search results accurate:
dev index . --force
Last updated on