A long-lived project that still receives updates
197 pre-compiled tree-sitter language parsers with Ruby bindings via Magnus native extensions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 0.9
 Project Readme

tree-sitter-language-pack

Banner

A comprehensive collection of tree-sitter language parsers with polyglot bindings

Overview

tree-sitter-language-pack bundles 248+ 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.

Architecture

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

Quick Start

Rust

cargo add ts-pack-core

See Rust README for full documentation.

Python

pip install tree-sitter-language-pack
uv add tree-sitter-language-pack

See Python README for full documentation.

Node.js

npm install @kreuzberg/tree-sitter-language-pack
pnpm add @kreuzberg/tree-sitter-language-pack
yarn add @kreuzberg/tree-sitter-language-pack

See Node.js README for full documentation.

Go

go get github.com/kreuzberg-dev/tree-sitter-language-pack/packages/go/v1

See Go README for full documentation.

Java

<dependency>
  <groupId>dev.kreuzberg</groupId>
  <artifactId>tree-sitter-language-pack</artifactId>
  <version>1.4.1</version>
</dependency>
implementation("dev.kreuzberg:tree-sitter-language-pack:1.4.1")

See Java README for full documentation.

Elixir

{:tree_sitter_language_pack, "~> 1.0"}

See Elixir README for full documentation.

Ruby

gem install tree_sitter_language_pack

See Ruby README for full documentation.

WebAssembly

npm install @kreuzberg/tree-sitter-language-pack-wasm
pnpm add @kreuzberg/tree-sitter-language-pack-wasm
yarn add @kreuzberg/tree-sitter-language-pack-wasm

See WebAssembly README for full documentation.

PHP

composer require kreuzberg/tree-sitter-language-pack

See PHP README for full documentation.

.NET (C#)

dotnet add package TreeSitterLanguagePack

See .NET (C#) README for full documentation.

C/C++ (FFI)

Build from source as part of this workspace.

See C/C++ (FFI) README for full documentation.

CLI

cargo install ts-pack

See CLI README for full documentation.

Core API

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.

Features

Feature Description
248+ Languages Pre-compiled parsers for 248+ 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
Feature Groups Curated language sets: web, systems, scripting, data, jvm, functional

Supported Languages

This pack includes 248+ languages. See the full language list for all supported grammars with extensions and repository links.

Package READMEs

  • Rust -- Rust core library providing access to 248 tree-sitter parsers with on-demand download and caching support.
  • Python -- Python bindings for tree-sitter-language-pack, providing access to 248 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 248 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.

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Join our Discord community for questions and discussion.

License

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.