Installation
Install using the CLI¶
The ts-pack CLI allows you to manage parsers and run code analysis directly from your terminal.
You can use it in CI pipelines, automation scripts, or to explore and experiment with 306 supported languages Available by v1.9.
CLI Homebrew bundles available by v1.9¶
Language Bindings¶
Tree-sitter-language-pack is available for every major ecosystem. All packages share the same version and API surface.
Python¶
Requires Python 3.10+.
Verify:
Node.js¶
Requires Node.js 18+. Pre-built binaries for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64).
Verify:
const tslp = require("@kreuzberg/tree-sitter-language-pack");
console.log(tslp.languageCount()); // 306
Rust¶
Requires Rust 1.85+.
Verify:
Go¶
Requires Go 1.26+. The binding uses cgo and links against the pre-compiled C FFI library.
import tslp "github.com/kreuzberg-dev/tree-sitter-language-pack/packages/go"
func main() {
fmt.Println(tslp.LanguageCount()) // 306
}
Java¶
Requires JDK 25+ (uses Panama FFM API).
Verify:
import dev.kreuzberg.treesitterlanguagepack.TreeSitterLanguagePack;
public class Main {
public static void main(String[] args) {
System.out.println(TreeSitterLanguagePack.languageCount()); // 306
}
}
C# Available by v1.9¶
Requires .NET 10.
Verify:
using TreeSitterLanguagePack;
Console.WriteLine(TreeSitterLanguagePackConverter.LanguageCount()); // 306
The NuGet package includes native runtime assets for Windows, Linux, and macOS.
Ruby¶
Requires Ruby 3.2+.
Verify:
Elixir¶
Requires Elixir 1.14+ and OTP 25+.
Verify:
PHP¶
Requires PHP 8.2+. This package is a native PHP extension (type: php-ext). Install
mlocati/php-extension-installer first
so Composer can download and register the compiled .so/.dll:
Verify:
Dart¶
Requires Dart 3.11+.
Kotlin Android Available by v1.9¶
Requires Android minSdk 21 and Java 17 bytecode.
This is an Android AAR. Kotlin/JVM users should use the Java artifact.
Swift¶
Requires Swift 6.0+.
Zig¶
Requires Zig 0.16+.
The package name is tree_sitter_language_pack.
C FFI¶
Download the shared library and generated C header from GitHub Releases. The C FFI is the stable native contract used by the generated native packages.
WebAssembly¶
Use from any JavaScript environment — browsers, Deno, and Cloudflare Workers.
The WASM package is a static curated subset of parsers compiled into the module. It does not expose the native download/cache helpers.
Next Steps¶
- Quick Start — parse your first file in 5 minutes
- Download parsers — pre-download grammars for production, CI, or offline use
- Download model — understand how parser caching works
- Languages — full list of 306 supported languages