A local, offline graph visualizer for Python projects. IQGraphify scans a codebase, builds an interactive dependency graph (imports, function calls, folder structure), and can replay live runtime execution as your code runs — function by function, file by file.
Built to integrate with IQAgent but works as a standalone tool for any Python project.
- Interactive project graph — visualize file relationships: imports, function calls, folder containment
- Live runtime trace — right-click an entry point or test file, run it, and watch the graph light up function-by-function as it executes
- Replay mode — slow-motion playback of the last run, since live execution is often too fast to follow
- AI-generated summaries — each file gets a short topic summary using a local GGUF model (fully offline, no API keys)
- Project-aware — caches results in
output/graph_memory.jsonso reopening a project is instant - Node search — jump to any file by name
- Windows 10/11 (tested platform; PyQt5 is cross-platform but this project assumes Windows paths in places)
- Python 3.10+
- llama.cpp built locally (for AI summaries — optional, can be skipped)
- A GGUF model file (e.g. Qwen3-0.6B or similar small model) — optional, can be skipped
git clone https://github.com/iqbal-irfan/IQGraphify.git
cd IQGraphify
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtTo enable file summaries, you need:
- A local build of llama.cpp (specifically
llama-server.exe) - A
.ggufmodel file placed in theLLM model/folder
Update config.yaml with the path to your llama-server.exe:
llama_server:
executable: "C:/path/to/your/llama.cpp/build/bin/Release/llama-server.exe"
model: "LLM model/your-model.gguf"
port: 8080If you skip this setup, choose "Skip (no summaries)" in the model selector dialog on launch — the graph still works fully, just without AI-generated file summaries.
python app.py "C:\path\to\your\project"Or launch without a project and use Run Graphify from the menu to pick a folder.
IQGraphify is designed to be launched from IQAgent's Visualize button, which passes the active project path automatically and listens for node-click signals to open files in IQAgent's editor.
file_graph_builder.py walks the target project, extracts function definitions and call/import relationships via regex, and builds a node/edge graph rendered with pyvis (vis.js under the hood).
When you right-click an entry point file (main.py, app.py, gui.py, run.py) or a test file (test_*.py) and choose Run This File:
core/_trace_runner.pylaunches the file in a subprocess, with all class methods wrapped to emitRUNTIME:trace lines as they executecore/graph_engine.pyreads this output and forwards events to the graphui/live_graph.py(injected JavaScript) highlights the active node and shows a live function list — pending functions in red, the currently running function in gold, completed functions in green- The full execution sequence is recorded, so you can hit Replay afterward to watch it again in slow motion
GUI frameworks like Tkinter override sys.settrace internally, so a naive trace approach silently stops working once mainloop() starts. Instead, IQGraphify wraps each class's methods directly after import, so traces fire regardless of what's running the event loop.
IQGraphify/
├── api/ # Public API (GraphAPI) for external integration
├── core/ # Graph engine, runtime tracer, LLM manager
├── ui/ # PyQt5 UI, JS graph bridge, model selector
├── lib/ # Bundled vis.js / tom-select assets
├── LLM model/ # Place your .gguf model here (not included)
├── output/ # Generated graph_memory.json, graph.html
├── app.py # Entry point
├── pyqt_graph_app.py # Base GraphApp widget
└── config.yaml # Physics, server, UI settings
- Windows-focused (hardcoded path separators in a few places)
- Live trace works at the function level, not line level
- Large projects (1000+ files) may render a cluttered graph — no auto-layout tuning yet
This project was developed with the help of ChatGPT, Claude, and Qwen.
MIT — see LICENSE for details.