KiroGraph

forks contributors

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

$ npm install -g kirograph
KiroGraph terminal output
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

Kiro hooks mark the index dirty on every save and flush changes when the agent stops. No background watcher process; changes batch efficiently with no overhead during editing.

Features

Everything you need to supercharge Kiro

A complete semantic index with 24 node kinds, 13 edge types, and three indexing layers.

18 MCP Tools

Context building, symbol search, call graphs, type hierarchies, impact analysis, dead code, circular deps, architecture, coupling metrics, snapshots, 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

Four IDE hooks keep the index fresh automatically: fileEdited, fileCreated, fileDeleted, and agentStop. Changes batch efficiently, no watcher process needed.

Architecture Analysis

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

Semantic Search

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

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.

Framework Detection

Auto-detects React, Next.js, Express, Django, Flask, FastAPI, Rails, Spring, ASP.NET, Phoenix, Laravel, 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.

Export dashboard demo

Caveman Mode

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.

Caveman mode screenshot

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.

How It Works

Three 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 path architecture
SQLite Graph DB (.kirograph/kirograph.db)

Three Indexing Layers

Structural tree-sitter AST → nodes + edges · always on
Semantic 768-dim embeddings · opt-in · 7 engine options
Architecture packages + layers + coupling metrics · opt-in

Kiro hooks mark the index dirty on every file save or create, then flush on agent idle, batching changes efficiently with no overhead during active editing.

fileEdited → mark-dirty fileCreated → mark-dirty fileDeleted → sync-if-dirty agentStop → sync-if-dirty
Semantic Search

Seven 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
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

31 languages, 35+ 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

Frontend & UI

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

Domain-specific

Solidity Blockchain Elixir Distributed

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 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

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 →