KiroGraph

forks contributors

Semantic code knowledge graph for Kiro: fewer tool calls, instant symbol lookups, 100% local.

Works with Kiro, Cursor, Copilot, Claude Code, Windsurf, Cline, Gemini CLI, and 27 more tools. Auto-detects your setup.

$ npm install -g kirograph && kirograph install
kirograph help
How It Compares

One tool, fourteen capabilities

KiroGraph combines features from 14 separate open-source projects (160k+ combined ⭐) into a single integrated MCP server.

Feature KiroGraph CodeGraph CRG jMunch caveman cavemem rtk lean-ctx headroom Engram tokensave
Code graph + call analysis
Architecture metrics
🔒 Vulnerability scanning + reachability
Community detection
Persistent memory
Conflict detection + knowledge hygiene
Documentation indexing
Shell + prose compression
File read caching + CCR
On-demand compression (any text)
9 semantic engines
📖 LLM Wiki (ingest → WIKI_DIFF → search)
Multi-platform (34 targets)713any28+

Full feature matrix →

Why KiroGraph?

Stop wasting tool calls on file scanning

When Kiro works on complex tasks it reads files, runs grep, and globs your codebase. Every one of those is a tool call that burns context and slows things down.

Fewer tool calls, faster responses

One kirograph_context call replaces a cascade of file reads, greps, and glob searches. Kiro gets symbol relationships, call graphs, and type hierarchies in a single round trip.

100% local, no API keys, no cloud

Everything is stored in a local SQLite database at .kirograph/kirograph.db. No telemetry, no external services, no API keys. Your code stays on your machine.

Always up to date, zero overhead

A single Kiro hook triggers on agentStop and syncs the index if any files changed during the session. No background watcher process; zero overhead during editing.

Features

Everything you need to supercharge Kiro

Core capabilities available out of the box — no extra configuration required.

126 MCP Tools

Context building, symbol search, call graphs, type hierarchies, impact analysis, dead code, circular deps, architecture, coupling metrics, snapshots, memory, documentation navigation, data querying, security scanning, and more, all auto-approved in Kiro.

Full CLI Reference

Every capability available from the terminal: kirograph index, sync, query, context, files, affected, path, hotspots, snapshot, export, and more.

Auto-sync Hooks

A single agentStop hook keeps the index fresh automatically. An optional preToolUse hook reminds the agent to use kirograph_exec for shell compression. An optional memory hook prompts the agent to store observations at session end. No watcher process needed.

Semantic Search

Opt-in embedding-based search with configurable models and nine pluggable engines: cosine, turboquant, turbovec, sqlite-vec, orama, pglite, lancedb, qdrant, typesense.

Framework Detection

Auto-detects React, Next.js, Express, Django, Flask, FastAPI, Rails, Spring, ASP.NET, Phoenix, Laravel, Flutter, SwiftUI, and more. Enriches the graph with routes, components, and lifecycle methods.

Export Dashboard

Interactive graph dashboard with search, two-click path finding, cluster view, minimap, heat map, and analytics charts. Run kirograph export to generate it.

Embedding Models

Choose from curated models: nomic-embed-text-v1.5 (default, 768d), embeddinggemma-300m (multilingual), all-MiniLM-L6-v2 (lightweight), bge-base-en-v1.5, or any custom HuggingFace model.

Snapshots & Diff

Save lightweight graph snapshots before refactors. Diff the current graph against any snapshot to see added/removed symbols and edges, available as both CLI and MCP tool.

Hotspots & Surprising Links

Find the most-connected symbols and non-obvious cross-file coupling. Useful for identifying load-bearing code and unexpected dependencies before making changes.

Opt-in Modules

Advanced opt-in modules

Enable only what you need. Each module is independently opt-in via kirograph install or a single config flag.

Architecture Analysis

v0.6.0
5 tools · ~205 tok

Auto-detects packages and architectural layers (api, service, data, ui, shared). Computes coupling metrics (Ca, Ce, instability) across your entire package graph. Enable via enableArchitecture.

Caveman Mode

v0.9.0

Compresses the agent's communication style to cut token usage on responses. Four levels: lite, full, ultra. Injected via steering file, no extra tool calls. Set via cavemanMode.

