graffiti · code graph
Issue 01 · 23 languages · 7 parsed GitHub

graffiti A code-graph engine for AI coding assistants

★ Zero API keys · $0 · fully offline

Stop grepping.
Start reading the graph.

Cheaper · faster · more effective
  • Up to 50% fewer tokensHand the model a scoped subgraph instead of whole files — smaller, cheaper calls.
  • Fewer round-tripsOne graph query instead of a dozen greps — answers land faster.
  • More accurate answersThe assistant reads real structure — calls, defs, imports — not guesses.

Your AI assistant explores your codebase blind — one grep at a time. graffiti turns the whole repo into a directed knowledge graph it can query. One static binary. No API key, no cloud, no cost.

Live preview · a repo as a force-directed graph
one command:
$ graffiti .
 Done. 0 API calls, $0.  214 files → 1,883 nodes, 4,102 edges, 12 communities.
  The 3 most interesting questions your map can answer:
    1) Which module is the load-bearing wall?
    2) What does the auth flow touch?
    3) Where are the cross-package call hotspots?
Determinism

Same repo in — byte-identical map out.

Every run sorts everything and stamps a single timestamp. Diff two builds and only the clock moves. Commit the map; review it like code.

View on GitHub
★ Service architecture · the killer feature

Many repos.
One system graph.

A microservice system is N independent repos that form one product. graffiti maps each one, then discovers the edges between them — HTTP, gRPC, queues — from each service's contract.

one command — in CI or local:
$ graffiti system build
 System: 12 services → 38 cross-service links (2 ambiguous, 1 dangling, 4 orphan). 0 API calls, $0.
$ graffiti system impact carts::GET /carts/{}
  ← checkout, web-bff, mobile-bff depend on it

Auto cross-service links

Matches what each service consumes against what others provide.

Impact analysis

Change an endpoint → see every service that breaks.

Contract audit

Dangling consumers, orphan providers, ambiguous matches.

Each service publishes its own map

The orchestrator federates the published artifacts.

From zero to a system graph

A folder of services,
mapped in three commands.

Got a folder of independent services in subdirectories? Map them into one system graph — no merge, no cloud, no config.

01

Publish each service

build then publish every subdirectory into a store at the parent folder.

02

Build the system graph

system build federates the maps and auto-discovers cross-service links.

03

Explore & guard

render the map, ask impact/query, and gate CI with audit.

in the parent folder of your services:
# parent folder; services live in ./orders, ./web, ./payments …
# 1 — build + publish every service into a shared store
for d in */; do graffiti build "$d" && graffiti publish "$d" --to .; done

# 2 — federate + auto-discover the calls between them
graffiti system build
 System: 3 services → 7 cross-service links (0 ambiguous, 0 dangling). 0 API calls, $0.

# 3 — explore
graffiti system impact orders   # who breaks if orders changes
graffiti system render          # → .graffiti-system/system.html

Improve accuracy by dropping an openapi.json, a .proto, or a graffiti.contract.json into a service.

View on GitHub
Vibe-chill install

Why touch a terminal
when you have Claude Code?

Paste this one prompt into your Claude Code session. Say "y" when it asks for permission. Done.

No Go toolchain, no build flags, no config hunt — Claude downloads the binary, maps your repo, and wires up the integration, asking before each command.

you paste in Claude Code:
Install graffiti by amazopic for me. Download the right static binary for my OS/arch from the latest release at github.com/amazopic/graffiti (or build it from source with `make build` if Go is available), put it on my PATH as `graffiti`, and verify with `graffiti version`. Then run `graffiti .` at my repo root to build the map, run `graffiti init --hook` to wire graffiti into Claude Code, and finally open `.graffiti/map.html` so I can see the graph. Ask before each step.

↳ Just say y (yes) at every permission prompt — Claude will run each command one by one.

Editor's Note

An AI coding assistant is only as good as what it can see.

graffiti is the map that should have been there.

View on GitHub

By the numbers

