Local-first · CGo-free · Zero egress

Your agent stops grepping the whole codebase.
It asks the graph.

graphi parses a repository into a deterministic, provenance-backed code graph — symbols as nodes, calls/references/imports as edges — and answers “who calls this”, “what breaks if I change it” and “how are two functions connected” in a single round-trip — for the symbols your repo defines. Entirely on your machine.

open source · Apache-2.0 · 12 GA operations over CLI + MCP stdio · Go GA, 21 further languages in Preview

01What is graphi?

A code-intelligence engine that runs entirely on your machine.

  1. 01

    Parse

    Source in, canonical code graph out — symbols as nodes; calls, references and definitions as edges.

  2. 02

    Serve

    graphi answers structural questions in a single round-trip — no re-grepping, no re-reading whole files. Queries read the graph straight from your local store; an optional background daemon (Labs) can keep it hot for repeated queries.

  3. 03

    Prove

    Every relationship carries provenance: a confidence tier (heuristic / derived / confirmed), a reason, and supporting evidence.

02Built for two audiences

One tool, two ways in.

For developers

Fast, structural answers about an unfamiliar or large codebase — right on the command line.

$ graphi callers handleAuth
$ graphi impact  handleAuth
$ graphi task-context "add rate limiting"

For AI coding agents

A stable, read-only graph backend to query over MCP — without owning parsing/indexing and without sending code to a third party.

$ graphi setup
wire Claude Code · Copilot ·
Cursor · Devin · Windsurf · Desktop
03Interactive web UI

The code graph, loaded from a seed-symbol search.

graphi web UI: interactive code graph loaded from a seed-symbol search
graphi web UI (Labs) — ships in the same binary. It is not part of the GA promise: docs/stability-tiers.md.
04Evidence

Measured, or not claimed at all.

graphi reports only numbers a checked-in, re-runnable gate produces. Anything else — accuracy across languages, real-world speed, savings on your repo, or any comparison to another tool — is UNKNOWN until independently measured, and UNKNOWN counts as not passed.

Engine performance budgets

checked-in gate
MetricPinned baselineBudget
cold_start_p95294 ms400 ms
full_index120 ms300 ms
freshness_lag50 ms2000 ms
binary_size32.5 MB34.25 MB

Source: bench/bench-budget.yml, baseline 2026-07-16-v050-hardening, reproduced by go run ./cmd/bench -budget bench/bench-budget.yml. These are baselines over a frozen synthetic fixture on go1.26.5/linux-amd64 — a regression tripwire, not a prediction of how fast graphi indexes your repository.

Token savings: measured per session, not promised

no headline number

graphi meters every call against a frozen whole-file-read baseline, prices it from an embedded table (no network), clamps it with an anti-gaming cap, and writes it to a durable ledger you can read back with graphi savings.

We publish no headline savings percentage. The ratio depends entirely on your repository and your questions, and graphi ships no benchmark artifact that would let a reader reproduce such a figure. The mechanism is honest by construction: when a baseline cannot be determined, BaselineAvailable = false and zero savings are reported; when graphi uses more context than the baseline, the negative number is reported raw rather than hidden.

engine/meter · whole-file-read-v1 engine/price · prices-v1 local-first · zero egress

What graphi does not claim: no accuracy rate on any language, no indexing speed on real repositories, no savings percentage, and no comparison against any competing tool. A “faster or more accurate than X” claim would require a public, matched-corpus benchmark on identical hardware with task-level correctness labels. No such benchmark exists today, so no such claim is made. Tier definitions: docs/stability-tiers.md.

05Features

12 GA operations over one engine — plus an opt-in Labs catalog.

The default MCP profile advertises 11 tools (the 12 GA operations minus lifecycle-only index). graphi mcp -labs opens the maximal 56-tool registry — 45 Labs additions, capability-gated, and not part of the GA promise. Tiers are defined in docs/stability-tiers.md.

Structural queries GA + labs

Relationships and type hierarchy for any symbol your repo defines.

  • callers · who calls a symbol
  • callees · what it calls
  • references · every in-repo reference
  • definition · where it's defined
  • neighborhood · immediate neighborhood
  • implementers · implements · overrides labs
  • subtypes · supertypes · compound labs

Impact & semantics GA + labs

Reachability, call paths and concept resolution.

  • impact · in-repo blast radius of a change
  • call-chain · call path between two symbols labs
  • concept · natural language → graph location labs
  • metrics · hubs, bridges, centrality labs
  • batched · everything combined in one call labs

Deep analysis labs

Taint, dependence graph and history signals.

  • taint · propagation from sources to sinks
  • pdg · program dependence graph
  • interproc · interprocedural fixpoint summaries
  • contracts · API contracts & drift
  • git-history · churn, co-change, bus factor (reads real local history via the gitlog provider)

Pattern queries GA + labs