Shell Compression

v0.14.0

Run shell commands through kirograph_exec to get token-optimized output. Cuts 60–90% of tokens on git, test runners, linters, docker, and package managers. Three levels: normal, aggressive, ultra. Set via shellCompressionLevel.

Persistent Memory

v0.15.0
16 tools · ~746 tok

Cross-session observations stored locally with zero LLM tokens on write. Decisions, errors, and patterns are auto-linked to code symbols and surfaced in kirograph_context when relevant. Enable via enableMemory.

  • Conflict detection with typed relations (supersedes, conflicts_with, compatible)
  • Stale review scheduling (review_after)
  • Passive learning capture
  • Prompt saving
  • Stable topic key addressing

Documentation Navigation

v0.16.0
5 tools · ~241 tok

Indexes project docs by heading hierarchy for section-level retrieval. 9 format parsers, code ↔ docs cross-references, FTS search, and stable section IDs. 92–97% token savings vs reading full files. Enable via enableDocs.

Data Navigation

v0.17.0
10 tools · ~519 tok

Indexes tabular data files (CSV, TSV, JSONL, JSON, Excel, Parquet, PDF) for structured querying. Column profiling, server-side aggregations, and filtered row retrieval. 95–99% token savings vs reading raw data files. Enable via enableData.

Vulnerability Detection

v0.19.0
15 tools · ~675 tok

14 ecosystems · OSV batch queries · EPSS scores · call-graph reachability · attack surface mapping · secrets detection · SAST-lite · supply chain health · license compliance · CycloneDX 1.5 SBOM/VEX · CI/CD SARIF. Enable via enableSecurity.

Watchmen

v0.20.0
3 tools · ~140 tok

Auto-synthesizes accumulated memory observations into workspace briefs and skill files. Local model synthesis — zero API cost, no data leaves your machine. Enable via enableWatchmen.

TurboQuant Compression

v0.21.0

Compresses embeddings 20–30× using Google's TurboQuant algorithm. A 768-dim vector shrinks from 3,072 bytes to ~120 bytes. ANN search with zero native deps, pure TypeScript. Set semanticEngine: "turboquant".

Firecrawl PDF

v0.22.0

PDF indexing for the data module via pdf-inspector by Firecrawl. Pure Rust, no OCR, no network, prebuilt binaries for linux-x64 and macOS ARM64. Each page becomes a queryable row with content, needs_ocr, has_tables, has_columns. Text-based PDFs under 200ms. Enable via enableData.

TurboVec (Rust/SIMD)

v0.23.0

Same TurboQuant algorithm in Rust via napi-rs — NEON on ARM64 (Apple Silicon, Graviton), AVX-512BW on x86-64. Faster search than turboquant-js at the cost of a one-time Rust build. Built automatically by kirograph install. Set semanticEngine: "turbovec".

LLM Wiki

v0.25.0
10 tools · ~319 tok

Karpathy-style structured knowledge base that compounds across sessions. A two-step ingest flow (ingest prompt → WIKI_DIFF apply) gives the agent full control over what enters the wiki. Agent mode or local model synthesis (same Gemma 4 infra as Watchmen — zero API cost). FTS5 search, conflict detection, health lint. Enable via enableWiki.

Changelog

From v0.1 to v0.28 in three months

Drag or scroll to explore every release.

