● gittrendingglobal

Home › Free AI tools

Free AI tools · 2026-05-15 · 8 min read · Updated 2026-10-16 · By the Git Trending Global team, facts checked against the source

CodeGraph for Claude Code: Cut AI Coding Costs (2026)

CodeGraph for Claude Code builds a local map of your code, so your AI helper finds the right files in one step. Free, MIT licensed, runs on your computer.

stars: 74.2K · license: MIT · platforms: Mac, Windows, Linux

▶ Watch: CodeGraph for Claude Code explained in under a minute

CodeGraph for Claude Code is a free tool that builds a map of your project ahead of time. Your AI coding helper asks the map instead of opening files one by one, so it answers faster and spends less.

It also works with Cursor, Codex, Gemini, GitHub Copilot and more. Below you'll find what it does, real ways to use it, the exact install steps, and a prompt that lets your AI helper set it up for you.

Key takeaways

What is CodeGraph?

Think of your code as a big warehouse. Every box is a piece of code. Some boxes depend on others.

When you ask an AI coding helper a question, it usually has to walk the aisles. It searches, lists folders, and opens file after file. That costs time, and it costs tokens. Tokens are the small chunks of text an AI reads and writes, and they are what you pay for.

CodeGraph labels the whole warehouse first. It records every function, every call, and every link between pieces. The makers call this a "pre-indexed code knowledge graph." That's a fancy name for a map of who talks to whom.

Then, when your AI needs something, it asks the map once. It gets the right code back, plus how it connects to other parts, plus what a change might break.

It's made by developer Colby McHenry and shared on GitHub.

CodeGraph for Claude Code in 3 steps: install the tool, connect your AI helpers, build the map of your project

How does CodeGraph save money on AI coding?

The makers tested it on seven real open-source projects in seven languages. Each test asked Claude Code (running Claude Opus 4.8) one big question about the project, with and without CodeGraph. They ran each one four times and took the middle result.

Their reported averages:

The savings were not the same everywhere. On the VS Code project, the answer was 71% cheaper. On a small Go project called Gin, the cost was about even. The README explains why: the more digging a question needs, the more you save.

💡 Tip: CodeGraph helps most on big, messy projects where your AI keeps saying "let me search for that." On a tiny project, you may barely notice it.

How to use CodeGraph (real examples)

You don't talk to CodeGraph directly. You keep using your AI helper as normal, and it quietly asks the map. Here's what that looks like day to day:

It understands more than 20 programming languages. That includes Python, JavaScript, TypeScript, Java, Go, Rust, Swift, C#, PHP and Ruby, plus older ones like COBOL.

Which AI tools does CodeGraph work with?

The installer finds and sets up these for you:

It connects through MCP, short for Model Context Protocol. That's a standard plug that lets AI helpers use outside tools.

How to install CodeGraph for Claude Code and other AI tools

These are the steps from the README. You need a Mac, Windows or Linux computer and at least one AI coding tool. You don't need Node.js, because CodeGraph brings its own.

Step 1: install the tool. Open Terminal (Mac or Linux). Copy and paste this:

curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh

On Windows, open PowerShell. Copy and paste this:

irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex

Already have Node.js? You can use this instead:

npm i -g @colbymchenry/codegraph

Step 2: open a new terminal window. The README says the installer doesn't change the window you already have open.

Step 3: connect your AI helpers. Copy and paste this:

codegraph install

This is the step that links CodeGraph to your AI tools. It does not build any maps yet.

Step 4: build the map for each project. Go into your project folder and run this:

cd your-project
codegraph init

That's it. From now on the map updates itself when files change. Restart your AI tool so it picks up the new connection.

⚠️ Heads up: The first map can take a while on a huge project. The makers say the Linux kernel, with 70,000 files, finishes in under 12 minutes on a small 2-core server. After that, saving a file updates the map in well under a second.

To update later, run codegraph upgrade. To remove it from every AI tool, run codegraph uninstall.

Let Claude or Codex set it up for you

Claude Code and OpenAI Codex are AI helpers that can run setup steps on your computer. You paste a request, it does the steps, and you approve each one.

Copy and paste this:

Please help me install CodeGraph from github.com/colbymchenry/codegraph.
1. Check if I'm on Mac, Windows or Linux.
2. Run the official one-line installer for my system. Explain it first.
3. Tell me to open a new terminal, then run "codegraph install".
4. Go into my current project folder and run "codegraph init".
5. Tell me how to check that my AI tool can now see CodeGraph.

Then try asking:

Use CodeGraph to explain how the main parts of this project connect.
If I change the function I'm working on, what else could break? Use CodeGraph's impact check.
Turn off CodeGraph's anonymous usage stats for me and confirm it worked.

CodeGraph savings in the makers' tests: 88% fewer tool calls, 53% faster, 62% fewer tokens, 44% cheaper across 7 codebases

Is CodeGraph free and private?

Yes, the tool is free under the MIT license. You can use it at work too.

The README says it runs 100% on your computer. It stores the map in a small local database inside your project, in a folder called .codegraph. No API keys, no outside services.

There is one small thing to know. CodeGraph collects anonymous usage counts, like which commands and languages get used. The makers say they never collect code, file names, searches or IP addresses. The installer asks you first, and this turns it off:

codegraph telemetry off

The makers are also building a separate paid hosted product, with a waitlist at getcodegraph.com. The free tool works fine without it.

CodeGraph at a glance

Price Free
Works offline Yes, the map lives on your computer
Platforms Mac, Windows, Linux (Intel and ARM)
License MIT (open source)
GitHub stars About 74.2K
Languages 20+ programming languages
Best for Anyone who pays for AI coding help on medium or big projects

Our take

CodeGraph does one clear job: stop your AI from wandering around your code. The install is four short steps, and the map keeps itself current.

What we like:

What to watch for:

Want more ways to trim your AI bill? See Graphify, which gives your AI a map of your whole project, RTK, which shrinks what your AI has to read, or Caveman, which cuts Claude Code token use. For a visual tour of a codebase, try Understand Anything.

FAQ

Is CodeGraph free?

Yes. CodeGraph is free and open source under the MIT license. A separate hosted product is coming, but the tool itself costs nothing.

Does CodeGraph send my code anywhere?

No. The README says it runs 100% locally with no API keys or outside services. It only sends anonymous usage counts, and you can turn that off.

Does CodeGraph work with Cursor and Codex, not just Claude Code?

Yes. The installer sets up Claude Code, Cursor, Codex CLI, Gemini CLI, GitHub Copilot, Kiro and a few others.

How much can CodeGraph reduce Claude Code token usage?

In the makers' tests on seven projects, it used 62% fewer tokens on average. Results ranged from big savings on large projects to about even on small ones.

Do I need to rebuild the map after I change code?

No. CodeGraph watches your project and updates the map every time a file changes.

Get CodeGraph: github.com/colbymchenry/codegraph

Follow @gittrendingglobal on Instagram for one free, useful tool every day.

📲 Watch the 30-second video on Instagram

Keep reading

📲 Like this? Follow @gittrendingglobal on Instagram for one free AI tool and the AI news that matters, every day.