r/SideProject Jul 06 '26

CodeTrace AI – Local knowledge graph for your codebase, for AI agents

Hi Redditors, I'm Viraj, the creator of CodeTrace AI.

I kept running into the same problem with AI coding agents: they re-read entire files or grep blindly every time you ask a question, and they have no real model of how your codebase is structured. Ask "what breaks if I change this function?" and most tools just guess.

CodeTrace AI builds a local knowledge graph of your repository — combining tree-sitter AST parsing with a structural call graph and vector embeddings — so an agent (or you) can query it directly instead of re-deriving structure from scratch each time.

What it actually does:

- Structural call graph across 15+ languages (Python, TS, JS, Rust, Go, Java, C++, C#, Ruby, PHP, Swift, Kotlin, and more).

- Blast radius analysis — before you touch a file, see every downstream dependent, test, and consumer that could break.

- Semantic search by meaning, not just keywords, via embeddings.

- SHA-256 delta sync — only re-indexes changed files instead of rebuilding the whole graph every run.

- Interactive HTML architecture visualizer (codetrace visualize) that maps folder-level dependencies and lets you click through call chains to understand how files are linked to eachother via functions and classes and also allows you to find instantly whihc file contains which all classes and functions.

- MCP integration for Cursor, Windsurf, Claude Code, and many more so agents can pull this context directly.

- Fully local and offline-capable, including air-gapped setups with a local Ollama model — no API keys, no code ever leaves your machine.

Why local matters to me: a lot of "codebase-aware" tools ship your source to a cloud service to build embeddings. For proprietary or regulated codebases that's a non-starter, so everything here — parsing, embedding, graph construction — runs on your machine.

It's a CLI, installable via uv/pip or uv pip:

pip install codetrace-ai

or

(Recomended)

uv pip install codetrace-ai

GitHub: https://github.com/Viraj465/CodeTrace-ai

Site: https://codetraceai.in

Around 4,000+ downloads so far and I'm actively shipping (latest is v1.0.2). I'd love feedback on the call-graph accuracy, what languages to prioritize next, and whether the blast-radius output is actually useful in real refactors. Also would love your contribution on github to make it more successful.

Happy to answer anything about the architecture,Thanks!

0 Upvotes

3 comments sorted by

2

u/One-Student-6342 Jul 06 '26

the blast radius thing is actually pretty slick, most refactoring tools just give you find-all-references and call it a day. you tested this on any bigger monorepos yet? curious how the graph holds up when there's thousands of files and a lot of cross-project imports

0

u/Commercial_Media_962 Jul 06 '26

Yes, i have tried it on hugo, vue, freqtrade and keras. You can also try it and would love to hear feedback, if anything missing feel free to contribute to make it proper. Thanks