v0.1.0Initial Release
v0.2.0MCP Server & Hooks
v0.3.0Pluggable Vector Engines
v0.3.1Orama Engine
v0.3.2PGlite Engine
v0.3.3LanceDB Engine
v0.3.4Qdrant Engine
v0.3.5Typesense Engine
v0.4.0Guided Installer
v0.5.0CLI Agent
v0.6.0Architecture Analysis
v0.7.0Embedding Model Selection
v0.8.0esbuild Migration
v0.9.0Caveman Mode
v0.10.0Hotspots, Snapshots & Dead Code
v0.11.0Interactive Graph Dashboard
v0.12.0Elixir & Phoenix
v0.12.1Sync Progress & Stability
v0.12.2Documentation Site & npm
v0.13.0Language & Framework Expansion
v0.13.1Multi-client Support
v0.14.0Shell Compression
v0.14.1Hook Consolidation & Uninit Fixes
v0.15.0Memory
v0.16.0Documentation Navigation
v0.17.0Data Navigation
v0.17.1Multi-Platform Auto-Detection
v0.18.0Multi-IDE Expansion
v0.18.1Tier 1 IDE Expansion
v0.18.2Tier 2 IDE Expansion
v0.18.3Tier 3 IDE Expansion
v0.18.4Tier 4 — Full Coverage
v0.18.5Hooks & Session Hygiene
v0.18.6Antigravity, Gemini CLI & OpenCode Fixes
v0.19.0Security Module
v0.19.1KiroGraph-Patterns (ast-grep)
v0.20.0KiroGraph-Watchmen
v0.21.0TurboQuant Compression
v0.22.0Firecrawl PDF
v0.23.0TurboVec (Rust/SIMD)
v0.24.0Memory: Conflict Detection & Knowledge Hygiene
v0.25.0LLM Wiki
v0.26.0Installer Overhaul & Real Feature Flags
v0.27.0Kiro IDE v1.0.0 Hooks
v0.27.1Hook Library
v0.27.2Headroom Compression & CLI/MCP Parity
v0.28.0Code Health, Branch Tracking & Real Embedding Tests
Full changelog →
How It Works

Seven indexing layers, one query interface

KiroGraph parses your codebase with tree-sitter, stores everything in SQLite, and exposes it through MCP tools and CLI commands.

Kiro IDE / kiro-cli

"Fix the auth bug"
  ↓
kirograph_context("auth bug")

KiroGraph MCP Server

context callers search impact
type_hierarchy security memory docs
SQLite Graph DB (.kirograph/kirograph.db)

Seven Indexing Layers

Structural tree-sitter AST → nodes + edges · always on
Semantic 768-dim embeddings · opt-in · 9 engine options
Architecture packages + layers + coupling metrics · opt-in
Memory cross-session observations · symbol-linked · opt-in
Documentation section-level retrieval · 9 formats · code refs · opt-in
Data tabular data + PDF indexing · 7 formats · opt-in
Security dependency scanning + reachability analysis · OSV · opt-in

A single agentStop hook asks the agent to sync the index if any files were changed during the session. Zero overhead during active editing.

agentStop → sync if files changed preToolUse (shell) → suggest kirograph_exec
Semantic Search

Nine pluggable vector engines

Enable embeddings for natural-language search. Choose the engine that fits your project size and constraints; all fall back gracefully if deps are missing.

EngineSearch typeNative deps?Best for
cosine (default)Exact cosine, linear scanNoneSmall/medium projects, zero setup
turboquantANN, sub-linearNo (pure JS)Large codebases, 20–30× RAM savings, no native deps
turbovecANN, sub-linearYes (Rust/napi-rs)Fastest ANN; SIMD-accelerated; one-time Rust build; auto-built by installer
sqlite-vecANN, sub-linearYesLarge codebases, fast ANN
oramaHybrid (full-text + vector)No (pure JS)Best result quality, no native deps
pgliteHybrid, exact (WASM pgvector)No (WASM)Exact results, PostgreSQL semantics
lancedbANN, sub-linearNo (pure JS)Fast ANN, no native compilation
qdrantANN (HNSW)Yes (binary)Full Qdrant features, built-in dashboard
typesenseANN (HNSW)Yes (auto-downloaded)Fast ANN, auto-downloaded binary

Configure via kirograph install (interactive menu) or set semanticEngine in .kirograph/config.json. Each engine owns its embedding store exclusively. Switch engines without data conflicts.

Languages & Frameworks

33+ languages, 36+ frameworks

All languages use WASM-compiled tree-sitter grammars. Frameworks are auto-detected and enrich the graph with routes, components, and lifecycle methods.

Languages

General-purpose

TypeScript / TSX JavaScript / JSX Python Go Rust Java C / C++ C# Ruby PHP Swift Kotlin Dart Scala Lua Zig Bash OCaml Elm Objective-C Julia R Perl PowerShell

Frontend & UI

React / React Native Next.js Angular Svelte Vue HTML CSS SCSS / Sass Astro ReScript

Domain-specific

