Find code by meaning, not just text. Powered by bge-small-code-v1 — a 33M code embedding model that runs entirely locally.
Features
- Semantic search — describe what you're looking for in natural language, find matching code
- Right-click search — select code, right-click "Find Similar Code" to find related snippets
- 100% local — no API calls, no data leaves your machine. Model runs via ONNX in the extension.
- Fast — index a workspace in seconds, search results are instant
Usage
Search (Cmd+Shift+F)
- Open the command palette or press
Cmd+Shift+F - Select "CodeSearch: Semantic Search"
- Type a description like "function that validates email addresses"
- Click a result to jump to the matching code
Index Workspace
Run "CodeSearch: Index Workspace" from the command palette to build the search index. This scans your workspace, chunks code files, and embeds them locally.
Find Similar Code
Select any code in the editor, right-click, and choose "CodeSearch: Search for Similar Code" to find semantically similar code across your workspace.
How it works
- Indexing — walks your workspace, splits files into 30-line chunks, embeds each chunk using bge-small-code-v1 via transformers.js
- Searching — embeds your query, computes cosine similarity against all chunks, shows top results in a quick pick
Model
Uses ArnavKewalram/bge-small-code-v1-onnx — a 33M parameter code embedding model fine-tuned on CoRNStack code search triplets. INT8 quantized to 33.8MB for fast local inference.
Supported Languages
Python, JavaScript, TypeScript, Java, Go, Rust, C/C++, C#, Ruby, PHP, Swift, Kotlin, Scala, SQL, Dart, Lua, and more (50+ file extensions).
Requirements
- VS Code 1.85+
- No GPU required — runs on CPU via ONNX