Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>anandRAGNew to Visual Studio Code? Get it now.
anandRAG

anandRAG

anandJNET123

|
1 install
| (0) | Free
AI developer assistant grounded in your codebase via local RAG — zero data egress
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeRAG — Local AI Assistant for Your Codebase

CodeRAG is a VS Code extension that gives you an AI chat assistant fully grounded in your own codebase — with zero data egress. It indexes your code locally using vector embeddings and retrieves the most relevant context before every answer.

Features

  • Local RAG — indexes your workspace into a local vector database (LanceDB); no code leaves your machine
  • Multi-provider LLM — works with Ollama (fully local), OpenAI, or Anthropic
  • Tree-sitter parsing — understands TypeScript, JavaScript, Python, Rust, Go, Java, C, and C++ at the AST level for precise chunk boundaries
  • Chat panel — sidebar chat with streaming responses and code highlighting (Cmd+Shift+A)
  • CodeLens — "Ask AI" button above every function and class
  • Ask about selection — right-click any selected code → Ask CodeRAG About Selection
  • Auto-reindex — watches for file changes and keeps the index up to date

Requirements

Choose one embedding + LLM backend:

Option A — Ollama (fully local, no API key needed)

  1. Install Ollama
  2. Pull an embedding model: ollama pull nomic-embed-text
  3. Pull a chat model: ollama pull llama3 (or codellama, deepseek-coder, etc.)

Option B — OpenAI

  • Set coderag.openaiApiKey to your API key
  • Set coderag.embeddingProvider and coderag.llmProvider to openai

Option C — Anthropic

  • Set coderag.anthropicApiKey to your API key
  • Set coderag.llmProvider to anthropic
  • Embeddings still require Ollama or OpenAI

Quick Start

  1. Open a workspace folder
  2. Run CodeRAG: Index Workspace from the Command Palette (Cmd+Shift+P)
  3. Wait for indexing to complete (status bar shows progress)
  4. Press Cmd+Shift+A or click the CodeRAG icon in the activity bar to open chat

Configuration

Setting Default Description
coderag.embeddingProvider ollama ollama or openai
coderag.llmProvider ollama ollama, openai, or anthropic
coderag.ollamaUrl http://localhost:11434 Ollama server URL
coderag.ollamaEmbeddingModel nomic-embed-text Ollama embedding model
coderag.ollamaLlmModel llama3 Ollama chat model
coderag.openaiApiKey (empty) OpenAI API key
coderag.anthropicApiKey (empty) Anthropic API key
coderag.anthropicModel claude-sonnet-4-6 Anthropic chat model
coderag.topK 8 Chunks retrieved per query
coderag.maxContextTokens 8000 Max tokens sent to LLM
coderag.enableCodeLens true Show "Ask AI" above functions
coderag.ignorePatterns node_modules, dist, .git Glob patterns excluded from indexing
coderag.maxFileSizeKB 512 Skip files larger than this

Commands

Command Description
CodeRAG: Open Chat Open the chat panel
CodeRAG: Index Workspace Re-index the entire workspace
CodeRAG: Clear Index Delete the vector index
CodeRAG: Show Index Status Show file/chunk count
CodeRAG: Download Tree-sitter Grammars Download WASM grammar files
Ask CodeRAG About Selection Ask about selected code (editor context menu)

Privacy

All indexing and search runs entirely on your machine. Only the LLM call leaves your machine — and only when you choose OpenAI or Anthropic. With Ollama everything is 100% local.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft