Docs

Languages Graph Indexer supports

Graph Indexer parses 16 bundled tree-sitter grammars (TypeScript, Python, Go, Java, C#, Rust, Kotlin and more) with deepest reference binding in 7 of them.

Updated Graph Indexer 3.0.0 View as Markdown

Graph Indexer supports 16 bundled tree-sitter grammars covering 15 languages: JavaScript, TypeScript, TSX, Python, Go, Java, Kotlin, Scala, C#, Rust, C, C++, Ruby, PHP, Bash and CSS (with SCSS and Less). Reference binding and receiver-type inference are deepest for TypeScript, JavaScript, Python, Go, Java, C# and Rust, and accuracy has been verified against the real TypeScript, Go and Java toolchains.

Which languages does Graph Indexer index?

Graph Indexer chooses the grammar from the file extension. All 16 grammars run as WebAssembly inside the npm package, so a mixed-language repository is indexed in one pass with no extra setup.

LanguageFile extensionsTier
JavaScript.js, .jsx, .mjs, .cjsDeep
TypeScript.ts, .mts, .cts (and .d.ts)Deep
TSX.tsxDeep
Python.py, .pyiDeep
Go.goDeep
Java.javaDeep
C#.csDeep
Rust.rsDeep
Kotlin.kt, .ktsStandard
Scala.scala, .scStandard
C.c, .hStandard
C++.cc, .cpp, .cxx, .hpp, .hh, .hxx, .h++, .c++, .ipp, .inlStandard
Ruby.rb, .rake, .gemspecStandard
PHP.php, .phtmlStandard
Bash.sh, .bash, .zshStandard
CSS.css, .scss, .lessStandard

Headers are ambiguous between C and C++. A sibling .cpp or .cc file, or C++ syntax in the header, decides which grammar is used.

What do the depth tiers mean?

Graph Indexer extracts definitions, references, imports and type evidence for every language through one tree-sitter query per grammar. The tiers describe how far the reference binding goes beyond that.

For the deep tier (TypeScript, JavaScript, Python, Go, Java, C# and Rust), Graph Indexer also infers receiver types and follows the import system of the language: tsconfig paths and workspaces, Go modules, Python packages and relative imports, and Rust crate, self and super paths. A call such as userService.find(id) is bound to UserService.find and not to every method named find.

For the other languages, Graph Indexer still indexes every definition and reference and resolves them by lexical scope, enclosing type, same file, imports and package, but with less type inference. Use the confidence labels on each result: exact and high mean the reference was bound through scope, import or inferred type, while likely and possible mean only the name matched. Resolution is described in How Graph Indexer works.

Which languages has Graph Indexer verified against a real type checker?

Graph Indexer has measured the references it reports against three real toolchains. Each number below is from the pinned public repositories described in the benchmark methodology.

LanguageOracleRepositoriesPrecisionRecall
TypeScriptTypeScript compiler (findReferences)nestjs, 400 symbols99.7%96.2%
TypeScriptTypeScript compilerTwenty server, 28,512 files99.9%92.4%
GoGo type checkergin, caddy, nats-server99.2% to 100%97.2% to 98.1%
JavaJava compiler (javac front end)spring-petclinic, jsoup, Commons Collections95.5% to 99.4%86.1% to 98.9%

On the nestjs sample, grep for the name reaches 12.8% precision, so most of what it returns is not a real reference. The same comparison for Go gives grep a precision of 8.5% to 23.8%, and for Java 1.5% to 60.9%. See the full tables on the benchmarks page and on the landing page.

Python is not scored against a compiler. It is measured on class facts instead: 100% precision for overrides and for inheritors on sqlglot, and on networkx 98.3% for overrides and 100% for inheritors.

What are the known limits per language?

Graph Indexer is not a type checker, and these limits are published rather than hidden.

  • TypeScript and JavaScript. Contextually typed object literals, generic instantiation, reflection and any are only partly visible. In the Twenty monorepo, union and registry-object calls, object-literal implementers and fluent builders through generic this are still missed. Dependency injection that wires by string token is only partly visible.
  • Go. Methods promoted from embedded library types and library interfaces are not yet handled. Implicit interface implementations score 97.7% to 100% precision and 93.8% to 100% recall.
  • Java. Java was the weakest language measured: precision 95.5% to 99.4% and recall as low as 86.1% on Commons Collections. Calls bind to the overload that takes their argument count.
  • Python. getattr and other dynamic features are only partly visible. Method resolution order uses C3 linearization, so inheritors with multiple inheritance are decided correctly.
  • Ruby and PHP. Constructor names follow the language (initialize in Ruby, __construct in PHP), so Foo.new and new Foo() are not mistaken for calls to an ordinary method.
  • Everything. Only the working tree is indexed. Standard-library and ambiguous method names such as get and set stay unbound instead of being guessed, and the footer of a result reports same-name call sites that could not be bound.

What files does Graph Indexer skip?

Inside a git repository Graph Indexer takes the file list from git, so every .gitignore rule is honoured. It also skips dependency and build folders such as node_modules, dist, build, target, vendor and __pycache__, minified and generated files, and files larger than 1.5 MB. Outside git it walks the tree with a small .gitignore matcher.

How do I check what Graph Indexer sees in my language?

Run npx graph-indexer index in your repository and then npx graph-indexer status. Use graph-indexer refs <name> to see the references and confidence labels for any symbol, then compare with your own tooling. Setup is on the install page, and every tool is documented on the tools page. Questions about privacy, cost and agents are answered in the FAQ.

Frequently asked questions

How many languages does Graph Indexer support?

Graph Indexer bundles 16 tree-sitter grammars as WebAssembly: JavaScript, TypeScript, TSX, Python, Go, Java, Kotlin, Scala, C#, Rust, C, C++, Ruby, PHP, Bash and CSS (including SCSS and Less). That is 15 languages, with TypeScript and TSX as two grammars.

Which languages get the most accurate references?

Reference binding and type inference are deepest for TypeScript, JavaScript, Python, Go, Java, C# and Rust. Accuracy has been measured against the TypeScript compiler, the Go type checker and the Java compiler; the other languages are indexed but not verified that way.

Do I need to install grammars or language servers?

No. Every grammar ships inside the npm package as WebAssembly with a pinned version and a SHA-256 checksum. Nothing is downloaded or compiled, and no language server or compiler has to be installed or running.

Try it on your repo.

npx graph-indexer init
Using Claude Code? Install the plugin