How I Set Up Graphify with OpenCode on Windows (Beginner-Friendly Guide)

Large AI coding assistants are impressive—but once your project grows, they start spending a lot of time searching files, consuming tokens, and sometimes missing important context.
I recently started using Graphify with OpenCode, and it made a noticeable difference. Instead of scanning raw files every time, OpenCode can query a knowledge graph of my project, making responses faster and much more accurate.
In this guide, I'll show you exactly how I set up Graphify on Windows with a Next.js project.
What is Graphify?
Graphify is an open-source tool that analyzes your codebase and builds a local knowledge graph.
Instead of treating your project as thousands of files, it understands:
📦 Classes
⚙️ Functions
📂 Modules
🔗 Imports
🕸 Relationships between components
Everything runs locally, so your source code never leaves your machine.
It also integrates with AI coding assistants like:
OpenCode
Cursor
Claude Code
Other MCP-compatible AI tools
Prerequisites
Before getting started, make sure you have:
Windows
Python 3.10+
A Next.js (or any supported) project
OpenCode CLI installed
PowerShell
Step 1: Install Python
Download Python from:
👉 https://www.python.org/downloads/
During installation, don't forget to enable:
✅ Add python.exe to PATH
After installation, verify:
python --version
Example:
Python 3.14.x
Step 2: Install Graphify
Install Graphify using pip:
pip install graphifyy
Note: The package name is graphifyy (double y), while the command is simply graphify.
If the command isn't recognized, install it using pipx instead (recommended):
python -m pip install pipx
python -m pipx ensurepath
Restart PowerShell, then run:
pipx install graphifyy
Verify the installation:
graphify --version
Step 3: Connect Graphify to OpenCode
Navigate to your project:
cd your-project
Run:
graphify opencode install
This automatically:
Updates your AGENTS.md
Installs the Graphify plugin
Instructs OpenCode to prefer the knowledge graph before searching files
Step 4: Build Your First Knowledge Graph
Start OpenCode:
opencode
Inside OpenCode, run:
/graphify .
Graphify scans your project and generates:
graphify-out/
├── graph.html
├── GRAPH_REPORT.md
└── graph.json
Files Explained
graph.html
Interactive visualization of your project architecture.
GRAPH_REPORT.md
A readable architecture report generated from your codebase.
graph.json
The underlying knowledge graph used by AI assistants.
The initial scan may take a few minutes depending on your project size.
Step 5: Make It Always-On (Recommended)
Run the install command once more:
graphify opencode install
This reinforces OpenCode's behavior so it consults the knowledge graph before scanning raw source files.
Add to .gitignore
graphify-out/manifest.json
graphify-out/cost.json
graphify-out/cache/
graphify-out/20*/
How to Know It's Working
Ask OpenCode something architecture-related:
How does authentication work in this project?
If you notice it reading:
graphify-out/GRAPH_REPORT.md
or referring to concepts like:
Communities
Dependencies
Graph nodes
God nodes
then Graphify is working correctly.
You can also be explicit:
Use the Graphify knowledge graph to explain the application's data flow.
Useful Commands
Query your project:
graphify query "How does authentication connect to the database?"
Explain a component:
graphify explain "AuthService"
Update the graph after code changes:
graphify . --update
Why I Like Graphify
The biggest improvement isn't just visualization—it's how much better AI assistants understand large projects.
Instead of repeatedly searching hundreds of files, OpenCode can reason over a structured graph of your application.
I've noticed:
⚡ Faster responses
🎯 Better architectural understanding
💰 Lower token usage
🧠 More accurate code explanations
For medium-to-large codebases, it's a simple upgrade that significantly improves the AI coding experience.
Final Thoughts
Setting up Graphify took me less than 20 minutes, and most of that time was installing Python.
If you're using OpenCode, Cursor, or Claude Code on a growing codebase, I highly recommend giving Graphify a try.
It helps your AI understand your project the way you understand it—as a connected system instead of a collection of files.
Happy coding! 🚀
Useful Links
Graphify GitHub
https://github.com/graphify-ai/graphify
Python Downloads
https://www.python.org/downloads/
OpenCode






