Astrograph

What is Astrograph

A local-first code graph for JavaScript and TypeScript, built for humans and AI agents.

Astrograph indexes a JavaScript or TypeScript repository into a local graph of symbols and relationships — functions, classes, interfaces, imports, exports, calls, inheritance, references, and type usage — stored in SQLite. It then exposes that graph through a fast CLI and an MCP server, so both humans and coding agents can ask sharp structural questions instead of grepping blindly.

Why it exists

Most coding workflows start with text search. It works, but it is noisy and shallow:

rg "useAccount"
rg "AccountService"
rg "login"

Astrograph builds the semantic map once, locally, then answers precise questions:

astrograph callers useAccount
astrograph trace login refreshToken
astrograph context "how does session refresh work?"

What makes it different

Astrograph trades breadth for depth. Instead of covering 20+ languages with heuristic resolution, it focuses on JS/TS only and resolves relationships with the real TypeScript Compiler API — exact module resolution, path aliases, overloads, inheritance, and re-exports.

When a relationship is external, unresolved, ambiguous, stale, or partial, Astrograph says so instead of hiding it. Humans and agents always know what the graph can actually prove.

Explore the docs

Principles

  • 100% local. No API keys, no external services — everything lives in .astrograph/.
  • Incremental. A file watcher keeps the graph fresh by re-indexing only what changed.
  • Honest. Coverage and resolution states are first-class, never silently dropped.

On this page