0
API calls, ever
$0
dollars to run
1
static binary (~10 MB)
23
documented languages
100%
byte-deterministic, offline
View on GitHub
Token cost

One question.
A fraction of the tokens.

Ask “where is the cart fetched and served?” — here's what your assistant has to read to answer it: grepping blind versus one scoped graph query.

grep + read files≈ 4,200 tokens
greps, opens ~7 candidate files, reads them whole
graffiti query≈ 1,900 tokens
one scoped subgraph — defs, callers, callees
≈ 55% fewer tokens

Illustrative — actual savings vary by repo and task. graffiti query caps each answer at a soft ~2,000-token budget, so context stays lean and cheap.

View on GitHub
Contents · three artifacts

One command,
three artifacts.

graffiti . writes everything into .graffiti/.

map.json

map.json

The graph itself — nodes, edges, communities, schema-checked.

MAP.md

MAP.md

A human-readable digest of the most important structure.

map.html

map.html

A single self-contained, offline, interactive force-directed graph.

map.html · interactive viewer
  • 2D / 3D toggle — hover lifts a node and its neighbours
  • search nodes · click to copy file:line
  • sector zones · client / tests / external toggles
  • resizable project → directory → file tree
View on GitHub
A side-by-side

vs. grep,
vs. the cloud

Capability Grep / cloud RAG graffiti
Directed graph: calls, defs, importsnoyes
Runs fully offline, no accountnoyes
Ongoing cost$ per token$0
LLM-free, token-budgeted retrievalnoyes
MCP server built innoyes
Byte-deterministic outputnoyes
Interactive offline graph viewernoyes
What it needscloud + API keysone binary

Full comparison: graffiti vs embeddings/RAG vs Cursor →

View on GitHub
Get going

Install in 30 seconds

One static binary does it all: build the map, query it, serve it over MCP, and wire itself into Claude Code.

01

Get the binary

One curl — or make build from source.

02

Map your repo

Run graffiti . at the repo root.

03

Wire up Claude Code

graffiti init --hook — and your assistant reads the graph.

Or in Claude Code — easiest

Have Claude Code open? Paste this one prompt and you're done — no terminal needed.

01
you Install graffiti by amazopic for me…
macOS / Linux / WSL
# 1 — get the binary (verifies SHA256)
curl -fsSL https://raw.githubusercontent.com/amazopic/graffiti/main/scripts/install.sh | sh

# 2 — map your repo
graffiti .

# 3 — look at the graph
open .graffiti/map.html

The installer picks the right static binary for your OS/arch and verifies its SHA256. Prefer source? make build produces the same ~10 MB CGO-free binary.

Claude Code integration
graffiti init --hook   # skill + CLAUDE.md + grep→query nudge
graffiti serve          # MCP server over stdio
graffiti query "auth flow"   # LLM-free scoped subgraph
View on GitHub
Multi-repo

Frontend and backend,
one graph.

Lay separate repos side by side and query across them — without merging.

Assert cross-project edges, validate they resolve, then query the whole federation.

$ graffiti link ../frontend ../backend
 Linked 2 projects. 7 cross-project links. 0 API calls, $0.
$ graffiti query --workspace "where is the cart fetched and served"
View on GitHub
Q & A

Frequently
Asked

What is graffiti?
How do I reduce the tokens my AI assistant burns reading a large codebase?
How can I give my AI assistant context about a whole large codebase?
How do I stop my AI coding assistant from grepping and reading whole files?
How do I find out which microservices break if I change an API endpoint?
Is there a free, offline alternative to cloud code indexing, embeddings, or RAG?
How is graffiti different from RAG or embeddings for code?
Does graffiti work with Cursor, Copilot, and ChatGPT, or only Claude Code?
How does it build the graph without an LLM?
Which languages does it support?
Does it really need no API key or network?
What does "byte-deterministic" mean here?
How does the Claude Code integration work?
Can my assistant query it over MCP?
What is map.html?
Will it handle a big repository?
Is it free? Can I use it commercially?