A comprehensive collection of tree-sitter language parsers with polyglot bindings
tree-sitter-language-pack bundles 305+ tree-sitter language parsers into a single package with native bindings for multiple programming languages. Ship syntax analysis in your application without managing individual parser dependencies.
tree-sitter-language-pack/
├── crates/
│ ├── ts-pack-core/ # Rust core library
│ ├── ts-pack-python/ # Python (maturin/PyO3) bindings
│ ├── ts-pack-node/ # Node.js (NAPI-RS) bindings
│ ├── ts-pack-java/ # Java (Panama FFI) bindings
│ ├── ts-pack-elixir/ # Elixir (Rustler NIF) bindings
│ ├── ts-pack-ffi/ # C-compatible FFI library
│ └── ts-pack-cli/ # CLI tool
├── packages/
│ └── go/v1/ # Go (cgo) bindings
├── grammars/ # Tree-sitter grammar sources
└── scripts/ # Build and maintenance scripts
cargo add ts-pack-coreSee Rust README for full documentation.
pip install tree-sitter-language-packuv add tree-sitter-language-packSee Python README for full documentation.
npm install @kreuzberg/tree-sitter-language-packpnpm add @kreuzberg/tree-sitter-language-packyarn add @kreuzberg/tree-sitter-language-packSee Node.js README for full documentation.
go get github.com/kreuzberg-dev/tree-sitter-language-pack/packages/goSee Go README for full documentation.
<dependency>
<groupId>dev.kreuzberg</groupId>
<artifactId>tree-sitter-language-pack</artifactId>
<version>1.6.2</version>
</dependency>implementation("dev.kreuzberg:tree-sitter-language-pack:1.6.2")See Java README for full documentation.
{:tree_sitter_language_pack, "~> 1.0"}See Elixir README for full documentation.
gem install tree_sitter_language_packSee Ruby README for full documentation.
npm install @kreuzberg/tree-sitter-language-pack-wasmpnpm add @kreuzberg/tree-sitter-language-pack-wasmyarn add @kreuzberg/tree-sitter-language-pack-wasmSee WebAssembly README for full documentation.
composer require kreuzberg/tree-sitter-language-packSee PHP README for full documentation.
dotnet add package TreeSitterLanguagePackSee .NET (C#) README for full documentation.
Build from source as part of this workspace.
See C/C++ (FFI) README for full documentation.
cargo install ts-packSee CLI README for full documentation.
All bindings expose a unified process() function for extracting structured intelligence from source code:
| Language | Function |
|---|---|
| Rust | ts_pack_core::process(source, &config) |
| Python | process(source, ProcessConfig(...)) |
| Node.js | process(source, { language: '...' }) |
| Go | registry.Process(source, config) |
| Java | registry.process(source, configJson) |
| Ruby | TreeSitterLanguagePack.process(source, configJson) |
| Elixir | TreeSitterLanguagePack.process(source, configJson) |
| WASM | process(source, { language: '...' }) |
| C FFI | ts_pack_process(registry, source, len, configJson) |
The process() function returns structured analysis including functions, classes, imports, comments, and optionally chunked source segments.
| Feature | Description |
|---|---|
| 305+ Languages | Pre-compiled parsers for 305+ programming languages |
| On-Demand Downloads | Parsers are downloaded on-demand and cached locally for fast reuse |
| Selective Installation | Download only the languages you need; unused parsers never downloaded |
| Polyglot Bindings | Native bindings for Rust, Python, Node.js, Go, Java, Elixir, and C/C++ |
| Automatic Caching | Downloaded parsers cached in platform-specific directories for offline use |
| CLI Tool | ts-pack download to pre-download parsers for offline/CI/Docker use |
This pack includes 305+ languages. See the full language list for all supported grammars with extensions and repository links.
- Rust -- Rust core library providing access to 305 tree-sitter parsers with on-demand download and caching support.
- Python -- Python bindings for tree-sitter-language-pack, providing access to 305 pre-compiled tree-sitter parsers with on-demand downloads.
- Node.js -- Node.js NAPI bindings for tree-sitter-language-pack with on-demand parser downloads.
- Go -- Go bindings for tree-sitter-language-pack with on-demand parser caching.
- Java -- Java bindings for tree-sitter-language-pack with on-demand parser downloads (JDK 22+).
- Elixir -- Elixir bindings for tree-sitter-language-pack with on-demand parser downloads.
- Ruby -- Ruby bindings for tree-sitter-language-pack with on-demand parser downloads.
- WebAssembly -- WebAssembly bindings for tree-sitter-language-pack. Includes a curated subset of 30 languages optimized for browser and edge runtimes. For all 305 languages, use native bindings (Python, Node.js, etc.).
- PHP -- PHP extension via ext-php-rs with on-demand parser downloads.
- .NET (C#) -- .NET P/Invoke bindings with on-demand parser downloads.
- C/C++ (FFI) -- C-compatible FFI bindings for tree-sitter-language-pack. Use from any language with C interop.
- CLI -- Command-line tool for managing tree-sitter language parsers with download utilities.
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.
