Grafyx
GitHub: 0xarchit/grafyx
Live Demo: https://grafyx.0xarchit.is-a.dev
Tip
Visualize Your Codebase Like Never Before. A high-performance CLI-driven code knowledge graph tool.
Note
This project is in Beta and may have bugs.
Overview
Grafyx is a high-performance, CLI-driven code knowledge graph tool designed to map and visualize the complex relationships within modern codebases. By parsing directory structures and service interactions, Grafyx generates an interactive 2D/3D force-directed graph that helps developers understand dependency chains, structural bottlenecks, and project architecture at a glance.
Developed with Rust for safety and speed, and D3.js for fluid frontend interactions, Grafyx bridges the gap between static analysis and intuitive visual exploration.
Visual Demo
Architecture
Grafyx follows a decoupled architecture, ensuring high-speed processing and a responsive user experience.
System Flow Diagram
graph TD
subgraph "CLI Layer"
A[Rust CLI Parser]
end
subgraph "Graph Engine"
B[Node/Edge IR]
C[Dependency Resolver]
end
subgraph "Storage"
D[(SQLite)]
E[(JSON)]
end
subgraph "Frontend"
F[D3.js Visualization]
G[Physics Engine]
H[Interactive UI]
end
A --> B
B --> C
C --> D
C --> E
D --> F
E --> F
F --> G
G --> HFeatures
Live Physics Engine
Grafyx features a "Hot Update" physics engine inspired by tools like Obsidian. Adjusting sliders instantly ripples through the graph without requiring a full re-render, keeping the simulation fluid and "liquid."
Force Parameters
- Repulsion: Determines how much nodes push away from each other
- Link Distance: Controls the target length for edges
- Gravity (Center Force): Pulls all nodes toward the center point
- Damping: Adjusts the decay rate of movement for stability
Getting Started
Installation
Binary Install (Recommended)
Linux (AMD64):
curl -L https://github.com/0xarchit/grafyx/releases/latest/download/grafyx-linux-amd64-static -o grafyx && chmod +x grafyx && ./grafyx install && rm grafyx
macOS (Apple Silicon):
curl -L https://github.com/0xarchit/grafyx/releases/latest/download/grafyx-macos-aarch64 -o grafyx && chmod +x grafyx && ./grafyx install && rm grafyx
macOS (Intel):
curl -L https://github.com/0xarchit/grafyx/releases/latest/download/grafyx-macos-x86_64 -o grafyx && chmod +x grafyx && ./grafyx install && rm grafyx
Windows (PowerShell):
iwr https://github.com/0xarchit/grafyx/releases/latest/download/grafyx-windows-amd64.exe -OutFile grafyx.exe; .\grafyx install; del grafyx.exe
Build from Source
git clone https://github.com/0xarchit/grafyx.git
cd grafyx/tool
cargo build --release
Quick Start
If this is your first time using Grafyx, run the command below from your project root.
Scan Command
grafyx --dirs <directories space separated> --output ./<output folder>
Example:
grafyx --dirs tool web --output ./output-test
After scan completes:
- Open
./<output folder>/index.htmlin your browser - Use
grafyx.jsonfor readable data export - Use
grafyx.dbfor fast programmatic queries
Usage
Commands
Scan Flags
Configuration
Settings are persisted in the browser's localStorage under grafyx-settings. This allows you to maintain your custom visual configuration across different scans of the same project.
- Theme: Fixed dark mode for maximum contrast
- Node Colors: Scaled based on connectivity or type (Service/Import vs. Structural)
- Link Colors:
- Vibrant Green: Service dependencies/imports
- White: Structural hierarchy
Attribution
Grafyx is created and maintained by 0xArchit.
If you build on top of this project, please provide proper attribution. Any derivative works must retain the original copyright notice in the license.