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 300+ supported languages.
CLI¶
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;
public class Main {
public static void main(String[] args) {
System.out.println(TreeSitterLanguagePack.languageCount()); // 306
}
}
Ruby¶
Requires Ruby 3.2+.
Verify:
Elixir¶
Requires Elixir 1.14+ and OTP 25+.
Verify:
PHP¶
Requires PHP 8.4+. 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:
WebAssembly¶
Use from any JavaScript environment — browsers, Deno, and Cloudflare Workers.
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