Skip to main content

Comprehensive collection of 305 tree-sitter language parsers with polyglot bindings

Project description

tree-sitter-language-pack

Banner

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

Overview

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.

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

See Go README for full documentation.

Java

<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.

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
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

Supported Languages

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

Package READMEs

  • 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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_language_pack-1.6.3-cp314-cp314-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tree_sitter_language_pack-1.6.3-cp312-cp312-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.12Windows x86-64

tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

File details

Details for the file tree_sitter_language_pack-1.6.3-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-1.6.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 da51e84f2730ca0f0c2b57777144d847be03ae7f352e0fd766a2e70e579017e2
MD5 954c4b8b733d0a6274faa09d2b30b46d
BLAKE2b-256 e13922c9be89d979e04b9a5cdd5682e39f657edae019edb29c39f24776aff752

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-1.6.3-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yaml on kreuzberg-dev/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-1.6.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-1.6.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ef0a59ba2079014f42ce520dd8ba13881217b6cfea67e435dc6ca9149dd88577
MD5 a4aa2a694b95fe6ee9ae67de7e04ee43
BLAKE2b-256 e3650ff59bdebf55c62adea01a64aad5c3aef70b592d164778a7876826df81b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-1.6.3-cp312-cp312-win_amd64.whl:

Publisher: publish.yaml on kreuzberg-dev/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c6d6919a595ffa8e01fe4a1352ac0812e88c292554c06417973dcc1176af4218
MD5 15385fc95c22199e01e999f36517161a
BLAKE2b-256 22bbe01aeb0385d920ace5debcdf4646054ad5d2d3dae48950e02f049c9bf23d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish.yaml on kreuzberg-dev/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 9b85e7ef77d7d31977d4256ea3678994ad6ae6c706988f83242ae3fc83af09c3
MD5 25863ea4f80c647d5e273865583489a5
BLAKE2b-256 351247449677da123ba3b6f9fe156d714490880a4a43d1f5846c1e0817e2eebd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_sitter_language_pack-1.6.3-cp312-cp312-manylinux_2_34_aarch64.whl:

Publisher: publish.yaml on kreuzberg-dev/tree-sitter-language-pack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page