claude-db231
Menu

Code graph

The graph stores every symbol in your code and how they connect. Parsing is local and costs no tokens.

Build it

Terminal
claude-db scan
claude-db scan --force

A scan takes about a second on a mid-size repository. Re-running only re-parses files that changed. --force re-parses everything.

The four modes

Ask the same question four ways, over MCP as find_usages or in the terminal as claude-db usages:

ModeAnswers
usages (default)What uses the symbol, with the relation on each line.
explainThat, plus what the symbol itself reaches.
pathHow two symbols connect.
textLive git grep only. Needs no scan.
Terminal
claude-db usages --mode explain closeObservations
claude-db usages --mode path cmdScan observationId

usages and explain also list who imports the symbol. Lines that git grep finds but the graph cannot link come last, so nothing a search would find is lost.

Shortest path · 4 hops
cmdScanscanRepositoryextractFilesymbolIdobservationId

Confidence on every edge

EXTRACTED means the link was read straight from the syntax tree, so nothing is guessed. INFERRED means it was matched by name across files, and it carries a score. Name matching is the only guess the graph makes, and it is always labelled.

Never stale

Every graph query checks the working tree first and re-parses what changed, so an answer never points at a line that has moved.

Languages

  • Parsed: TypeScript, TSX, JavaScript, Python, Go, Rust, Java, Kotlin and Ruby. These get real syntax: definitions, calls, imports, extends and implements. The grammars ship with the package, so nothing compiles or downloads. On a platform without them, such as Alpine Linux, these languages are read by pattern.
  • Imports followed: all of these except Ruby, through path aliases, re-exports and workspace packages, so two symbols with one name in different modules stay apart.
  • Method calls followed: Java and Kotlin. x.method() reaches the method of the declared type of x, through parent classes and chained calls.
  • Read by pattern: about 30 more, including C, C++, C#, Swift, PHP and SQL. Declarations are found by pattern and every edge is tagged INFERRED. A reference that matches no declaration produces no edge, not a guess.
Edit this page on GitHub