Skip to main content
$ai-systems-by-jon
Back to Guides
Claude CodeToken UsageGraphify

Graphify: Cut Claude Code Tokens up to 70× (Free Repo)

5 min read

What Graphify is

Graphify is a free, open-source tool that builds a knowledge graph of your codebase so Claude Code stops re-reading every file on every session. It was built by safishamsi and runs on top of Claude Code, Anthropic's terminal coding tool. A knowledge graph is a map of how your files, functions, and imports connect. You build that map once, and from then on Claude Code walks the map instead of scanning the whole repo, which is where the token savings come from.

Why Claude Code burns through your tokens

A token is a chunk of text that Claude reads or writes, and your plan is metered in tokens. Every new Claude Code session starts by re-reading large parts of your codebase before you ask anything, so a big repo drains your token budget within days. That is the real reason you run dry mid-month. Graphify removes the repeated cost: Claude reads the graph, loads only the files a task touches, and skips the full re-scan.

Before you start

You need two free things installed.

  • Claude CodeAnthropic's terminal coding tool, where you run Graphify.
  • Python 3.10 or newerGraphify itself runs on Python.

If you do not have Claude Code yet, install it with Node.js and sign in:

npm install -g @anthropic-ai/claude-code
claude

Step 1 — Install Graphify

Install the package and its Claude Code command. The package name is "graphifyy" with two y's on purpose, since the shorter name is still being reclaimed.

pip install graphifyy
graphify install

On a Mac, if pip reports an "externally-managed environment" error, install it with pipx instead:

pipx install graphifyy

Step 2 — Build the knowledge graph once

Inside Claude Code, point Graphify at your project. The dot means "this folder."

/graphify .

Graphify scans the repo, writes the graph to a graphify-out/ folder, and Claude Code reads from it on every session after that. You run this once.

Step 3 — Keep working, and re-scan after big changes

Nothing changes about how you prompt. Open a session, ask for what you want, and Claude Code walks the graph instead of re-reading the whole codebase. After you move or rename a lot of files, run /graphify . again so the map matches your code. On large codebases the difference is dramatic. On a three-file project the gain is small.

Frequently asked questions

  • Is Graphify free?Yes. It is open-source on GitHub, with nothing to subscribe to.
  • Does it work on the $20 Claude plan?Yes. Lower token usage stretches any plan, so the $20 plan goes much further.
  • How much does it cut Claude Code token usage?Up to about 70 times fewer tokens per session on large repositories.
  • Where does the knowledge graph live?In a graphify-out/ folder inside your project, which Claude Code reads on its own.

Get Graphify

The repo, full docs, and setup live here: https://github.com/safishamsi/graphify