5 unstable releases
| 0.3.3 | Feb 20, 2026 |
|---|---|
| 0.3.2 | Feb 14, 2026 |
| 0.3.0 | Jan 2, 2026 |
| 0.2.0 | Dec 24, 2025 |
| 0.1.0 | Dec 18, 2025 |
#499 in Visualization
Used in vibe-graph-cli
210KB
4.5K
SLoC
REST + WebSocket API service for Vibe-Graph.
This crate provides a clean API layer that can be consumed by any frontend. It separates data serving from visualization concerns.
Endpoints
Graph & WebSocket API (stateful, for visualization)
GET /api/health- Health check with node/edge countsGET /api/graph- Full SourceCodeGraph JSONGET /api/graph/nodes- Nodes onlyGET /api/graph/edges- Edges onlyGET /api/graph/metadata- Graph metadataGET /api/git/changes- Current git change snapshotGET /api/ws- WebSocket for real-time updates
Operations API (stateless, for CLI-like operations)
POST /api/ops/sync- Sync a codebaseGET /api/ops/sync?source=...- Sync with query paramsPOST /api/ops/graph- Build source code graphGET /api/ops/graph?path=...- Build graph with query paramsGET /api/ops/status?path=...- Get workspace statusGET /api/ops/load?path=...- Load project from .selfDELETE /api/ops/clean?path=...- Clean .self folderGET /api/ops/git-changes?path=...- Get git changes
Git Commands API (for executing git operations)
POST /api/git/cmd/add- Stage filesPOST /api/git/cmd/commit- Create commitPOST /api/git/cmd/reset- Unstage filesGET /api/git/cmd/branches- List branchesPOST /api/git/cmd/checkout- Switch branchGET /api/git/cmd/log- Commit historyGET /api/git/cmd/diff- Get diff
Usage
use vibe_graph_api::{create_api_router, create_api_state, create_ops_router};
use vibe_graph_ops::{Config, OpsContext};
// For visualization server with pre-loaded graph
let graph = vibe_graph_core::SourceCodeGraph::default();
let state = create_api_state(graph);
let router = create_api_router(state);
// For operations API
let config = Config::load().unwrap();
let ctx = OpsContext::new(config);
let ops_router = create_ops_router(ctx);
Dependencies
~39MB
~669K SLoC