Original Reddit post

Hi folks – I’ve been working on an open-source project called **spy-code** that turns a codebase into a queryable graph for AI coding agents and developer tools. The idea is to give agents a structured view of a repository rather than just a pile of files. Spy-code parses your source with [tree-sitter]( https://tree-sitter.github.io/ ), extracts functions, classes and constants as nodes, maps calls, imports and references as edges, and stores the graph locally in a SQLite database. You can then query it via a CLI, a GraphQL API or an MCP server. This lets agents (or humans) ask targeted questions like: - What calls this function? - Where is authentication implemented? - What changed since a given git ref? - What depends on this class? It’s local-first (no remote indexing) and language-aware. I’m starting with Rust support first; Python, TypeScript/JavaScript and Go are on the roadmap. I’m looking for feedback from people building local LLM agents or working with large repos. Does this seem useful? What graph queries would you want against your codebase? Is GraphQL overkill, or would a simpler API suffice? What languages should be prioritised next? Repo (MIT licensed) is here: https://github.com/psyborgs-git/spy-code/ Would love to hear your thoughts – thanks! submitted by /u/OwnEntrepreneur256

Originally posted by u/OwnEntrepreneur256 on r/ClaudeCode