Skip to content

About

πŸš€ High-performance Rust & Tree-sitter code graph engine. Ultra-compact .toon format (60%+ token saved), zero-latency 429 key rotation via AtomicUsize, Qdrant LTM & MCP server. 26x faster than Python.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GraphifyRust

English | 繁體中文

An extremely high-performance, low-latency static code AST semantic graph construction tool written in Rust and powered by Tree-sitter. Featuring the highly compact .toon Token-Oriented Object Notation serialization format, a thread-safe multi-key lock-free auto-rotating failover LLM pipeline, local Qdrant long/short-term semantic memory integration, and Model Context Protocol (MCP) server support, it delivers high-precision topological code awareness to AI assistants at minimal cost.

Graphify TUI Demo


πŸ“š Documentation Index

Detailed system architecture, command specifications, and integration guides have been modularized into separate manuals:

  • CLI Manual: Documenting all commands including extract, query, path, install-skill, tui, index, init, handoff (with skill install), plugin, workspace, opendoc, review, coverage, and compose (multi-workspace Assembly Manifest β†’ unified graph β†’ diagram).
  • Core Engine: Deep dive into Tree-sitter AST parsing, petgraph pre-allocation optimizations, and the .toon serialization logic which saves 60% in token overhead.
  • LLM & Memory Pipeline: Explaining the lock-free thread-safe AtomicUsize multi-key rotation, 429 rate limit tolerance, backup provider failover, and local Qdrant vector store implementation.
  • MCP Server Spec: Detailing how the graph and semantic RAG search capabilities (Summary, Query Node, Path, Reindex) integrate with AI development environments.
  • Plugin System: Architecture blueprint for the micro-kernel plugin ecosystem (review / handoff / opendoc) plus the v1 GraphifyPlugin trait contract (workspace_key routing, .toon sync).

🌐 Remote MCP Server & TUI

graphify-mcp ships as an HTTP-only MCP server (stdio removed):

# Serve over streamable HTTP β€” bind an intranet interface for remote clients
graphify-mcp serve --listen 0.0.0.0:9899

# Optional bearer token (clients must send `Authorization: Bearer <token>`)
GRAPHIFY_MCP_TOKEN=secret graphify-mcp serve --listen 0.0.0.0:9899

The TUI can render a graph snapshot fetched from a remote graphify server instead of a local .toon file:

graphify tui --remote http://your-server:9899               # or GRAPHIFY_REMOTE env
graphify tui --remote http://your-server:9899 --token secret # or GRAPHIFY_REMOTE_TOKEN env

Self-hosting: run serve on the machine holding the graph, then point the TUI (or any streamable-HTTP MCP client) at its /mcp endpoint.


⚑ Performance Benchmark & Parity

We compared the AST extraction and graph building speeds on a multi-language test project containing Rust, Python, Go, and JavaScript (110 source files, 422 edges):

Dimension Legacy Python version New Rust version (110 files) Performance Leap
AST Extraction + Build Time ~420 ms 16 ms (0.016s) 26.25x faster ⚑
Multi-Core Scaling Not supported (single-threaded) Supported via Rayon (-j N) Scales linearly with threads πŸš€
Memory Allocation Strategy Dynamic scaling / copying Petgraph Arena Pre-allocation Zero heap fragmentation
Serialized File Size (.toon) 185 KB (JSON) 74 KB (.toon) 60% token reduction (boosts prompt speed)

πŸ“¦ Quick Installation & Build

# Install directly from GitHub
cargo install --git https://github.com/cawa0505/graphify-rust.git --branch main graphify-cli --force

# Or clone and enter directory to build locally
git clone https://github.com/cawa0505/graphify-rust.git
cd graphify-rust
cargo install --path graphify-cli --force

πŸ“„ License

Licensed under the MIT License. See LICENSE for details.

About

πŸš€ High-performance Rust & Tree-sitter code graph engine. Ultra-compact .toon format (60%+ token saved), zero-latency 429 key rotation via AtomicUsize, Qdrant LTM & MCP server. 26x faster than Python.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages