Skip to main content
Building a graph isn’t always free. Code costs nothing to extract. Docs, PDFs and images do. Knowing which is which lets you decide what goes into the graph, and measure savings on your own repo instead of trusting a headline number.
Rather not manage this yourself? Hosted Graphify builds and serves the graph for you. See Graphify vs Graphify CLI.

What costs tokens

Docs means .md, .mdx, .qmd, .txt, .rst, .html, .skill and Jinja templates. Images means .png, .jpg, .jpeg, .gif, .webp and .svg. The semantic pass runs on your assistant’s own model when you use /graphify, or on a model key you’ve configured when you use the CLI. Either way it uses tokens. A README and a folder of screenshots are enough to trigger it.

Build from code only

1

Skip docs, papers and images

Graphify prints how many files it skipped. No model is called and no key is needed.
2

Or turn model work off everywhere

The local code pass still runs. Every model call is skipped.
3

Keep specific files out

Add paths to .graphifyignore (same syntax as .gitignore) so they’re never scanned.
No key, mixed repo? graphify extract stops with “no LLM API key found” and tells you how many doc, paper or image files need a model. Add --code-only or configure a backend. A repo with only code never needs a key.

Check what you save

Run this after a build:
It compares the tokens in your whole corpus with the tokens in the answers Graphify returns for five typical questions, and prints the reduction for your repo. See Token benchmark for how it’s worked out.

Avoid paying twice

  • Unchanged files are cached. Docs whose content hasn’t changed reuse their earlier results. An upgrade that changes the extraction prompt re-extracts them once.
  • Refreshes are code only. graphify update ., the git hooks and graphify watch never call a model.
  • --force --code-only keeps what you paid for. It rebuilds code and keeps the existing doc and image layer.

Watch out for

A graph built with --code-only gets doc nodes back after the next branch switch, merge or rebase, because the hook rebuild doesn’t remember the scope. This adds no model calls, but the graph grows. Use .graphifyignore for anything you want kept out for good. Tracked in #4923.
How much smaller a graph answer is than your whole repo depends on the repo and the question. Measure it on yours with graphify benchmark.

FAQ

Build the graph, then let your assistant ask it questions instead of reading whole files. It gets back the few functions, files and links that matter. Keep the build cheap with --code-only and keep it current with graphify hook install.
Not for code. Code is read locally with tree-sitter. A key or your assistant’s model is only needed for docs, PDFs and images.
No. graphify update ., the git hooks and graphify watch only re-read code. Docs and images are re-read only when you run /graphify . --update, and unchanged files come from the cache.

Next steps

Token benchmark

Measure savings on your own repository.

Documents and media

What the semantic pass extracts from docs and images.

Try it in Graphify

We build and host the graph for you. The Free plan (up to 3 repositories) needs no card. Pro and Teams start with a 14-day trial, card required.