Codegraphify
Codegraphify indexes your workspace with tree-sitter
and semantic embeddings, then lets you search your codebase in plain English and explore
it as interactive graphs — classes and their relationships, straight from the same parse.
About
Codegraphify is a VS Code extension for understanding a codebase quickly. It combines
natural-language code search, local-first vector storage, and interactive class/file
dependency graphs so you can ask questions, inspect relationships, and move from a graph
node back to source code without leaving the editor.
Features
- Semantic code search – ask questions about your code and get the most relevant
functions and snippets, with file paths and line numbers.
- Class graph – visualize your workspace as an interactive graph: classes and
interfaces are nodes, relationships (inheritance,
implements, imports, typed-field
composition (when a field's type resolves to another class in the workspace), and
method calls) are edges. Click a class to expand its methods. Built from the same
tree-sitter parse; edges are confidence-tagged, so only trustworthy relationships show
by default.
- File graph – switch the Graph tab to Files mode to see file-to-file import
dependencies, including cycle and unused-import highlighting.
- Incremental indexing – only changed files are re-embedded; file changes are
picked up automatically.
- Pluggable providers – embeddings via Google Gemini or OpenRouter.
- Local-first vector store – uses Qdrant for vector search.
- Secure key storage – API keys are kept in VS Code Secret Storage, not in settings.
Requirements
- A running Qdrant instance. The quickest way is Docker:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
The default URL is http://localhost:6333 (configurable).
- An API key for your chosen embedding provider (Gemini or OpenRouter).
Getting started
- Install the extension and open the Codegraphify view from the activity bar.
- Open the settings panel (gear icon) and:
- choose your embedding provider,
- set the provider API key (stored securely),
- confirm the Qdrant host/port.
- Run Codegraphify: Index Workspace (command palette) or use the Index
button in the sidebar.
- Ask a question in the chat, or open the Graph tab to explore your workspace.
Class graph
Run Codegraphify: Show Class Graph from the command palette (or open the Graph tab in
the sidebar). Each class or interface is a node; edges show how they relate —
inheritance and implements, imports, typed fields, and method calls. Click a class to
expand its methods, double-click to jump to its definition, and use the toolbar to switch
between hierarchical (dagre) and force layouts or to search by name.
Because tree-sitter has no type information, relationship edges carry a confidence score.
Trustworthy edges (inheritance, imports, typed-field composition (when a field's type resolves to another class in the workspace), self/this calls) are shown
solid by default; lower-confidence guesses stay hidden behind the show uncertain
relationships toggle, so the graph stays honest rather than noisy. The graph currently
covers TypeScript/JavaScript and Python, and updates incrementally as you edit files.
Commands
| Command |
Description |
Codegraphify: Ask Question |
Ask a question about your code. |
Codegraphify: Index Workspace |
Build/refresh the index for a workspace folder. |
Codegraphify: New Chat |
Start a new chat session. |
Codegraphify: Show Class Graph |
Open the interactive class-relationship graph. |
Codegraphify: Show Status |
Show the current indexing status. |
Configuration
Most setup happens in the sidebar settings panel: pick your embedding provider and
confirm the Qdrant host/port. API keys (Gemini, OpenRouter, Qdrant) are entered there
and stored in VS Code Secret Storage.
Every setting is also available under the codeContextAi. prefix in VS Code Settings,
including the embedding provider/model overrides (codeIndex.*), the OpenRouter base
URL, and the Qdrant connection and collection name.
Privacy & data handling
This extension processes your source code. Here is exactly where it goes.
Stays on your machine
- Parsing and chunking your code (tree-sitter) happens locally.
- The class and file graphs are built entirely locally from the tree-sitter parse —
no code leaves your machine for graph features.
- The vector index is stored in your Qdrant instance — local by default
(
http://localhost:6333). Nothing is indexed to a server you don't control.
- API keys are stored in VS Code Secret Storage, never in plaintext settings.
Sent to the embedding provider you configure (Google Gemini or OpenRouter)
- During indexing: chunks of your source code are sent to the embedding provider to
generate vectors.
- During search: your query text is sent to the embedding provider.
- OpenRouter requests include
HTTP-Referer (this project's repo URL) and X-Title
(Codegraphify) headers that identify the app, per OpenRouter's API conventions.
Code is only transmitted when you index or query. Files excluded by your ignore
configuration are not indexed or sent — exclude sensitive paths to keep them local. Once
data reaches a provider, it is governed by that provider's own terms:
Google Gemini API ·
OpenRouter Privacy.
The extension itself collects no telemetry, analytics, or usage data, and sends
nothing to the author or any third party other than the provider you choose and your
Qdrant instance.
Contributing
Development setup and packaging instructions live in CONTRIBUTING.md.
Acknowledgements
The tree-sitter integration and language queries (src/engine/tree-sitter,
src/core/ignore) are adapted from the Roo-Code /
Kilo-Code projects, licensed under Apache-2.0.
License
MIT. See the LICENSE file for third-party attribution notes.