Visualize, partition, and safely edit any codebase as a graph of functional blocks with input/output contracts.
Grafo Code uses AI to analyze your source files and render them as an interactive canvas — each function, class, or logical group becomes a draggable block with clearly defined inputs, outputs, and dependencies. All contract validation, test generation, and code changes happen through this structured view.
Features
Import mode — see any file as a graph
Open a source file, run Grafo Code: Import existing project, and the extension partitions the code into functional blocks, draws the dependency graph, and highlights issues (long functions, mutable globals, missing type hints).
- Works with Python, JavaScript, TypeScript, Java, C#, C++, C, Go, PHP, and Ruby
- Click any block to inspect its contract, view the source lines, and navigate back
- Drill into a large function with Expand block to see its internal sub-graph
Create mode — design before you code
Describe what you want to build in natural language. Grafo Code proposes an architecture as a graph — blocks, contracts, and connections — before writing a single line of code. Approve the proposal and the extension generates the initial file structure.
Edit mode — change code with contract validation
Select a block, edit its implementation. Before saving, the AI validates whether the changes still respect the block's declared input/output contracts. Breaking changes are caught before they propagate.
Implement mode — add features without breaking contracts
Describe a new feature in plain English. The AI generates code that integrates with the existing graph's contracts — no surprises downstream.
Getting started
- Install the extension from the VS Code Marketplace
- Sign in — run
Grafo Code: Sign into create a free account (7-day trial, then $19/month) - Add your LLM key — choose a provider and paste your API key (stored in OS keychain, never sent to our servers)
- Open any source file and run
Grafo Code: Import existing projectfrom the Command Palette - The canvas opens beside your editor — explore, click, drill in
LLM providers
Grafo Code uses your own API key for all AI operations. Typical cost for a 200-line import is well under $0.01.
| Provider | Model | Notes |
|---|---|---|
| Anthropic | claude-sonnet-4-6 | Recommended — best contract accuracy |
| OpenAI | gpt-4o | Strong alternative |
| gemini-1.5-flash | Fastest, lowest cost | |
| Groq | llama-3.3-70b | Free tier available |
| Ollama | any local model | 100% private, no API cost |
Privacy & security
- Your source code is sent to your chosen LLM provider via your own API key
- Grafo Code servers never store your source code or API keys
- API keys are stored in your OS keychain via VS Code
SecretStorage - Authentication uses OAuth (GitHub or Google) via Supabase
Requirements
- VS Code 1.80 or newer
- A Grafo Code account (free 7-day trial at grafocode.com)
- An API key for one of the supported LLM providers
Commands
| Command | Description |
|---|---|
Grafo Code: Sign in |
Open the onboarding panel |
Grafo Code: Import existing project |
Partition the active file into a block graph |
Grafo Code: Create project |
Design a new project from a description |
Grafo Code: Check integrity |
Run all generated tests and update block status |
Grafo Code: Open Canvas |
Re-open the canvas panel |
Support
Found a bug or have a suggestion? Open an issue on GitHub.