Skip to content

Installation

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.

Terminal window
brew tap xberg-io/homebrew-tap
brew install xberg-io/homebrew-tap/ts-pack
Verify
ts-pack --version
ts-pack list | wc -l # → 306

The CLI bundles an MCP server for AI agents:

Terminal window
ts-pack mcp

See the MCP Server guide for integration with Claude Code, Cursor, VS Code, and other tools.


Tree-sitter-language-pack is available for every major ecosystem. All packages share the same version and API surface.


Requires Python 3.10+.

Terminal window
pip install tree-sitter-language-pack

Verify:

import tree_sitter_language_pack as tslp
print(tslp.language_count()) # 306

Requires Node.js 18+. Pre-built binaries for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64).

Terminal window
npm install @xberg-io/tree-sitter-language-pack

Verify:

const tslp = require("@xberg-io/tree-sitter-language-pack");
console.log(tslp.languageCount()); // 306

Requires Rust 1.85+.

Terminal window
cargo add tree-sitter-language-pack

Verify:

fn main() {
println!("{}", tree_sitter_language_pack::language_count()); // 306
}

Requires Go 1.26+. The binding uses cgo and links against the pre-compiled C FFI library.

Terminal window
go get github.com/xberg-io/tree-sitter-language-pack/packages/go
import tslp "github.com/xberg-io/tree-sitter-language-pack/packages/go"
func main() {
fmt.Println(tslp.LanguageCount()) // 306
}

Requires JDK 25+ (uses Panama FFM API).

<dependency>
<groupId>io.xberg.treesitterlanguagepack</groupId>
<artifactId>tree-sitter-language-pack</artifactId>
<version>1.12.5</version>
</dependency>

Verify:

import io.xberg.treesitterlanguagepack.TreeSitterLanguagePack;
public class Main {
public static void main(String[] args) {
System.out.println(TreeSitterLanguagePack.languageCount()); // 306
}
}

Requires .NET 10.

Terminal window
dotnet add package XbergIo.TreeSitterLanguagePack --version 1.12.5

Verify:

using TreeSitterLanguagePack;
Console.WriteLine(TreeSitterLanguagePackConverter.LanguageCount()); // 306

The NuGet package includes native runtime assets for Windows, Linux, and macOS.


Requires Ruby 3.2+.

Terminal window
gem install tree_sitter_language_pack

Verify:

require "tree_sitter_language_pack"
puts TreeSitterLanguagePack.language_count # 306

Requires Elixir 1.14+ and OTP 25+.

defp deps do
[
{:tree_sitter_language_pack, "~> 1.9"}
]
end
Terminal window
mix deps.get

Verify:

IO.puts TreeSitterLanguagePack.language_count() # 306

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:

Terminal window
composer require mlocati/php-extension-installer
Terminal window
composer require xberg-io/tree-sitter-language-pack

Verify:

<?php
echo \ts_pack_language_count(); // 306

Requires Dart 3.11+.

Terminal window
dart pub add tree_sitter_language_pack

Requires Android minSdk 21 and Java 17 bytecode.

implementation("io.xberg.tslp.android:tree-sitter-language-pack-android:1.12.5")

This is an Android AAR. Kotlin/JVM users should use the Java artifact.


Requires Swift 6.0+.

.package(
url: "https://github.com/xberg-io/tree-sitter-language-pack",
exact: "1.12.5"
)

Requires Zig 0.16+.

Terminal window
zig fetch --save <release tarball url>

The package name is tree_sitter_language_pack.


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.


Use from any JavaScript environment — browsers, Deno, and Cloudflare Workers.

Terminal window
npm install @xberg-io/tree-sitter-language-pack-wasm

The WASM package is a static curated subset of parsers compiled into the module. It does not expose the native download/cache helpers.