tree-sitter-language-pack
<!-- Project Info -->
<a href="https://github.com/xberg-io/tree-sitter-language-pack/blob/main/LICENSE">
<img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License" />
</a>
<a href="https://docs.tree-sitter-language-pack.xberg.io">
<img src="https://img.shields.io/badge/Docs-tree--sitter--language--pack-007ec6" alt="Documentation" />
</a>
Parse and understand source code in 371 languages, from the language you already work in — with one dependency and no grammars to compile.
What and Why?
Add one package and you can parse any of 371 languages, walk their syntax trees, pull out functions, classes, imports, and symbols, and split code into chunks an LLM can use. It works the same whether you call it from Python, Node.js, Go, Java, C#, Ruby, PHP, Elixir, and eight more, or from the shell via the CLI and MCP server.
tree-sitter gives fast, incremental parsers for individual languages, but wiring up hundreds of grammars — and reaching them from a non-C ecosystem — is the hard part. tree-sitter-language-pack does that work for you: it bundles the most comprehensive set of grammars available behind a single API, ships native bindings for 15 languages, and downloads each parser on first use so the install stays small.
Reach for it whenever you need to process, inspect, or analyze code — building developer tooling, feeding a RAG pipeline, or giving an agent structural understanding of a codebase.
Features
| Feature |
Description |
| 371 languages |
Pre-compiled parsers at ABI 14 (backwards compatible with tree-sitter 0.21–0.26) |
| Code intelligence |
Extract functions, classes, imports, docstrings, and symbols from source |
| Data extraction |
Hierarchical key-value trees from 17 config/data formats (JSON, YAML, TOML, XML, CSV, …) |
| Host-native language API |
get_language() returns native Language objects in Python, Node.js, Go, Java, C#, Kotlin, Swift, Zig, and C |
| On-demand downloads |
Parsers are fetched on first use and cached locally for fast, offline reuse |
| Prefetch & warming |
prefetch() loads (and downloads) every grammar you need up front, so hot loops only parse |
| Bundled queries |
highlights, injections, locals, tags, indents, and folds .scm queries per language, with a process-wide compiled-query cache (Rust) |
| Selective installation |
Download only the languages you need; unused parsers are never downloaded |
| Polyglot bindings |
Native bindings across 15 languages, including a C ABI for everything else |
| CLI & MCP server |
ts-pack download to pre-fetch parsers; MCP integration for AI agents |
Supported Languages
This pack includes 371 languages. See the full language list for every supported grammar with extensions and repository links.
Grammars & Bundled Queries
Each grammar bundles a subset of the six standard tree-sitter query types. The table below shows which .scm queries ship with every grammar.