🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

tree-sitter-language-pack

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-language-pack

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

pipPyPI
Version
0.11.0
Maintainers
1

tree-sitter-language-pack

Rust Python Node Wasm Java Go Csharp Php Ruby Elixir Docker Ffi CI License Homebrew Docs
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:

LanguageFunction
Rustts_pack_core::process(source, &config)
Pythonprocess(source, ProcessConfig(...))
Node.jsprocess(source, { language: '...' })
Goregistry.Process(source, config)
Javaregistry.process(source, configJson)
RubyTreeSitterLanguagePack.process(source, configJson)
ElixirTreeSitterLanguagePack.process(source, configJson)
WASMprocess(source, { language: '...' })
C FFIts_pack_process(registry, source, len, configJson)

The process() function returns structured analysis including functions, classes, imports, comments, and optionally chunked source segments.

Features

FeatureDescription
305+ LanguagesPre-compiled parsers for 305+ programming languages
On-Demand DownloadsParsers are downloaded on-demand and cached locally for fast reuse
Selective InstallationDownload only the languages you need; unused parsers never downloaded
Polyglot BindingsNative bindings for Rust, Python, Node.js, Go, Java, Elixir, and C/C++
Automatic CachingDownloaded parsers cached in platform-specific directories for offline use
CLI Toolts-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.

Keywords

ast

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts