vibe-graph-cli-0.2.8 is not a library.
vibe-graph-cli (vg)
CLI for analyzing codebasesβworks with single repositories, multi-repo workspaces, or plain directories. Auto-detects structure, builds dependency graphs, and provides interactive visualization.
Installation
Quick Start
# Analyze current directory
# Build the dependency graph
# Launch interactive visualization
# β http://localhost:3000
# Generate documentation
Commands
| Command | Description |
|---|---|
vg sync |
Analyze workspace, save to .self/ |
vg sync --snapshot |
Create timestamped snapshot |
vg load |
Load from .self/ without rescanning |
vg graph |
Build SourceCodeGraph with cross-file references |
vg graph -o FILE |
Also export graph to custom path |
vg serve |
Interactive visualization at localhost:3000 |
vg serve --port 8080 |
Use custom port |
vg compose |
Generate markdown docs (uses cache) |
vg compose --force |
Force rescan before composing |
vg status |
Show workspace and .self status |
vg clean |
Remove .self/ folder |
vg remote show |
Show configured remote |
vg remote add <org> |
Set GitHub org as remote (workspaces) |
vg remote list |
List repos from configured org |
vg remote clone |
Clone all repos from configured org |
vg config show |
Show configuration |
Graph Visualization
The serve command starts a local web server with an interactive force-directed graph:
&&
Build Variants
| Build | Command | Size | Features |
|---|---|---|---|
| Minimal | cargo build --release |
~8 MB | D3.js via CDN |
| Full | cargo build --release --features embedded-viz |
~11 MB | egui WASM (offline) |
The minimal build requires internet for D3.js. The full build embeds ~3 MB of WASM for complete offline operation.
# Build full version with embedded visualization
&&
# Or manually (after building WASM assets)
Workspace Detection
| Structure | Detection |
|---|---|
.git in current dir |
Single repository |
Subdirs containing .git |
Multi-repo workspace |
No .git found |
Plain directory |
Example Session
$ cd my-project
$ vg sync
π Workspace: my-project
π Path: /home/user/my-project
π Detected: single repository
β
Sync complete
Repositories: 1
Total files: 142
Total size: 1.2 MB
πΎ Saved to .self/
π Remote: https://github.com/user/my-project.git
$ vg status
π Vibe-Graph Status
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π Workspace: my-project
π Path: /home/user/my-project
π Type: single repository
πΎ .self: initialized
Last sync: "5s ago"
Repos: 1
Files: 142
Size: 1.2 MB
Remote: https://github.com/user/my-project.git
$ vg serve
π Starting visualization server...
Mode: D3.js (fallback)
Graph: 156 nodes, 89 edges
π‘ Open http://localhost:3000
Remote Commands (GitHub Organizations)
For workspaces (directories with multiple repos), you can configure a GitHub org:
# Set a GitHub org as the remote
# List repositories
# Clone all repositories from the org
For single repos, the git remote is auto-detected during vg sync.
The .self Folder
Analysis results persist in .self/:
.self/
βββ manifest.json # Workspace metadata
βββ project.json # Full analysis data
βββ graph.json # SourceCodeGraph with references
βββ snapshots/ # Historical snapshots (--snapshot flag)
Add .self/ to your .gitignore.
Configuration
Environment Variables
| Variable | Description |
|---|---|
GITHUB_TOKEN |
GitHub PAT for remote commands |
GITHUB_USERNAME |
GitHub username |
VG_CACHE_DIR |
Custom cache directory |
VG_MAX_CONTENT_SIZE_KB |
Max file size to include content (default: 50) |
Config Commands
Reference Detection
The graph builder detects cross-file references for:
| Language | Patterns |
|---|---|
| Rust | use crate::, mod, use super:: |
| Python | import, from ... import |
| TypeScript/JavaScript | import, require() |
License
MIT