Comprehensive tree-sitter grammar compilation with polyglot bindings — Rust, Python, Node.js, Go, Java, Ruby, Elixir, PHP, C#, WASM, Dart, Kotlin-Android, Swift, Zig, and CLI. 371 languages.
See the code
<!-- 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.
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.
| 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 |
This pack includes 371 languages. See the full language list for every supported grammar with extensions and repository links.
Each grammar bundles a subset of the six standard tree-sitter query types. The table below shows which .scm queries ship with every grammar.
⭐ Star this repo to show your support — it helps others discover tree-sitter-language-pack.
go get github.com/xberg-io/tree-sitter-language-pack/packages/go
See Go README for full documentation.
Available on Maven Central as io.xberg.treesitterlanguagepack:tree-sitter-language-pack. See Java README for the dependency snippet and current version.
Add {:tree_sitter_language_pack, "~> 1.0"} to your mix.exs dependencies. See Elixir README for full documentation.
npm install @xberg-io/tree-sitter-language-pack-wasm
See WebAssembly README for full documentation.
Available on Maven Central as io.xberg.tslp.android:tree-sitter-language-pack-android. See Kotlin Android README for the dependency snippet and current version.
Available via Swift Package Manager. See Swift README for the SwiftPM package URL and current version.
Build from source as part of this workspace. See FFI README for full documentation.
cargo install ts-pack-cli
# Or install the prebuilt binary via cargo-binstall:
cargo binstall ts-pack-cli
brew trust xberg-io/tap
brew install xberg-io/tap/ts-pack
Windows users can install the same binary through Scoop:
scoop bucket add xberg https://github.com/xberg-io/scoop-bucket
scoop install ts-pack
Or run without a persistent install (the proxy package fetches the native binary):
npx @xberg-io/ts-pack-cli parse <file>
uvx --from ts-pack-cli ts-pack parse <file>
See CLI README for full documentation.
The CLI bundles an MCP server for integration with AI agents. Start it with:
ts-pack mcp
The server runs over stdio by default. For HTTP transport:
ts-pack mcp --transport http --host 127.0.0.1 --port 8011
Register with Claude Code:
claude mcp add tree-sitter-language-pack -- ts-pack mcp --transport stdio
Or add to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"tree-sitter-language-pack": {
"command": "ts-pack",
"args": ["mcp", "--transport", "stdio"]
}
}
}
The MCP server exposes 8 tools: parse, process, detect_language, list_languages, info, download, cache_dir, and clean_cache. It also provides resources for the available language catalog and a prompt for code analysis.
The marketplace plugin from xberg-io/tree-sitter-language-pack auto-registers the server — see AI Coding Assistants below to install it instead of manual registration.
For detailed setup, transport options, and tool reference, see the MCP Server guide.
Install the tree-sitter-language-pack plugin from xberg-io/tree-sitter-language-pack. It ships the tree-sitter-language-pack agent skills (parse and extract code intelligence from 371 languages) and works with every major coding agent — expand your harness below.
/plugin marketplace add xberg-io/tree-sitter-language-pack
/plugin install tree-sitter-language-pack@tree-sitter-language-pack
/plugins add https://github.com/xberg-io/tree-sitter-language-pack
Then search for tree-sitter-language-pack and select Install Plugin.
Settings → Plugins → Add from URL → https://github.com/xberg-io/tree-sitter-language-pack, then select tree-sitter-language-pack.
gemini extensions install https://github.com/xberg-io/tree-sitter-language-pack
droid plugin marketplace add https://github.com/xberg-io/tree-sitter-language-pack
droid plugin install tree-sitter-language-pack@tree-sitter-language-pack
copilot plugin marketplace add https://github.com/xberg-io/tree-sitter-language-pack
copilot plugin install tree-sitter-language-pack@tree-sitter-language-pack
Add the package to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@xberg-io/opencode-tree-sitter-language-pack"]
}
Full guides, the host-native language API, data extraction, the CLI and MCP server, and the complete language list live at docs.tree-sitter-language-pack.xberg.io.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Join our Discord community for questions and discussion.
MIT — see LICENSE for details.
All included tree-sitter grammars are permissively licensed (MIT, Apache-2.0, BSD, ISC, or similar). Copyleft licenses (GPL, AGPL, LGPL, MPL) are not accepted. See CONTRIBUTING.md for grammar inclusion criteria.
(top 30 of 50)
Rust
62.6%
Python
10.0%
JavaScript
6.4%
C
5.6%
MDX
5.5%
PHP
2.3%
Shell
2.2%
Tree-sitter Query
1.6%
Comprehensive tree-sitter grammar compilation with polyglot bindings — Rust, Python, Node.js, Go, Java, Ruby, Elixir, PHP, C#, WASM, Dart, Kotlin-Android, Swift, Zig, and CLI. 371 languages.
See the code
<!-- 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.
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.
| 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 |
This pack includes 371 languages. See the full language list for every supported grammar with extensions and repository links.
Each grammar bundles a subset of the six standard tree-sitter query types. The table below shows which .scm queries ship with every grammar.
⭐ Star this repo to show your support — it helps others discover tree-sitter-language-pack.
go get github.com/xberg-io/tree-sitter-language-pack/packages/go
See Go README for full documentation.
Available on Maven Central as io.xberg.treesitterlanguagepack:tree-sitter-language-pack. See Java README for the dependency snippet and current version.
Add {:tree_sitter_language_pack, "~> 1.0"} to your mix.exs dependencies. See Elixir README for full documentation.
npm install @xberg-io/tree-sitter-language-pack-wasm
See WebAssembly README for full documentation.
Available on Maven Central as io.xberg.tslp.android:tree-sitter-language-pack-android. See Kotlin Android README for the dependency snippet and current version.
Available via Swift Package Manager. See Swift README for the SwiftPM package URL and current version.
Build from source as part of this workspace. See FFI README for full documentation.
cargo install ts-pack-cli
# Or install the prebuilt binary via cargo-binstall:
cargo binstall ts-pack-cli
brew trust xberg-io/tap
brew install xberg-io/tap/ts-pack
Windows users can install the same binary through Scoop:
scoop bucket add xberg https://github.com/xberg-io/scoop-bucket
scoop install ts-pack
Or run without a persistent install (the proxy package fetches the native binary):
npx @xberg-io/ts-pack-cli parse <file>
uvx --from ts-pack-cli ts-pack parse <file>
See CLI README for full documentation.
The CLI bundles an MCP server for integration with AI agents. Start it with:
ts-pack mcp
The server runs over stdio by default. For HTTP transport:
ts-pack mcp --transport http --host 127.0.0.1 --port 8011
Register with Claude Code:
claude mcp add tree-sitter-language-pack -- ts-pack mcp --transport stdio
Or add to your Claude Desktop config at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"tree-sitter-language-pack": {
"command": "ts-pack",
"args": ["mcp", "--transport", "stdio"]
}
}
}
The MCP server exposes 8 tools: parse, process, detect_language, list_languages, info, download, cache_dir, and clean_cache. It also provides resources for the available language catalog and a prompt for code analysis.
The marketplace plugin from xberg-io/tree-sitter-language-pack auto-registers the server — see AI Coding Assistants below to install it instead of manual registration.
For detailed setup, transport options, and tool reference, see the MCP Server guide.
Install the tree-sitter-language-pack plugin from xberg-io/tree-sitter-language-pack. It ships the tree-sitter-language-pack agent skills (parse and extract code intelligence from 371 languages) and works with every major coding agent — expand your harness below.
/plugin marketplace add xberg-io/tree-sitter-language-pack
/plugin install tree-sitter-language-pack@tree-sitter-language-pack
/plugins add https://github.com/xberg-io/tree-sitter-language-pack
Then search for tree-sitter-language-pack and select Install Plugin.
Settings → Plugins → Add from URL → https://github.com/xberg-io/tree-sitter-language-pack, then select tree-sitter-language-pack.
gemini extensions install https://github.com/xberg-io/tree-sitter-language-pack
droid plugin marketplace add https://github.com/xberg-io/tree-sitter-language-pack
droid plugin install tree-sitter-language-pack@tree-sitter-language-pack
copilot plugin marketplace add https://github.com/xberg-io/tree-sitter-language-pack
copilot plugin install tree-sitter-language-pack@tree-sitter-language-pack
Add the package to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@xberg-io/opencode-tree-sitter-language-pack"]
}
Full guides, the host-native language API, data extraction, the CLI and MCP server, and the complete language list live at docs.tree-sitter-language-pack.xberg.io.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Join our Discord community for questions and discussion.
MIT — see LICENSE for details.
All included tree-sitter grammars are permissively licensed (MIT, Apache-2.0, BSD, ISC, or similar). Copyleft licenses (GPL, AGPL, LGPL, MPL) are not accepted. See CONTRIBUTING.md for grammar inclusion criteria.
(top 30 of 50)
Rust
62.6%
Python
10.0%
JavaScript
6.4%
C
5.6%
MDX
5.5%
PHP
2.3%
Shell
2.2%
Tree-sitter Query
1.6%