Find patterns and duplicates in the graph.

  • search_ast · AST pattern search labs
  • find_clones · clone detection labs
  • search · lexical symbol search
  • search_semantic · optional embedding search labs

Edits & code actions labs

Reference-correct refactors with a fail-safe.

  • refactor_preview · preview before applying
  • refactor · rename / extract / move / signature
  • undo · atomic rollback
  • diagnose · graph-derived diagnostics
  • inline · reference-correct inlining
  • safe_delete · only when no inbound refs remain

PR review labs

Deterministic, LLM-free review signals.

  • pr-risk · per-region risk score
  • pr-signals · hub / bridge / surprise
  • pr-questions · derived reviewer questions
  • pr_comment · sticky comment + merge gate
  • list_prs · triage_prs · conflicts_prs
  • suggest_reviewers · compare_branches
  • critique_review · critique an existing review

Memory & skills labs

Local agent memory, all on your machine.

  • memory · per-scope / notebook / tag
  • distill · session → compact decision record
  • skillgen · deterministic skill generation

Live IDE & watcher labs

Live transport, overlays and incremental indexing.

  • MCP streamable-HTTP with stdio envelope parity
  • Per-class SSE subscriptions for editors
  • In-memory editor overlay for unsaved buffers
  • fsnotify watcher with deterministic apply
  • Notebook ingestion & Louvain communities
  • Fail-closed zero-egress guard

Agent context GA + labs

One call returns the context an agent actually needs — cited, ranked, token-budgeted.

  • agent_brief · bounded, cited task-start packet
  • explain_symbol · cited symbol identity summary
  • related_files · ranked read-first file list
  • change_risk · evidence-based blast-radius estimate
  • symbol_context · definition + snippet, hierarchy, tests, risk in one call labs
  • task_context · free-text task → ranked, token-budgeted bundle labs
  • repo_overview · structure, languages, entry points, central symbols labs
  • search_hybrid · embedding-free multi-token ranking (identifier + path + degree) labs

Change, test & git intelligence labs

Which tests must run, how risky a diff is, and where the repository hurts.

  • test_impact · must-run / recommended / probably-unaffected test buckets for a diff
  • change_impact · changed symbols, public API, dependents, covering tests, co-change partners, reasons, risk
  • hotspots · churn × dependency centrality with bus-factor warnings
  • History via a bounded local git log at the surface boundary — the engine stays exec-free

Architecture & dead-code intelligence labs

The real modules, which way they depend — and where the layering breaks.

  • architecture · deterministic Louvain communities labeled by dominant package prefix, layered by dependency direction
  • architecture_violations · cycles, edges against the dominant direction, high-coupling pairs, god modules
  • dead_code · scored candidates with visible exclusions (entry points, test fixtures, exported API)
  • framework_map · routes, event handlers & DI wiring from recorded annotations (Spring, NestJS/Angular, .NET)
  • Every finding quotes its edge counts, scores and pinned thresholds — no LLM classification anywhere

The full feature inventory — every MCP tool, every CLI subcommand, every HTTP endpoint — lives in docs/FEATURES.md.

06Language support

Go is GA. Every other language is Preview.

Go is the only GA language. The 21 languages below it are Preview: they ship, they are usable, and they run the same 12 GA operations — but they are outside the GA promise and their accuracy is unproven. Concretely: Go gets a type-checker-proven confirmed tier via go/types, while every Preview language runs through per-language resolvers at the heuristic tier only, with file:line evidence and never confirmed. The default tier is CGo-free. See docs/stability-tiers.md.

  • Go
  • TypeScript
  • TSX / JSX
  • JavaScript
  • Python
  • Ruby
  • PHP
  • Lua
  • Java
  • Kotlin
  • C#
  • C
  • C++
  • Rust
  • Bash
  • SQL
  • JSON
  • YAML
  • TOML
  • CSS
  • Markdown
  • HCL / Terraform
07The local-first contract

Not a single byte leaves your machine.

No accounts

No login, no sign-up. Install and go.

No telemetry

No usage data, no phone-home. What you do stays with you.

Zero egress

An enforcement guard rejects any non-loopback dial at the surface boundary.

Semantic search: OFF

Optional embedding search is off by default. The default binary ships no embedder and degrades gracefully.

08Quick start · 2 steps

Run it in your repo.

1

Install — one line, checksum-verified, no sudo.

macOS / Linux curl -fsSL https://raw.githubusercontent.com/samibel/graphi/main/install.sh | sh
Windows iwr -useb https://raw.githubusercontent.com/samibel/graphi/main/install.ps1 | iex
2

Run it in your repo — your browser opens the interactive code graph.

cd your-repo && graphi

On a headless box or over SSH, graphi prints the local URL instead with --no-browser.

New to graphi? Follow the step-by-step tutorial — install, MCP setup, a real Spring-Boot example and measuring token savings.

If graphi saves your agent one full-repo grep, it already paid for itself.