Solidity Blockchain Elixir Distributed SQL GDScript Game Verilog/SV Hardware Nix

Configuration & Infrastructure

YAML HCL (Terraform)
Frameworks & Tools

Web Frameworks

React Next.js React Native Angular Svelte / SvelteKit Vue Nuxt Express Fastify Koa Django Flask FastAPI Rails Spring / Spring Boot Play (Scala) Akka HTTP ASP.NET Core Laravel Phoenix SwiftUI UIKit Vapor Flutter Hardhat / Foundry

Infrastructure as Code

AWS CDK SST Serverless Framework AWS SAM Terraform / OpenTofu Pulumi CloudFormation AWS Amplify

Containers & Orchestration

Kubernetes / Helm Docker Compose

Configuration Management

Ansible
Supported Tools

33 AI coding tools, one knowledge graph

Built for Kiro with full support (hooks, steering, CLI agent). Works with any MCP-capable tool via kirograph install --target <name>.

ToolTargetMCP ConfigInstructionsHooksPattern
🎯 Kiro (primary)kiro.kiro/settings/mcp.jsonSteering + CLI agent✅ sync + hint + memoryFull
Cursorcursor.cursor/mcp.json.cursor/rules/kirograph.mdc✅ sync on stopA
GitHub Copilotcopilot.github/copilot-mcp.json.github/copilot-instructions.md✅ sync on session-endA
Roo Coderoo.roo/mcp.json.roo/rules/kirograph.mdA
JetBrains Juniejunie.junie/mcp/mcp.json.junie/AGENTS.mdA
Continuecontinue.continue/mcpServers/kirograph.json.continue/rules/kirograph.mdA
Warpwarp.warp/.mcp.jsonAGENTS.mdA
Traetrae.trae/mcp.json.trae/rules/kirograph.mdA
Augment Codeaugment.augment/mcp.jsonaugment-guidelines.mdA
Sourcegraph Ampamp.amp/config.json.amp/instructions.mdA
Tabninetabnine.tabnine/mcp.json.tabnine/instructions.mdA
Claude Codeclaude.mcp.jsonCLAUDE.md✅ sync on StopB
Codex CLIcodex.codex/hooks.jsonAGENTS.md✅ sync on StopB
Gemini CLIgemini-cli.gemini/settings.jsonGEMINI.md✅ SessionEndC
OpenCodeopencode.opencode.json.opencode.json (instructions)✅ pluginC
Kilo Codekilokilo.json.kilo/rules/kirograph.mdC
Devindevin.devin/config.jsonAGENTS.md✅ .devin/hooks.v1.jsonC
OpenHandsopenhands.openhands/config.jsonAGENTS.mdC
WindsurfwindsurfPrint command.windsurf/rules/kirograph.md✅ sync on responseD
ClineclinePrint command.clinerules/kirograph.md✅ sync scriptD
AntigravityantigravityPrint commandGEMINI.md✅ .agents/hooks.jsonD
AideraiderPrint CLI flagCONVENTIONS.mdD
Replit AgentreplitPrint commandAGENTS.mdD
Block GoosegoosePrint commandAGENTS.mdD
Mistral Vibemistral-vibePrint command.kirograph/mistral-vibe.mdD
IBM Bobibm-bobPrint command.kirograph/ibm-bob.mdD
CrushcrushPrint command.kirograph/crush.mdD
Droid Factorydroid-factoryPrint command.kirograph/droid-factory.mdD
ForgeCodeforgecodePrint command.kirograph/forgecode.mdD
iFlow CLIiflowPrint command.kirograph/iflow.mdD
Qwen CodeqwenPrint command.kirograph/qwen.mdD
Atlassian Rovo DevrovoPrint command.kirograph/rovo.mdD
QoderqoderPrint command.kirograph/qoder.mdD
A = Project MCP + rules file B = MCP + project memory file C = Custom config format D = Print setup command

All experimental targets share the same .kirograph/ graph data. Install multiple targets simultaneously — they don't conflict. Community-contributed, vibecoded, unverified. PRs welcome.

Ready to supercharge Kiro?

Install in seconds. One command wires up everything: MCP server, hooks, steering file, and CLI agent.

npm install -g kirograph kirograph install
Read the docs →