{"id":51112855,"url":"https://github.com/intuit/infigraph","last_synced_at":"2026-06-24T19:01:19.807Z","repository":{"id":363952017,"uuid":"1239151917","full_name":"intuit/infigraph","owner":"intuit","description":"AST-powered code intelligence engine. Graph database + hybrid semantic search for 62 languages. Zero LLM dependency. Runs locally.","archived":false,"fork":false,"pushed_at":"2026-06-19T12:09:51.000Z","size":35629,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-19T13:06:00.594Z","etag":null,"topics":["ai-tools","ast-parsing","code-analysis","code-intelligence","code-understanding","codebase-analysis","develo","graph-database","knowledge-graph","local-first","semantic-search"],"latest_commit_sha":null,"homepage":"https://intuit.github.io/infigraph/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intuit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-14T20:14:23.000Z","updated_at":"2026-06-19T12:09:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"3853d6ca-1970-48f5-b49b-2dc111e647cd","html_url":"https://github.com/intuit/infigraph","commit_stats":null,"previous_names":["intuit/infigraph"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/intuit/infigraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Finfigraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Finfigraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Finfigraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Finfigraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intuit","download_url":"https://codeload.github.com/intuit/infigraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Finfigraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34745456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","ast-parsing","code-analysis","code-intelligence","code-understanding","codebase-analysis","develo","graph-database","knowledge-graph","local-first","semantic-search"],"created_at":"2026-06-24T19:01:18.755Z","updated_at":"2026-06-24T19:01:19.787Z","avatar_url":"https://github.com/intuit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Infigraph\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"branding-system/logos/infigraph-light.png\" alt=\"Infigraph\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Rust](https://img.shields.io/badge/Rust-1.70%2B-orange)](https://www.rust-lang.org/)\n[![GitHub Release](https://img.shields.io/github/v/release/intuit/infigraph?sort=semver)](https://github.com/intuit/infigraph/releases)\n\n**AST-powered code intelligence engine.** Indexes codebases into a persistent knowledge graph with full Cypher queries, hybrid semantic search, cross-file call resolution, and **62 programming languages**.\n\nBuilt in Rust. Zero LLM dependency. Runs locally. No API keys. No network calls.\n\n---\n\n## Table of Contents\n\n- [The Problem](#the-problem) — What Infigraph solves\n- [Why Infigraph](#why-infigraph-what-makes-it-unique) — Unique market position\n- [The Solution](#the-solution) — How it works\n- [Key Highlights](#key-highlights) — Core capabilities at a glance\n- [Quick Start](#quick-start) — Install and run in 2 minutes\n- [How It Works](#how-it-works) — Integration with AI coding agents\n- [Offline-First Design](#offline-first-design) — No APIs, no network calls\n- [Installation](#installation) — Setup for all platforms\n- [Usage Examples](#usage-examples) — CLI commands, Web UI, tasks\n- [Features \u0026 Architecture](#features--architecture) — Full capabilities list\n- [Supported Languages (62)](#supported-languages-62) — All 62 languages\n- [Contributing](#contributing) — Build from source, add languages, contribute\n- [License](#license)\n\n---\n\n## The Problem\n\nAI agents are **structurally blind** to your codebase. When they need to answer \"who calls this function?\" or \"what breaks if I change this class?\", they have to re-read files, retrace imports, and re-infer relationships — wasting time and tokens.\n\n![The Hidden Cost of Code Blindness in the Age of AI](https://learnbyinsight.com/wp-content/uploads/2026/06/hidden-cost-ai-infigraph.png)\n\n**The cost:** 60–80% of AI agent tokens spent on code rediscovery instead of solving your problem.\n\n## Why Infigraph (What Makes It Unique)\n\nThe market has two categories of solutions — neither solves this:\n\n**Cloud-based tools** (GitHub Copilot, Sourcegraph, Codeium, Tabnine):\n- ❌ Require sending your code to external APIs\n- ❌ Expensive per-query (token costs compound)\n- ❌ Latency-bound by network round-trips\n- ❌ Privacy concerns for proprietary code\n- ✅ Good AI integration\n\n**Local analysis tools** (ctags, Language Servers, ripgrep, CodeQL):\n- ✅ Run locally, offline-capable\n- ✅ No privacy/security concerns\n- ❌ No persistent knowledge graph\n- ❌ Limited language support (1-3 languages)\n- ❌ Not designed for AI agents\n- ❌ Scattered results, high token overhead for agents\n\n**The gap Infigraph fills:**\n| Feature | Cloud Tools | Local Tools | Infigraph |\n|---------|-------------|------------|-----------|\n| **Local-first operation** | ❌ | ✅ | ✅ |\n| **Persistent knowledge graph** | ❌ | ❌ | ✅ |\n| **62 language support** | ❌ | ❌ | ✅ |\n| **AI agent integration** (MCP) | Limited | ❌ | ✅ |\n| **Offline operation** | ❌ | ✅ | ✅ |\n| **No external APIs** | ❌ | ✅ | ✅ |\n| **Cypher queries on code** | ❌ | ❌ | ✅ |\n| **Cross-file resolution** | ❌ | Limited | ✅ |\n\n**No other product or OSS combines all of these.** Infigraph is the first AI-native, local-first knowledge graph engine for code.\n\n---\n\n## The Solution\n\nInfigraph builds a **persistent knowledge graph** of your codebase before the agent runs. Structural questions that would cost hundreds of tokens to answer with raw file reads now resolve in milliseconds:\n\n```\nSource Code (62 languages)\n    ↓\nInfigraph Index (one-time, \u003c 1min for most projects)\n    ↓\nKnowledge Graph (symbols, calls, imports, routes, patterns)\n    ↓\nAI Agent Queries (instant, precise, token-efficient)\n\nExamples:\n  \"Search for auth logic\" → 10-100x fewer tokens\n  \"Who calls validate_user?\" → 1ms instead of 5s file reads\n  \"Blast radius of this change?\" → Complete call graph traversal\n```\n\n---\n\n## Key Highlights\n- **62 Languages:** Tree-sitter parsing for 62 languages + ANTLR grammar plugins for custom DSLs. Zero config.\n- **Graph Database:** Full Cypher queries on your codebase — WITH, OPTIONAL MATCH, variable-length paths.\n- **Semantic Search:** BM25 + Model2Vec hybrid search. Finds \"retry logic\" even if the function isn't named retry.\n- **SCIP Integration:** Auto-downloads compiler-grade indexers (TypeScript, Python, Java, Go, Rust, C#, Ruby, Scala). Falls back to lsp-to-scip bridge for 14+ more languages.\n- **Cross-File Resolution:** Import-aware call resolution links function calls to actual definitions across files.\n- **HTTP Route-Aware:** Maps your API surface across 22 frameworks (Flask, Express, Spring, Actix, Phoenix, Rails, etc.).\n- **Multi-Repo/Microservice:** Group repos, cross-repo Cypher queries, HTTP contract extraction, cross-service dependency detection.\n- **PR Review \u0026 CI:** Auto-detects PR type (bug fix, refactor, migration, feature) and scope. Runs semantic diff, blast radius, affected tests, security scan, complexity, dead code, clones — with optional LLM-enriched test plan and risk assessment. Cross-repo blast radius via groups. Configurable CI check gates.\n- **Test Context Generator:** `get_test_coverage` identifies untested symbols per file. `review` surfaces affected tests for changed code. Together they generate test context for AI agents writing tests.\n- **OSV Vulnerability Scanning:** Scans dependencies against the OSV database for known vulnerabilities.\n- **Design Pattern Detection:** Identifies Singleton, Factory, Observer, Strategy, Builder, and other patterns.\n- **Refactor Analysis:** Complexity hotspots, coupling, near-duplicate detection, dead code — ranked by impact/effort.\n- **Taint Analysis:** Intra + inter-procedural dataflow tracking from sources (HTTP params, user input) to sinks (SQL, exec, file I/O). Sanitizer-aware.\n- **Cross-Cutting Concerns:** Detects authorization, caching, transactions, rate limiting, audit logging, and more from annotations across 7 languages.\n- **Config Binding Resolution:** Parses Spring profiles, Django settings, .NET appsettings, Rails envs — links conditional annotations to config properties.\n- **Reflection Scanner:** Detects `Class.forName`, `importlib.import_module`, dynamic `require` — resolves targets via config files.\n- **Document Indexing:** Index PDF, DOCX, PPTX, HTML, Markdown with hybrid search.\n- **Confluence Wiki Crawler:** BFS wiki crawl with incremental sync — indexes pages into the same search pipeline as code.\n- **Auto-Watch:** File watcher auto-starts after indexing. Index stays fresh without manual intervention.\n- **HNSW Vector Index:** Approximate nearest neighbor search for fast similarity queries at scale (~2ms for 500K symbols).\n- **Session Continuity:** Persists context across AI agent sessions — summary, pending tasks, decisions, touched files.\n- **82 MCP Tools:** Full AI agent integration for 11 coding agents (Claude Code, Cursor, VS Code, Copilot, Windsurf, etc.).\n- **Sequence Diagrams:** Auto-generates Mermaid sequence diagrams from call graphs.\n- **Cross-Language Detection:** Delphi↔COM, VB6↔COM, C#↔JNI, FFI, gRPC, WASM bridges.\n- **Grammar Plugins:** Drop `.g4` + `plugin.toml` — parse any custom/internal DSL without Rust compilation.\n- **[Pipeline Plugins](docs/PIPELINE_PLUGINS.md):** Runtime-extensible pipeline metadata extraction — add new data pipeline formats (dbt, Airflow, custom) without recompiling. Dependency graphs, impact analysis, compliance queries.\n- **Structured Ingestion:** TOML schema-driven plug-n-play data ingestion — define schemas in `.infigraph/structured-schemas/`, drop JSON/YAML data files. Symbol resolution, directory mode, dual backend.\n- **Named Sessions:** Save and recall named AI agent sessions by identity — persist context across long-running projects.\n- **Write-Lock Safety:** Advisory file locking for Kuzu single-writer constraint. All write paths protected. RAII guard auto-releases on drop or crash.\n- **Web UI:** Built-in graph explorer, search, route map at localhost:9749.\n- **Export:** Neo4j Cypher, GraphML, JSON — take your graph anywhere.\n\n---\n\n## Quick Start\n\n### Install (one-liner)\n\n**macOS / Linux:**\n```bash\ncurl -fsSL https://raw.githubusercontent.com/intuit/infigraph/main/install.sh | bash\n```\n\n**Windows (PowerShell):**\n```powershell\niwr https://raw.githubusercontent.com/intuit/infigraph/main/install.ps1 -UseBasicParsing | iex\n```\n\n### Index your project\n```bash\ncd /path/to/project\ninfigraph index\n```\n\n### Ask your AI agent\n```\n\"Who calls the validate_user function?\"\n\"Show me the blast radius of this change\"\n\"Find authentication logic in this codebase\"\n\"What's the architecture of this project?\"\n```\n\nInfigraph auto-indexes on first query. No manual setup needed for Claude Code, Cursor, or other AI agents with MCP support.\n\n---\n\n## How It Works\n\n### With Claude Code (Recommended)\nAfter install, start using Claude Code normally. Infigraph indexes your project automatically and transparently:\n\n```\n\u003e You: \"Search for authentication logic\"\n\u003e Claude: [Scans via Infigraph, returns precise results with 60-80% fewer tokens]\n```\n\nNo CLI commands. No separate indexing step. Just ask.\n\n### With Other AI Agents\nAny agent with MCP support (Cursor, VS Code + Copilot, Windsurf, etc.) gets 69 Infigraph tools automatically after `infigraph install`.\n\n### Manual CLI (Optional)\n```bash\ninfigraph search \"auth\"                    # Hybrid search\ninfigraph query \"MATCH (...)\"              # Cypher queries\ninfigraph trace-callers \"function_name\"   # Who calls this?\ninfigraph dead-code                        # Find unused functions\ninfigraph impact \"auth.py::authenticate\"   # Blast radius\n```\n\n---\n\n## Offline-First Design\n\nInfigraph is **built for offline operation** — everything runs locally, no cloud APIs or network access needed. The ML embedding model (`potion-base-8M`, 29MB) is bundled in this repository for immediate use without additional downloads.\n\nThis means:\n- Semantic search works out of the box after cloning\n- No external dependencies or API keys required\n- Your codebase never leaves your machine\n- Works on air-gapped systems\n\n## Installation\n\n### System Requirements\n\n| Platform | Required |\n|----------|----------|\n| macOS | Rust (rustup), `brew install cmake` |\n| Linux | Rust (rustup), `sudo apt install cmake` |\n| Windows | Rust (rustup), Visual Studio Build Tools (C++20) |\n\n**No Docker, no Python, no Node.js required** — everything is self-contained.\n\n### From crates.io (recommended)\n\n```bash\ncargo install infigraph-cli infigraph-mcp\ninfigraph install\n```\n\nWorks on macOS, Windows, and Linux. Requires [Rust](https://rustup.rs/) and `cmake`.\n\n### macOS / Linux (one-liner)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/intuit/infigraph/main/install.sh | bash\n```\n\nThis:\n- Downloads pre-built binaries from GitHub releases (if available)\n- Falls back to cloning + `cargo build --release` (installs Rust if needed)\n- Adds `infigraph`, `infigraph-mcp`, and `lsp-to-scip` to `~/.local/bin`\n- Registers MCP server for all 11 AI coding agents\n- Writes primary search instructions to `~/.claude/CLAUDE.md`\n\n\u003e **System dependency:** `cmake` is required to build the graph database.\n\u003e Install before building: `brew install cmake` (macOS) or `sudo apt install cmake` (Linux).\n\n### Windows\n\nRun this single command from **PowerShell**:\n\n```powershell\niwr https://raw.githubusercontent.com/intuit/infigraph/main/install.ps1 -UseBasicParsing | iex\n```\n\nThis downloads and runs the full installer — which fetches the pre-built binary and registers the MCP server.\n\n## Update\n\nRe-run the installer to pull latest and rebuild:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/intuit/infigraph/main/install.sh | bash\n```\n\nOr if building manually:\n\n```bash\ncd /path/to/infigraph \u0026\u0026 git pull \u0026\u0026 cargo build --release\ninfigraph update\n```\n\n`infigraph update` re-registers MCP server paths and refreshes CLAUDE.md instructions.\n\nInfigraph also checks for updates in the background (once per 24h) and prints a hint when a newer version is available.\n\n## Uninstall\n\n```bash\ninfigraph uninstall\n```\n\nRemoves:\n- MCP server config from all 11 AI agents\n- Primary search instructions from `~/.claude/CLAUDE.md`\n\nDoes NOT delete the binary — remove `~/.local/bin/infigraph` and `~/.local/bin/infigraph-mcp` manually if desired.\n\n---\n\n## Usage Examples\n\n### Indexing\n\nThe first time you run Infigraph on a project, it indexes all source files and builds the knowledge graph:\n\n```bash\ncd /path/to/project\ninfigraph index              # Builds graph (~30s–2min depending on size)\ninfigraph index --full       # Clean rebuild from scratch\n```\n\n### Common Tasks\n\n| Task | Command |\n|------|---------|\n| **Search** | `infigraph search \"auth logic\"` |\n| **Who calls this?** | `infigraph trace-callers \"function_name\"` |\n| **What does this call?** | `infigraph trace-callees \"function_name\"` |\n| **Blast radius** | `infigraph impact \"file.py::function\"` |\n| **Dead code** | `infigraph dead-code` |\n| **Routes/endpoints** | `infigraph routes` |\n| **Cypher query** | `infigraph query \"MATCH (s:Symbol) RETURN s.name\"` |\n| **Architecture** | `infigraph architecture` |\n| **Design patterns** | `infigraph detect-patterns` |\n| **Export** | `infigraph export json --output graph.json` |\n\n### Web UI\n\nInfigraph includes a built-in graph explorer at `http://localhost:9749/?path=/your/project`:\n\n```bash\ninfigraph-mcp --ui --port=9749\n# Opens interactive graph explorer, search, route map\n```\n\n---\n\n## Features \u0026 Architecture\n\n### Grammar Plugins (ANTLR)\n\nInfigraph supports runtime-loaded ANTLR grammar plugins. Drop `.g4` grammar files + a `plugin.toml` config into a directory — infigraph parses the language automatically via a JVM subprocess. **No Rust compilation needed.**\n\n### Quick start: adding a new language\n\n1. Create a grammar plugin directory:\n   ```\n   ~/.infigraph/grammars/my-lang/\n   ├── MyLang_Lexer.g4      # ANTLR lexer grammar\n   ├── MyLang_Parser.g4     # ANTLR parser grammar\n   └── plugin.toml          # Extension mapping + extraction rules\n   ```\n\n2. Write `plugin.toml`:\n   ```toml\n   [language]\n   name = \"my-lang\"\n   extensions = [\".ml\", \".myl\"]\n   entry_rule = \"program\"\n   lexer = \"MyLang_Lexer.g4\"\n   parser = \"MyLang_Parser.g4\"\n   strip_preprocessor = false   # true if files have #include/#ifdef lines\n\n   [[entities]]\n   rule = \"functionDecl\"        # ANTLR parser rule name\n   kind = \"Function\"            # Symbol kind (Function, Method, Class, Variable, etc.)\n   name_child = \"identifier\"    # Child rule that holds the name\n   scope = true                 # Creates a scope (section/function boundary)\n\n   [[entities]]\n   rule = \"classDecl\"\n   kind = \"Class\"\n   name_child = \"identifier\"\n   scope = true\n\n   [[relations]]\n   rule = \"functionCall\"\n   kind = \"Calls\"\n   target_child = \"identifier\"\n\n   [[relations]]\n   rule = \"fieldAccess\"\n   kind = \"Reads\"\n   target_child = \"fieldName\"\n   condition = \"has_token:.\"    # Only match when DOT token is present\n   ```\n\n3. Index your project — infigraph discovers the plugin automatically:\n   ```bash\n   infigraph -r /path/to/project index\n   ```\n\n### Plugin discovery\n\nPlugins are loaded from two locations:\n- `~/.infigraph/grammars/*/plugin.toml` — user-level (all projects)\n- `\u003cproject\u003e/grammars/*/plugin.toml` — project-level (per repo)\n\nProject-level plugins take precedence.\n\n### Requirements\n\n- **Java 11+** — the ANTLR interpreter runs in a JVM subprocess\n- **No Rust toolchain needed** — grammar plugins are pure config + `.g4` files\n\n### How it works\n\n```\nplugin.toml + .g4 files\n        │\n        ▼\n┌─────────────────┐     stdin/stdout JSON     ┌──────────────────┐\n│  Rust host       │ ◄──────────────────────► │  JVM subprocess   │\n│  (infigraph)     │                          │  (ANTLR interp.)  │\n│                  │  1. Load grammar          │                   │\n│  Discovers       │  2. Parse file            │  Grammar.load()   │\n│  plugin.toml     │  3. Get parse tree JSON   │  ParserInterpreter│\n│  Walks tree      │                          │                   │\n│  → Symbol/Rel    │                          │                   │\n└─────────────────┘                          └──────────────────┘\n```\n\n1. **Startup**: infigraph scans plugin directories, spawns a single persistent JVM process\n2. **Load**: sends `.g4` grammar paths to the JVM driver, which loads them in ANTLR interpreter mode\n3. **Parse**: for each source file, sends content to JVM, receives JSON parse tree\n4. **Extract**: Rust walks the JSON parse tree using `plugin.toml` entity/relation rules, produces `Symbol` + `Relation` objects\n5. **Graph**: extracted data flows into the same graph/search/analysis pipeline as all other languages\n\n### Grammar imports\n\nIf your grammar uses `import` (e.g., `import Base_Lexer;`), place the imported `.g4` file in the same plugin directory. ANTLR resolves imports from the grammar file's directory.\n\n### Extraction rule reference\n\n#### Entity mappings (`[[entities]]`)\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `rule` | yes | ANTLR parser rule name to match |\n| `kind` | yes | `Function`, `Method`, `Class`, `Struct`, `Variable`, `Constant`, `Section`, `Module`, `Field`, `Test`, `Route` |\n| `name_child` | yes | Child rule that holds the entity name |\n| `scope` | no | If `true`, pushes a scope (nested symbols get `parent::name` IDs) |\n\n#### Relation mappings (`[[relations]]`)\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `rule` | yes | ANTLR parser rule name to match |\n| `kind` | yes | `Calls`, `Imports`, `Reads`, `Writes`, `Inherits`, `Implements`, `Contains` |\n| `target_child` | yes | Child rule that holds the target name |\n| `condition` | no | `has_child:RULE`, `has_token:TEXT` — only match when condition is true |\n\n### Performance\n\nGrammar plugins use the ANTLR interpreter (no code generation). Slower than native tree-sitter but requires zero compilation:\n\n| Metric | Value |\n|--------|-------|\n| JVM cold start + grammar load | ~450ms (once) |\n| Per-file parse (100 lines) | ~90ms |\n| Per-file parse (500 lines) | ~770ms |\n| 55-file batch | ~18s (324ms/file avg) |\n\nThe JVM stays alive for the duration of the infigraph session — subsequent parses only pay the per-file cost.\n\n### Architecture: tree-sitter vs grammar plugins\n\n| | Tree-sitter | Grammar Plugin |\n|---|---|---|\n| Grammar format | `.scm` queries | `.g4` grammars |\n| Runtime | Native (compiled C) | JVM subprocess (ANTLR interpreter) |\n| Adding a language | Write `.scm` query files | Drop `.g4` + `plugin.toml` |\n| Compilation needed | No (queries are text) | No (interpreter mode) |\n| Performance | ~1ms/file | ~100-800ms/file |\n| Best for | Mainstream languages | Custom/internal DSLs |\n\nBoth backends produce the same `Symbol` + `Relation` output. Everything downstream (graph, search, analysis, MCP tools) is backend-agnostic.\n\n## Pipeline Plugins\n\nRuntime-extensible pipeline metadata extraction — add new data pipeline formats (dbt, Airflow, custom) without recompiling. Each plugin is a subprocess with JSON IPC.\n\n**[Full Pipeline Plugins Guide →](docs/PIPELINE_PLUGINS.md)**\n\nQuick overview:\n- Drop a `plugin.toml` + extractor binary in `~/.infigraph/pipelines/\u003cname\u003e/` or `\u003cproject\u003e/pipelines/\u003cname\u003e/`\n- Infigraph auto-discovers plugins, detects matching documents, extracts metadata via subprocess\n- Shared `PipelineCore` table enables cross-plugin dependency graphs and impact analysis\n- 5 MCP tools: `pipeline_plugins`, `pipeline_deps`, `pipeline_impact`, `pipeline_compliance`, `pipeline_query`\n\n## Building from Source\n\n### Prerequisites\n\n| Platform | Required |\n|----------|---------|\n| macOS | `brew install cmake`, Rust (`rustup`) |\n| Linux | `sudo apt install cmake`, Rust (`rustup`) |\n| Windows | Rust (`rustup`), Docker (for cross-compilation) |\n\n### macOS (native — ARM64 or x86_64)\n\n```bash\nbrew install cmake\ngit clone https://github.com/intuit/infigraph.git\ncd infigraph\ncargo build --release -p infigraph-cli -p infigraph-mcp\ncp target/release/infigraph target/release/infigraph-mcp ~/.local/bin/\ninfigraph install\n```\n\n### Linux (x86_64 or ARM64)\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y cmake\ngit clone https://github.com/intuit/infigraph.git\ncd infigraph\ncargo build --release -p infigraph-cli -p infigraph-mcp\ncp target/release/infigraph target/release/infigraph-mcp ~/.local/bin/\ninfigraph install\n```\n\n### Windows (native build)\n\nBuild natively on a Windows machine. **Cross-compiling from macOS is not currently supported** — LadybugDB (lbug) requires C++20 `\u003cformat\u003e` (GCC 13+), but available cross-compilation Docker images ship GCC 9.\n\n```powershell\n# Install Rust\nwinget install Rustlang.Rustup\n\n# Install CMake (required by lbug graph DB)\nwinget install Kitware.CMake\n\n# Install Visual Studio Build Tools with C++ workload\nwinget install Microsoft.VisualStudio.2022.BuildTools\n\n# Clone and build\ngit clone https://github.com/intuit/infigraph.git\ncd infigraph\ncargo build --release -p infigraph-cli -p infigraph-mcp\n\n# Binaries at:\n#   target\\release\\infigraph.exe\n#   target\\release\\infigraph-mcp.exe\n```\n\n### Cross-compiling macOS targets on ARM64 machine\n\n```bash\n# Add Intel target\nrustup target add x86_64-apple-darwin\n\n# Build for Intel Mac (from ARM64 machine)\ncargo build --release --target x86_64-apple-darwin -p infigraph-cli -p infigraph-mcp\n```\n\n### Releasing a new version (maintainers)\n\nThe `release.sh` script builds, signs, packages with the bundled model, and uploads to GHE releases:\n\n```bash\n./release.sh v1.0.0\n```\n\nWhat it does:\n1. Builds `aarch64-apple-darwin` targets (Intel commented out — add when needed)\n2. Ad-hoc signs both binaries with `codesign --sign -` (no Apple Developer cert required)\n3. Packages `infigraph`, `infigraph-mcp`, and `models/` into `infigraph-\u003ctarget\u003e.tar.gz`\n4. Creates a GitHub release at `github.com/intuit/infigraph` and uploads the archive\n\n**Requirements:** `gh` CLI authenticated with `github.com`, `cmake`, Rust toolchain\n\n## Setup as Primary Search\n\nAfter install, register Infigraph as the primary search engine for all AI coding agents:\n\n```bash\ninfigraph install\n```\n\nThis does four things:\n1. **Registers `infigraph-mcp`** as an MCP server for 11 agents: Claude Code, Cursor, VS Code, Codex, Gemini CLI, Zed, OpenCode, Aider, Windsurf, Kiro, GitHub Copilot\n2. **Writes primary search instructions** to `~/.claude/CLAUDE.md` so AI agents prefer Infigraph over raw grep/glob\n3. **Installs Claude Code hooks** — enforcement hook (warns on raw search) + session save hooks (auto-save context on compaction)\n4. **Configures Claude Code allowlist** — adds all Infigraph MCP tools to `~/.claude/settings.local.json` permissions\n\nThen index your projects:\n```bash\ncd /path/to/project\ninfigraph index\n# Full reindex (clean rebuild from scratch):\ninfigraph index --full\n```\n\nEvery search, symbol lookup, and code navigation now goes through Infigraph's graph — saving 60-80% of tokens versus raw file reads.\n\n## Web UI\n\nInfigraph includes a built-in web UI for visual code exploration.\n\n**It starts automatically** when the MCP server launches — open it at:\n\n```\nhttp://localhost:9749/?path=/your/project\n```\n\nThe UI is served by the same `infigraph-mcp` process Claude Code spawns. No separate process needed.\n\n**Multiple Claude sessions:** the first session to start binds port 9749 and serves the UI. All subsequent sessions skip the port bind silently and still get full MCP tool access. The UI stays up as long as at least one session is open.\n\n**From Claude:** ask Claude to open the UI — it can launch a browser or give you the URL for your indexed project.\n\n## Troubleshooting\n\n### MCP tools not available in Claude Code\n\n**Symptom:** `mcp__infigraph__*` tools appear as \"deferred\" in ToolSearch but aren't active, or Claude says Infigraph isn't loaded.\n\n**Most common cause:** A project-level `.claude/settings.json` with an `mcpServers` block overrides the global `~/.claude/settings.json` where `infigraph install` wrote its config. Claude Code merges settings but project-level `mcpServers` takes precedence.\n\n**Fix:** Run `infigraph install` from inside the project directory — or manually add the infigraph entry to the project's `.claude/settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"infigraph\": {\n      \"command\": \"/path/to/infigraph-mcp\",\n      \"args\": [\"--ui\", \"--mcp\", \"--port=9749\"]\n    }\n  }\n}\n```\n\nReplace `/path/to/infigraph-mcp` with the output of `which infigraph-mcp`.\n\n**Other causes:**\n- Binary not found: verify `which infigraph-mcp` returns a path\n- `infigraph install` failed silently during setup: re-run it manually and check for errors\n- Invalid JSON in existing `settings.json`: fix the JSON, then re-run `infigraph install`\n\n## Features\n\n### Core\n- **62 languages** — see full list below\n- **LadybugDB graph database** — columnar embedded graph DB (Kuzu successor), full Cypher including WITH, OPTIONAL MATCH, variable-length paths, mutations\n- **Hybrid search** — BM25 text ranking + Model2Vec neural embeddings (bundled, no network) with tunable alpha\n- **HNSW vector index** — approximate nearest neighbor search for fast similarity queries at scale (~2ms for 500K symbols)\n- **Embedding cache** — vectors saved to `.infigraph/embeddings.bin`, loaded on next search (first index = cache, subsequent = instant)\n- **Cross-file call resolution** — import-aware resolution links function calls to actual definitions across files\n- **Auto-watch** — file watcher auto-starts after indexing, keeps graph in sync via OS filesystem events with 500ms debounce\n- **Session continuity** — persists session context (summary, pending tasks, decisions, touched files) across AI agent sessions\n- **Docstring extraction** — captures docstrings/comments from AST, indexed for richer search\n- **Function signatures** — extracts parameter lists and return types from AST for richer embeddings and search\n- **Louvain community detection** — discovers functional modules/clusters in the call graph\n- **Multi-repo groups** — group microservice repos, cross-repo Cypher queries, HTTP contracts, cross-service dependency detection\n- **Custom edge types** — extensible relation system: language plugins can define custom edges (DECORATED_BY, SPAWNS, etc.) that persist in the graph\n- **Gitignore-aware** — respects `.gitignore` and `.infigraphignore` patterns during indexing via the `ignore` crate\n- **Learned resolution** — records successful cross-file call resolutions to improve accuracy on subsequent indexes\n- **Structured ingestion** — TOML schema-driven data ingestion: define node tables, columns, edges in `.infigraph/structured-schemas/*.toml`. Ingest JSON/YAML files or entire directories. Edges can target the Symbol table with auto-resolution by name or ID. Both Kuzu and CozoDB backends\n- **Named identity sessions** — `save_session` accepts `name` parameter to create named sessions (`named_{name}` IDs). `get_latest_session` accepts `name` to recall by identity. Named sessions stored separately from daily auto-saves\n- **Skeleton annotations** — code skeleton includes quality metrics: `# complexity: N | nesting: N | stmts: N | fan-in: N` on functions/methods. Shared formatting between Kuzu and CozoDB\n- **Write-lock concurrency safety** — advisory file locking (`flock`) for Kuzu single-writer constraint. All write paths protected — indexing, SCIP import, structured ingestion, cross-service linking, resolve. RAII guard auto-releases on drop or crash\n\n### Analysis\n- **Refactor analysis** — complexity hotspots, coupling (fan-in/fan-out), near-duplicate detection, dead code, file size — ranked by impact/effort\n- **PR review** — auto-detects PR type (bug fix, refactor, migration, feature) and scope (standalone, cross-module, cross-repo). Runs: semantic diff, blast radius, affected tests, API surface changes, security scan, complexity delta, dead code, code clones, consistency checks. Set `group=` for cross-repo blast radius. Set `llm=true` for LLM-augmented review with test plan, risk assessment, and deployment notes\n- **Test context generation** — `get_test_coverage` per file: covered %, list of uncovered symbols. `review` includes affected tests for changed symbols. Together they provide test context for AI agents to write targeted tests\n- **CI check runner** — configurable checks (security, complexity, dead code, vuln scan) with pass/fail gates\n- **OSV vulnerability scanning** — scans dependencies against the OSV database for known vulnerabilities\n- **Design pattern detection** — identifies Singleton, Factory, Observer, Strategy, Builder, and other patterns\n- **Taint analysis** — intra-procedural source→sink tracking + inter-procedural BFS through call graph (depth-limited). Sanitizer-aware false-positive reduction\n- **Cross-cutting concern detection** — authorization, validation, caching, transactions, rate limiting, audit logging, feature flags, CORS, async, retry across Java/Python/TS/C#/Ruby/Go/Rust\n- **Config binding resolution** — Spring profiles/qualifiers, Django settings, .NET appsettings, Rails envs, Go build tags, NestJS config\n- **Reflection/dynamic invocation scanner** — Class.forName, ServiceLoader, getattr, importlib, dynamic require/import with config-file-based target resolution\n- **Dynamic URL detection** — extracts URL templates from HTTP client calls (fetch, axios, requests, etc.), matches against known Route nodes\n- **Path traversal detection** — multi-layer analysis combining intra+inter procedural taint with path-specific sanitizer awareness\n- Dead code detection (uncalled functions/methods)\n- Transitive impact / blast radius analysis\n- Git diff → affected symbols mapping\n- Architecture overview (language breakdown, hotspots, hub functions, entry points)\n- HTTP route/endpoint detection across 22 languages (Flask, Express, Spring, Django, Gin, Actix, Phoenix, Rails, NestJS, and more)\n- Cross-service HTTP dependency detection (`group deps`) — scans URL strings, matches to contracts across repos\n- Bridge-to-call promotion — promotes detected cross-language bridges to CALLS edges for unified call graph analysis\n\n### PR Review\n\nAuto-detects PR type and scope, then runs a full analysis suite:\n\n```\n$ infigraph review                    # review last commit\n$ infigraph review --base main        # review branch vs main\n```\n\n**What it runs automatically:**\n- Semantic diff (added/removed/renamed/moved/changed symbols)\n- Blast radius — all symbols transitively affected\n- Affected tests — which test files cover changed symbols\n- API surface changes — public symbol additions/removals\n- Security scan — injection, secrets, eval, path traversal\n- Complexity delta — did complexity increase?\n- Dead code — did the change introduce unreachable code?\n- Code clones — near-duplicate detection against changed symbols\n- Consistency checks — naming, patterns\n\n**MCP usage:**\n```\nreview(path=\"/my/repo\", base_ref=\"main\")           # basic review\nreview(path=\"/my/repo\", llm=true)                   # + LLM test plan \u0026 risk assessment\nreview(path=\"/my/repo\", group=\"my-services\")        # cross-repo blast radius\nreview(path=\"/my/repo\", llm=true, dry_run=true)     # preview LLM prompt without calling API\n```\n\n### Test Context Generator\n\nTwo tools work together to generate test context for AI agents:\n\n**`get_test_coverage`** — per-file analysis:\n- Covered % (how many symbols have TESTED_BY edges)\n- List of uncovered symbols with kind, line number, complexity\n- Use before writing tests to find what needs coverage\n\n**`review`** — affected tests for changed code:\n- Maps changed symbols → test files that cover them\n- Shows which tests need updating after a refactor\n- Identifies new symbols that have zero test coverage\n\n**Workflow — AI agent writing tests:**\n1. `get_test_coverage(file=\"src/auth.py\")` → see 3 of 8 functions untested\n2. `symbol_context` on uncovered symbols → get signatures, callers, callees\n3. Agent writes targeted tests for the 5 uncovered functions\n\n**Workflow — PR review test plan:**\n1. `review(llm=true)` → LLM generates test plan based on affected tests + uncovered symbols\n2. Agent uses test plan to write tests for new/changed code\n\n### Structured Ingestion\n\nDefine TOML schemas to ingest arbitrary JSON/YAML data into the graph:\n\n```toml\n# .infigraph/structured-schemas/api_endpoints.toml\nschema_id = \"api_endpoints\"\nname = \"API Endpoints\"\nnode_table = \"Endpoint\"\n\n[[columns]]\nname = \"id\"\ncol_type = \"STRING\"\nprimary = true\n\n[[columns]]\nname = \"url\"\ncol_type = \"STRING\"\n\n[[columns]]\nname = \"method\"\ncol_type = \"STRING\"\n\n[[edges]]\nname = \"HANDLED_BY\"\nfrom_table = \"Endpoint\"\nto_table = \"Symbol\"\nfrom_column = \"id\"\nto_column = \"handler\"\nresolve_symbol = true  # auto-resolves handler names to Symbol nodes\n```\n\nDiscovery paths: `.infigraph/structured-schemas/`, `.terragraph/schemas/`, `~/.infigraph/structured-schemas/`\n\n```bash\n# CLI usage\ninfigraph ingest --schema api_endpoints --data-file endpoints.json\ninfigraph ingest --schema api_endpoints --source ./data/endpoints/\n\n# MCP tool\n# tool: ingest_structured { schema_id: \"api_endpoints\", data_file: \"endpoints.json\" }\n```\n\n### CI Check Configuration\n\nConfigure quality gates via `check.toml`:\n\n```toml\n[security]\nenabled = true\nmax_critical = 0\nmax_high = 5\n\n[complexity]\nenabled = true\nthreshold = 15\nmax_violations = 10\n\n[dead_code]\nenabled = true\nmax_dead = 20\n```\n\n### SCIP Integration (Compiler-grade Enrichment)\nInfigraph natively imports [SCIP](https://sourcegraph.com/blog/announcing-scip) indexes to enrich the graph with precise compiler-grade symbols, types, and cross-file relationships. SCIP indexers are **auto-downloaded** — `infigraph index` detects project languages and fetches the right indexer binaries (with portable runtimes for Node.js, JRE, .NET, Dart, PHP) on first use:\n\n```bash\n# Generate SCIP index with an existing indexer\nscip-typescript index --cwd .          # TypeScript/JavaScript\nscip-python index --cwd .              # Python\nscip-java index                        # Java/Kotlin\nscip-go --cwd .                        # Go\n# Then import into Infigraph\ninfigraph scip-import --index index.scip\n```\n\n**Languages with dedicated SCIP indexers:** TypeScript, JavaScript, Python, Java, Kotlin, Go, Rust (rust-analyzer), C# (scip-dotnet), Ruby (scip-ruby), Scala\n\n**Languages via lsp-to-scip bridge:** C/C++, Zig, Swift, Dart, Elixir, PHP, Lua, Haskell, F#, Clojure, Erlang, Perl, OCaml, and any language with an LSP server\n\n#### lsp-to-scip Bridge\n\nGeneric tool that spawns any LSP server and generates `index.scip`:\n\n```bash\n# C/C++ via clangd\nlsp-to-scip --server clangd --root /path/to/project --lang cpp\n\n# Zig via zls\nlsp-to-scip --server zls --root . --lang zig\n\n# Swift via sourcekit-lsp\nlsp-to-scip --server sourcekit-lsp --root . --lang swift\n\n# Elixir via elixir-ls\nlsp-to-scip --server \"elixir-ls\" --root . --lang elixir\n\n# Dart\nlsp-to-scip --server \"dart language-server\" --root . --lang dart\n\n# Haskell\nlsp-to-scip --server haskell-language-server-wrapper --root . --lang haskell\n\n# F#\nlsp-to-scip --server fsautocomplete --root . --lang fsharp\n\n# Clojure\nlsp-to-scip --server clojure-lsp --root . --lang clojure\n\n# Erlang\nlsp-to-scip --server erlang-ls --root . --lang erlang\n\n# Then import\ninfigraph scip-import --index index.scip\n```\n\n### Integration\n- **82 MCP tools** for AI coding agents\n- **11 agent auto-configs** — Claude Code, Cursor, VS Code, Codex, Gemini CLI, Zed, OpenCode, Aider, Windsurf, Kiro, GitHub Copilot\n- **Web UI** at localhost:9749 with graph explorer, search, route map, multi-repo groups, contracts\n- **Export** — Neo4j Cypher, GraphML, JSON\n\n## Supported Languages (62)\n\n| Category | Languages |\n|----------|-----------|\n| **Systems** | Rust, C, C++, Zig, CUDA, Verilog, Assembly |\n| **JVM** | Java, Kotlin, Scala, Groovy, Clojure |\n| **Web** | JavaScript, TypeScript, TSX, PHP, HTML, CSS, GraphQL |\n| **Python** | Python (+ Django, Flask, FastAPI route detection) |\n| **Mobile** | Swift, Kotlin, Dart, Objective-C |\n| **Functional** | Haskell, OCaml, F#, Elm, Elixir, Erlang, Common Lisp, Emacs Lisp, Clojure |\n| **Scripting** | Ruby, Perl, Lua, Bash, PowerShell, R, Julia, MATLAB |\n| **Go ecosystem** | Go |\n| **Config/Data** | TOML, YAML, JSON, XML, HCL, Makefile, CMake, Dockerfile, Starlark, INI, SQL, Protobuf |\n| **Other** | Fortran, GLSL, Nix, Svelte, Markdown |\n| **NEW** | **Pascal/Delphi** (.pas, .pp, .dpr, .dpk, .lpr) |\n| **Grammar Plugins** | Any ANTLR4-compatible language via [grammar plugins](GRAMMAR_PLUGINS.md) |\n\nEvery language includes:\n- `entities.scm` — symbols (functions, classes, methods, types, variables, constants, routes)\n- `relations.scm` — call edges, imports, inheritance\n\n## MCP Server\n\n```bash\n# Start MCP server (stdio)\ninfigraph-mcp\n\n# Start with web UI\ninfigraph-mcp --ui --port=9749\n# Open http://localhost:9749/?path=/your/project\n```\n\n### 82 MCP Tools\n\n| Tool | Description |\n|------|-------------|\n| **Search \u0026 Navigation** | |\n| `index_project` | Parse all source files and build code knowledge graph (60+ languages) |\n| `search` | Unified code search — keyword-hybrid + semantic-hybrid + regex grep in one call, auto-escalates |\n| `search_symbols` | Find symbols by name (keyword-weighted hybrid, alpha=0.3) |\n| `semantic_search` | Find code by meaning (semantic-weighted hybrid, alpha=0.85) |\n| `search_code` | Regex text search across all project files |\n| `get_symbols_in_file` | List all symbols in a file with line numbers |\n| `get_code_snippet` | Source code for a symbol by ID |\n| `get_doc_context` | Full context: signature + docstring + source + callers + callees in one call |\n| `symbol_context` | 360° view: callers, callees, parent scope, file, kind, docstring |\n| `list_files` | List source files with optional glob pattern filter |\n| **Analysis** | |\n| `trace_callers` | Direct callers of a symbol |\n| `trace_callees` | What a symbol calls |\n| `transitive_impact` | Blast radius — all symbols transitively affected by changes |\n| `find_all_references` | Every location where a symbol is referenced |\n| `detect_dead_code` | Unreachable functions/methods with zero callers |\n| `detect_changes` | Git diff → affected symbols and blast radius |\n| `semantic_diff` | Symbol-level diff between git refs (added/removed/renamed/moved/changed) |\n| `git_summary` | Symbol-level commit history (which functions changed per commit) |\n| `get_complexity` | Cyclomatic complexity metrics per symbol |\n| `detect_clones` | Near-duplicate functions via vector similarity |\n| `detect_clusters` | Louvain community detection on call graph |\n| `detect_security_issues` | Security scan: SQL injection, secrets, eval, path traversal, XSS, etc. (sanitizer-aware) |\n| `detect_taint_flows` | Intra-procedural taint analysis — source→sink tracking with sanitizer awareness |\n| `detect_interprocedural_taint` | Cross-function taint tracing via BFS through call graph (depth-limited) |\n| `detect_dynamic_urls` | Dynamic URL construction detection — matches against known Route nodes |\n| `detect_path_traversal` | Multi-layer path traversal detection (intra + inter procedural) |\n| `detect_cross_cutting` | Cross-cutting concern detection (auth, caching, transactions, etc.) across 7 languages |\n| `detect_config_bindings` | Config-driven conditional resolution (Spring profiles, Django settings, .NET, Rails) |\n| `detect_reflection` | Reflection/dynamic invocation scanner with config-file-based target resolution |\n| `detect_bridges` | Cross-language boundaries: FFI, JNI, cgo, gRPC, WASM, COM |\n| `detect_routes` | HTTP route/endpoint detection (22 frameworks) |\n| `refactor` | Refactoring analysis — complexity, coupling, duplication, size, dead code. Ranked recommendations with impact/effort scores |\n| **Architecture** | |\n| `get_architecture` | Codebase overview: language breakdown, hotspots, hub functions, entry points |\n| `get_api_surface` | Public API surface — all public symbols and HTTP routes |\n| `get_file_deps` | File-level import graph (what imports what) |\n| `get_type_hierarchy` | Full inheritance tree (ancestors + descendants) |\n| `get_graph_schema` | Node/edge types, counts, property names |\n| `get_stats` | Graph statistics |\n| `generate_sequence_diagram` | Mermaid sequence diagram from call graph |\n| **Dependencies** | |\n| `index_manifests` | Parse package manifests (package.json, Cargo.toml, go.mod, etc.) |\n| `get_dependencies` | List external dependencies by ecosystem |\n| `scip_import` | Import SCIP index for compiler-grade enrichment |\n| **Review \u0026 CI** | |\n| `review` | PR review — auto-detects PR type/scope, runs semantic diff + blast radius + affected tests + security + complexity + dead code + clones. `llm=true` for LLM test plan \u0026 risk assessment. `group=` for cross-repo |\n| `get_test_coverage` | Test coverage analysis — covered %, uncovered symbols per file. Use to find untested code before writing tests |\n| **Cypher** | |\n| `query_graph` | Execute Cypher query against knowledge graph — full Cypher support for complex cross-cutting queries |\n| **Document Search** | |\n| `index_docs` | Index documents (PDF, DOCX, PPTX, Markdown, HTML) |\n| `reindex_docs` | Reindex all documents from scratch |\n| `clean_docs` | Remove document index |\n| `search_docs` | Search indexed documents with hybrid BM25+semantic |\n| `watch_docs` | Watch document directory for changes |\n| `stop_watch_docs` | Stop document watcher |\n| **Confluence** | |\n| `index_confluence` | Crawl and index Confluence wiki space |\n| `index_confluence_pages` | Index specific Confluence pages by ID |\n| **Multi-repo Groups** | |\n| `group_create` | Create a repo group |\n| `group_add` | Add repo to group |\n| `group_list` | List groups and members |\n| `group_index` | Index all repos in a group |\n| `group_query` | Cross-repo Cypher query |\n| `group_sync` | Extract HTTP contracts across repos |\n| `group_contracts` | List discovered contracts |\n| `group_deps` | Cross-service HTTP dependency detection |\n| `group_link` | Link cross-service deps as CALLS_SERVICE edges |\n| **Pipeline Plugins** | |\n| `pipeline_deps` | Dependency edges between pipelines — source/destination table overlap lineage |\n| `pipeline_impact` | Impact analysis: given a table name, find all affected pipelines (direct + transitive via DEPENDS_ON) |\n| `pipeline_compliance` | Find pipelines matching a compliance scope (e.g. 'irs 7216', 'gdpr', 'pii', 'ccpa') |\n| **Export \u0026 Visualization** | |\n| `export_graph` | Export as Cypher/GraphML/JSON |\n| `visualize` | Interactive HTML graph visualization |\n| `visualize_symbol` | Focused subgraph centered on one symbol |\n| **Project Management** | |\n| `list_projects` | All indexed repos |\n| `delete_project` | Remove project data |\n| `list_languages` | Supported languages and extensions |\n| **File Watching** | |\n| `watch_project` | Background file watcher with auto-reindex |\n| `stop_watch` | Stop a running watcher |\n| `get_watch_status` | Check watcher status and pending reindexes |\n| **Session Context** | |\n| `save_session` | Save session context to graph DB with TOUCHED edges + semantic embedding. Optional `name` param for named identity sessions (`named_{name}`). Auto-purges after configurable days (default: 30) |\n| `get_latest_session` | Retrieve most recent session — summary, pending tasks, decisions, linked files. Optional `name` param to recall by identity. Suggests purge if old sessions exist |\n| `search_sessions` | Semantic search across past sessions — finds sessions by meaning, ranked by relevance |\n| `purge_sessions` | Delete sessions older than N days (default: 30). User-initiated cleanup |\n\n## Architecture\n\n\u003e For a detailed technical design — including graph schema, hybrid search internals, incremental indexing, cross-file call resolution, and design rationale — see [ARCHITECTURE.md](ARCHITECTURE.md).\n\n```\ninfigraph/\n├── crates/\n│   ├── infigraph-core/          # Graph DB, parsing, search, analysis\n│   │   └── src/\n│   │       ├── model/           # Symbol, Relation, FileExtraction types\n│   │       ├── lang/            # LanguagePack, LanguageRegistry\n│   │       ├── extract/         # AST entity + relation extraction\n│   │       ├── graph/           # LadybugDB store, schema, queries\n│   │       ├── search/          # BM25, hybrid search, grep\n│   │       ├── embed/           # Model2Vec (bundled potion-base-8M, 256-dim)\n│   │       ├── resolve/         # Cross-file call resolution\n│   │       ├── cluster/         # Louvain community detection\n│   │       ├── multi/           # Multi-repo registry, groups, contracts, cross-service deps\n│   │       ├── routes/          # HTTP route detection (22 frameworks)\n│   │       ├── scip/            # SCIP index import (compiler-grade enrichment)\n│   │       ├── refactor/        # Refactoring analysis (complexity, coupling, clones, dead code)\n│   │       ├── watch/           # File watcher with auto-start after indexing + change batching\n│   │       ├── session/         # Session context persistence across AI sessions\n│   │       ├── review/          # PR review engine with optional LLM enrichment\n│   │       ├── check/           # CI check runner (security, complexity, dead code gates)\n│   │       ├── vuln/            # OSV vulnerability scanning\n│   │       ├── patterns/        # Design pattern detection\n│   │       ├── learned/         # Learned resolution patterns for cross-file calls\n│   │       ├── concerns/        # Cross-cutting concern detection (auth, caching, transactions)\n│   │       ├── config/          # Config binding resolution (Spring, Django, .NET, Rails)\n│   │       ├── reflection/      # Reflection/dynamic invocation scanner\n│   │       ├── taint/           # Taint analysis (intra/inter-procedural, dynamic URLs, path traversal)\n│   │       ├── structured/      # TOML schema-driven structured data ingestion\n│   │       ├── viz/             # HTML graph visualization\n│   │       └── export/          # Cypher, GraphML, JSON export\n│   ├── infigraph-docs/          # Document indexing (PDF, DOCX, PPTX, HTML, Markdown)\n│   ├── infigraph-confluence/    # Confluence wiki crawler with incremental sync\n│   ├── infigraph-languages/     # 59 tree-sitter language packs\n│   │   └── languages/           # entities.scm + relations.scm per language\n│   ├── infigraph-grammar-plugin/   # Runtime ANTLR grammar plugin system (JVM subprocess)\n│   │   └── src/                 # Driver, config-driven extractor, plugin discovery\n│   ├── infigraph-cli/           # 50+ CLI commands\n│   ├── infigraph-mcp/           # 82-tool MCP server + web UI\n│   └── lsp-to-scip/             # Generic LSP → SCIP bridge binary\n├── driver/                          # Java ANTLR grammar driver (JVM subprocess)\n│   ├── infigraph-driver.jar       # Fat jar (ANTLR4 runtime bundled)\n│   └── src/                       # GrammarDriver.java\n├── grammars/                        # Grammar plugin definitions (user-provided)\n├── models/\n│   └── potion-base-8M/          # Bundled Model2Vec embeddings (256-dim, ~30MB)\n├── release.sh                   # Local release builder (macOS ARM64 → GHE)\n├── install.sh                   # One-line installer (pre-built binary or source)\n└── tests/\n    └── fixtures/microservices/  # Test fixtures: Python/TS/Rust microservices\n```\n\n## Graph Schema\n\n### Nodes\n- **Symbol** — functions, methods, classes, structs, enums, variables, constants, tests, sections, routes (with parameters, return_type, docstring, complexity)\n- **Module** — file-level grouping\n- **Cluster** — Louvain-detected community\n- **File** — source file\n- **Folder** — directory\n- **Dependency** — external package dependency (name, version, ecosystem, is_dev)\n- **Statement** — control flow statement (if/for/while/match) with kind, condition, depth\n- **Concern** — cross-cutting concern (authorization, caching, transaction, etc.)\n- **ConfigBinding** — configuration property binding (key, value, profile, source_file)\n\n### Edges\n- **CALLS** — function/method call (cross-file resolved + SCIP-enriched)\n- **INHERITS** — class/interface inheritance\n- **IMPLEMENTS** — interface implementation (from SCIP)\n- **CONTAINS** — module contains symbol\n- **TESTED_BY** — test function tests symbol\n- **IMPORTS** — module imports module\n- **READS** / **WRITES** — variable access\n- **MEMBER_OF** — symbol belongs to cluster\n- **SIMILAR_TO** — semantic similarity (embedding-based)\n- **BRIDGE_TO** — cross-language bridge (FFI, JNI, gRPC, COM, WASM)\n- **CALLS_SERVICE** — cross-service HTTP call (with method, path, target_service)\n- **DEPENDS_ON** — module depends on external package\n- **DEFINES** — file defines symbol\n- **CONTAINS_FILE** — folder contains file\n- **CONTAINS_FOLDER** — folder contains subfolder\n- **HAS_CONCERN** — symbol has cross-cutting concern\n- **HAS_CONFIG** — symbol has config binding\n- **HAS_STATEMENT** — symbol contains control flow statement\n- **RESOLVES_TO** — reflection/dynamic invocation resolves to target (with mechanism, config_source)\n- **TAINT_FLOW** — dataflow from source to sink (with source_kind, sink_kind, path)\n- **Custom edges** — extensible via language plugins (DECORATED_BY, SPAWNS, etc.)\n\n## Tech Stack\n\n- **Rust** — core engine\n- **LadybugDB** (`lbug`) — embedded columnar graph database (Kuzu successor)\n- **tree-sitter** 0.26 — AST parsing for 59 languages\n- **Model2Vec** — neural embeddings (potion-base-8M, 256-dim, bundled — no proxy/network needed)\n- **SCIP** — Sourcegraph Code Intelligence Protocol for compiler-grade enrichment\n- **vis.js** — graph visualization\n- **tiny_http** — embedded web server\n\n## Contributing: Route \u0026 Decorator Extraction\n\nInfigraph captures HTTP route decorators/attributes and stores them in symbol docstrings for semantic search. When a user searches \"GET /api/users\", the route-decorated function scores highest.\n\n### How it works\n\nTwo mechanisms capture decorators:\n\n1. **Tree-sitter query capture** (`entities.scm`) — for languages where decorators are syntactic wrappers (Python `decorated_definition`, Java annotation modifiers)\n2. **AST sibling scan** (`extract/entities.rs`) — for languages where attributes are preceding sibling nodes (Rust `attribute_item`, C# `attribute_list`, Kotlin `annotation`, PHP `attribute_list`)\n\n### HTTP Route Coverage\n\n| Language | Framework examples | Status |\n|----------|--------------------|--------|\n| Python | Flask `@app.route`, FastAPI `@get`, Django `@api_view` | Working |\n| Java | Spring `@GetMapping`, `@RequestMapping`, `@RestController` | Working |\n| Rust | Actix `#[get]`, Axum, Rocket `#[get]` | Working |\n| C# | ASP.NET `[HttpGet]`, `[Route]`, `[ApiController]` | Working |\n| Kotlin | Spring `@GetMapping`, Ktor | Working |\n| PHP | Laravel `#[Route]` (PHP 8+) | Working |\n| TypeScript | NestJS `@Get()`, `@Controller()` | Working |\n| JavaScript | Express `router.get(\"/path\", ...)` | Working |\n| Go | `r.GET(\"/path\", handler)` (Gin, Chi, gorilla) | Working |\n| Ruby | Rails `get \"/path\" do...end` | Working |\n| Elixir | Phoenix `get \"/path\" do...end` | Working |\n| Swift | Vapor `router.get(\"/path\")` | Working |\n| Dart | shelf `get(\"/path\", handler)` | Working |\n| Haskell | Servant `type API = \"path\" :\u003e Get` | Working |\n| Lua | Lapis `app:get(\"/path\", ...)` | Working |\n| Perl | Mojolicious `get \"/path\" =\u003e sub {...}` | Working |\n| Clojure | Compojure `GET \"/path\"` | Working |\n| Erlang | Cowboy `dispatch_rules` / `handle` | Working |\n| GraphQL | Schema definitions | Working |\n| Scala | Play `GET(\"path\")` | Working |\n| Django | `path(\"/url\", view)` | Working |\n| F# | Giraffe/Saturn (AST scan) | Deferred |\n\n### Adding route support for a new language\n\n#### Option A: Query-based (decorator-wrapper syntax)\n\nEdit `crates/infigraph-languages/languages/\u003clang\u003e/entities.scm`:\n\n```scheme\n; Capture route method, path, handler\n(call_expression\n  function: (identifier) @route.method\n  arguments: (arguments\n    (string_literal) @route.path)\n  (#match? @route.method \"^(get|post|put|delete|patch)$\")) @route.def\n```\n\n#### Option B: AST sibling (attribute-preceded syntax)\n\nAdd the tree-sitter node kind to `ATTR_KINDS` in `crates/infigraph-core/src/extract/entities.rs`:\n\n```rust\nconst ATTR_KINDS: \u0026[\u0026str] = \u0026[\n    \"attribute_item\",    // Rust\n    \"attribute_list\",    // C#, PHP 8\n    \"annotation\",        // Kotlin, Scala\n    \"decorator\",         // TypeScript, JavaScript\n    \"marker_annotation\", // Java\n    // Add your language's attribute node kind here\n];\n```\n\n### Test fixtures\n\n`tests/fixtures/microservices/` contains realistic microservice repos for testing:\n- `user-service/` — Python Flask (3 files, 6 routes)\n- `order-service/` — TypeScript Express (4 files, 5 routes)\n- `payment-service/` — Rust Actix-web (5 files, 4 routes)\n\n## Documentation\n\nThe documentation site is built with Jekyll (Just the Docs theme) and deployed to GitHub Pages.\n\n**To develop the docs locally:**\n```bash\n./scripts/setup-docs.sh  # One-time: copy branding assets\ncd docs \u0026\u0026 bundle install \u0026\u0026 bundle exec jekyll serve\n```\n\nVisit `http://localhost:4000/infigraph/` to view the site.\n\nSee [docs/README.md](docs/README.md) for detailed documentation setup instructions.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for build instructions, code style, and how to add a language or submit a PR.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"branding-system/banners/bottom-banner1-light.png\" alt=\"Infigraph Footer\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n---\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Finfigraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintuit%2Finfigraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Finfigraph/lists"}