PHPackages                             kreuzberg/tree-sitter-language-pack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. kreuzberg/tree-sitter-language-pack

ActivePhp-ext[Parsing &amp; Serialization](/categories/parsing)

kreuzberg/tree-sitter-language-pack
===================================

Pre-compiled tree-sitter grammars for 305 programming languages

1.8.1(1mo ago)408063[4 issues](https://github.com/kreuzberg-dev/tree-sitter-language-pack/issues)[1 PRs](https://github.com/kreuzberg-dev/tree-sitter-language-pack/pulls)MITRustPHP ^8.4CI failing

Since Mar 16Pushed 2d ago5 watchersCompare

[ Source](https://github.com/kreuzberg-dev/tree-sitter-language-pack)[ Packagist](https://packagist.org/packages/kreuzberg/tree-sitter-language-pack)[ Docs](https://github.com/kreuzberg-dev/tree-sitter-language-pack)[ RSS](/packages/kreuzberg-tree-sitter-language-pack/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (90)Used By (0)

tree-sitter-language-pack
=========================

[](#tree-sitter-language-pack)

 [ ![Bindings](https://camo.githubusercontent.com/23b2c7873e51d39aafa797a5571f07783c505f083f976594e38024d10eb4e433/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f42696e64696e67732d616c65662532302544372539302d303037656336) ](https://github.com/xberg-io/alef) [ ![Rust](https://camo.githubusercontent.com/6439dc2dc7f40e5141a31f7fe3dac7820f0c3b0aaec0b8ad6e4b10841a18fb6d/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d5275737426636f6c6f723d303037656336) ](https://crates.io/crates/tree-sitter-language-pack) [ ![Python](https://camo.githubusercontent.com/fcee54eb2ed4fcf69714869808473429bfeb072df35e1dc59be38170b414c0be/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d507974686f6e26636f6c6f723d303037656336) ](https://pypi.org/project/tree-sitter-language-pack/) [ ![Node.js](https://camo.githubusercontent.com/81bef43c9f2a91598415d13e6d195144bfc6ab5feec16787aabf1ef7b29812d7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406b7265757a626572672f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d4e6f64652e6a7326636f6c6f723d303037656336) ](https://www.npmjs.com/package/@kreuzberg/tree-sitter-language-pack) [ ![WASM](https://camo.githubusercontent.com/98e391a9bb0c14a7f3f3d3ec3a65b1d6edd8862283801fbb5f27da8465ed1b67/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f406b7265757a626572672f747265652d7369747465722d6c616e67756167652d7061636b2d7761736d3f6c6162656c3d5741534d26636f6c6f723d303037656336) ](https://www.npmjs.com/package/@kreuzberg/tree-sitter-language-pack-wasm) [ ![Java](https://camo.githubusercontent.com/3418d5b72a61c387b23f7875eb8cd227715d44534871c61cbd0bae1f5b77ad8b/68747470733a2f2f696d672e736869656c64732e696f2f6d6176656e2d63656e7472616c2f762f6465762e6b7265757a626572672e747265657369747465726c616e67756167657061636b2f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d4a61766126636f6c6f723d303037656336) ](https://central.sonatype.com/artifact/dev.kreuzberg.treesitterlanguagepack/tree-sitter-language-pack) [ ![Go](https://camo.githubusercontent.com/bc85edbc0aa39c4f915d489bc9d166e31f242948de6fbbe448d396a34fb87e00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f78626572672d696f2f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d476f26636f6c6f723d303037656336) ](https://pkg.go.dev/github.com/xberg-io/tree-sitter-language-pack/packages/go) [ ![C#](https://camo.githubusercontent.com/979792a94ad86f3dfed715715e919e091aec4b30456a3afefdc1d5bad2361ce3/68747470733a2f2f696d672e736869656c64732e696f2f6e756765742f762f547265655369747465724c616e67756167655061636b3f6c6162656c3d4325323326636f6c6f723d303037656336) ](https://www.nuget.org/packages/TreeSitterLanguagePack/) [ ![PHP](https://camo.githubusercontent.com/260ed00c34a10c4962f64ad82d42a22d9d72c332a2ab9d8fd3db3d60ad516043/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78626572672d696f2f747265652d7369747465722d6c616e67756167652d7061636b3f6c6162656c3d50485026636f6c6f723d303037656336) ](https://packagist.org/packages/xberg-io/tree-sitter-language-pack) [ ![Ruby](https://camo.githubusercontent.com/0a9e7e25988da785abe43360a8400c8dec50422a9682751a997b902f32b886d0/68747470733a2f2f696d672e736869656c64732e696f2f67656d2f762f747265655f7369747465725f6c616e67756167655f7061636b3f6c6162656c3d5275627926636f6c6f723d303037656336) ](https://rubygems.org/gems/tree_sitter_language_pack) [ ![Elixir](https://camo.githubusercontent.com/097510021c0445fe1e6223ad4e7b21d8f0f6d4d19f1384e3fa0030472a9ab496/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f762f747265655f7369747465725f6c616e67756167655f7061636b3f6c6162656c3d456c6978697226636f6c6f723d303037656336) ](https://hex.pm/packages/tree_sitter_language_pack) [ ![Dart](https://camo.githubusercontent.com/35b01427c1f1031b2a97b99b6209870de48cf9fad3d5aa55243b8ff3711fe1cc/68747470733a2f2f696d672e736869656c64732e696f2f7075622f762f747265655f7369747465725f6c616e67756167655f7061636b3f6c6162656c3d4461727426636f6c6f723d303037656336) ](https://pub.dev/packages/tree_sitter_language_pack) [ ![Kotlin](https://camo.githubusercontent.com/b9552bb78a72cf14ac18bb51dee1bc8cf03c2fd9fa567a2666ebc462e1a9c405/68747470733a2f2f696d672e736869656c64732e696f2f6d6176656e2d63656e7472616c2f762f6465762e6b7265757a626572672e74736c702e616e64726f69642f747265652d7369747465722d6c616e67756167652d7061636b2d616e64726f69643f6c6162656c3d4b6f746c696e26636f6c6f723d303037656336) ](https://central.sonatype.com/artifact/dev.kreuzberg.tslp.android/tree-sitter-language-pack-android) [ ![Swift](https://camo.githubusercontent.com/b8e3c9990c66f8b878644a15e0ffd0fba03df291119bca044b94033c83d27246/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776966742d53504d2d303037656336) ](https://github.com/xberg-io/tree-sitter-language-pack/tree/main/packages/swift) [ ![Zig](https://camo.githubusercontent.com/376558d850c9af32b9d23b0211489a0b5c979af703256fa0b7c3e917bd591c53/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5a69672d7061636b6167652d303037656336) ](https://github.com/xberg-io/tree-sitter-language-pack/tree/main/packages/zig) [ ![C FFI](https://camo.githubusercontent.com/41b9c58c3810775402965a3a7652da9832ea83391c1ff255081e5551900db8f2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f432d4646492d303037656336) ](https://github.com/xberg-io/tree-sitter-language-pack/releases)```

```

 [ ![Join Discord](https://camo.githubusercontent.com/c3d59355bb5f7fc8224936ba897a06b87e5ba6f52bd08dfd2f7f78bf669c550d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d436861742d3030376563363f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465) ](https://discord.gg/xt9WY3GnKR)

A comprehensive collection of tree-sitter language parsers with polyglot bindings — 306 languages, one Rust core, downloaded on demand.

What and Why?
-------------

[](#what-and-why)

[tree-sitter](https://tree-sitter.github.io/tree-sitter/) generates fast, incremental parsers from grammars for any programming language. As agentic tooling makes processing, inspecting, and analyzing code ever more critical, tree-sitter-language-pack bundles the most comprehensive collection of grammars available behind a single API.

The core is written in Rust with polyglot bindings for 15 other languages, plus a CLI and MCP server for working with code from the shell. Grammars are built into multi-platform binaries and downloaded on demand, so the package stays small while offering 300+ parsers.

### Features

[](#features)

FeatureDescription**306 languages**Pre-compiled parsers at ABI 14 (backwards compatible with tree-sitter 0.21–0.26)**Code intelligence**Extract functions, classes, imports, docstrings, and symbols from source**Data extraction**Hierarchical key-value trees from 17 config/data formats (JSON, YAML, TOML, XML, CSV, …)**Host-native language API**`get_language()` returns native `Language` objects in Python, Node.js, Go, Java, C#, Kotlin, Swift, Zig, and C**On-demand downloads**Parsers are fetched on first use and cached locally for fast, offline reuse**Selective installation**Download only the languages you need; unused parsers are never downloaded**Polyglot bindings**Native bindings across 15 languages plus a C ABI for everything else**CLI &amp; MCP server**`ts-pack download` to pre-fetch parsers; MCP integration for AI agents### Supported Languages

[](#supported-languages)

This pack includes 306 languages. See the [full language list](docs/languages.md) for every supported grammar with extensions and repository links.

 [ ![Star tree-sitter-language-pack on GitHub](docs/assets/star.gif) ](https://github.com/xberg-io/tree-sitter-language-pack/stargazers)

**⭐ Star this repo to show your support — it helps others discover tree-sitter-language-pack.**

Quick Start
-----------

[](#quick-start)

### Language Packages

[](#language-packages)

**Rust**```
cargo add tree-sitter-language-pack
```

See [Rust README](crates/ts-pack-core/README.md) for full documentation.

**Python**```
pip install tree-sitter-language-pack
```

See [Python README](packages/python/README.md) for full documentation.

**Node.js**```
npm install @kreuzberg/tree-sitter-language-pack
```

See [Node.js README](crates/ts-pack-core-node/README.md) for full documentation.

**Go**```
go get github.com/xberg-io/tree-sitter-language-pack/packages/go
```

See [Go README](packages/go/README.md) for full documentation.

**Java**Available on Maven Central as `dev.kreuzberg.treesitterlanguagepack:tree-sitter-language-pack`. See [Java README](packages/java/README.md) for the dependency snippet and current version.

**C#**```
dotnet add package TreeSitterLanguagePack
```

See [.NET README](packages/csharp/README.md) for full documentation.

**Ruby**```
gem install tree_sitter_language_pack
```

See [Ruby README](packages/ruby/README.md) for full documentation.

**PHP**```
composer require xberg-io/tree-sitter-language-pack
```

See [PHP README](packages/php/README.md) for full documentation.

**Elixir**Add `{:tree_sitter_language_pack, "~> 1.0"}` to your `mix.exs` dependencies. See [Elixir README](packages/elixir/README.md) for full documentation.

**WebAssembly**```
npm install @kreuzberg/tree-sitter-language-pack-wasm
```

See [WebAssembly README](crates/ts-pack-core-wasm/README.md) for full documentation.

**C/C++ (FFI)**Build from source as part of this workspace. See [FFI README](crates/ts-pack-core-ffi/README.md) for full documentation.

**CLI**```
cargo install ts-pack-cli
```

```
brew install xberg-io/tap/ts-pack
```

Or run without a persistent install (the proxy package fetches the native binary):

```
npx @kreuzberg/ts-pack-cli parse
uvx --from ts-pack-cli ts-pack parse
```

See [CLI README](crates/ts-pack-cli/README.md) for full documentation.

**MCP Server**The CLI bundles an MCP server for integration with AI agents. Start it with:

```
ts-pack mcp
```

The server runs over stdio by default. For HTTP transport:

```
ts-pack mcp --transport http --host 127.0.0.1 --port 8011
```

Register with Claude Code:

```
claude mcp add ts-pack -- ts-pack mcp
```

Or add to your Claude Desktop config at `~/Library/Application Support/Claude/claude_desktop_config.json`:

```
{
  "mcpServers": {
    "ts-pack": {
      "command": "ts-pack",
      "args": ["mcp"]
    }
  }
}
```

The MCP server exposes 8 tools: `parse`, `process`, `detect_language`, `list_languages`, `info`, `download`, `cache_dir`, and `clean_cache`. It also provides resources for the available language catalog and a prompt for code analysis.

The marketplace plugin from [`xberg-io/plugins`](https://github.com/xberg-io/plugins) auto-registers the server — see [AI Coding Assistants](#ai-coding-assistants) below to install it instead of manual registration.

For detailed setup, transport options, and tool reference, see the [MCP Server guide](https://docs.tree-sitter-language-pack.xberg.io/guides/mcp-server/).

### AI Coding Assistants

[](#ai-coding-assistants)

Install the tree-sitter-language-pack plugin from the [`xberg-io/plugins`](https://github.com/xberg-io/plugins) marketplace. It ships the tree-sitter-language-pack agent skills (parse and extract code intelligence from 300+ languages) and works with every major coding agent — expand your harness below.

**Claude Code**```
/plugin marketplace add xberg-io/plugins
/plugin install tree-sitter-language-pack@kreuzberg

```

**Codex CLI**```
/plugins add https://github.com/xberg-io/plugins

```

Then search for `tree-sitter-language-pack` and select **Install Plugin**.

**Cursor**Settings → Plugins → Add from URL → `https://github.com/xberg-io/plugins`, then select **tree-sitter-language-pack**.

**Gemini CLI**```
gemini extensions install https://github.com/xberg-io/plugins

```

**Factory Droid**```
droid plugin marketplace add https://github.com/xberg-io/plugins
droid plugin install tree-sitter-language-pack@kreuzberg

```

**GitHub Copilot CLI**```
copilot plugin marketplace add https://github.com/xberg-io/plugins
copilot plugin install tree-sitter-language-pack@kreuzberg

```

**opencode**Add the package to `opencode.json`:

```
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@kreuzberg/opencode-tree-sitter-language-pack"]
}
```

Documentation
-------------

[](#documentation)

Full guides, the host-native language API, data extraction, the CLI and MCP server, and the complete language list live at **[docs.tree-sitter-language-pack.xberg.io](https://docs.tree-sitter-language-pack.xberg.io)**.

Part of Kreuzberg.dev
---------------------

[](#part-of-kreuzbergdev)

- [Kreuzberg](https://github.com/xberg-io/kreuzberg) — document intelligence: text, tables, metadata from 91+ formats with optional OCR.
- [Xberg Enterprise](https://github.com/xberg-io/xberg-enterprise) — managed extraction API with SDKs, dashboards, and observability.
- [kreuzcrawl](https://github.com/xberg-io/kreuzcrawl) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
- [html-to-markdown](https://github.com/xberg-io/html-to-markdown) — fast, lossless HTML→Markdown engine.
- [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 143 providers.
- [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
- [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.

Contributing
------------

[](#contributing)

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

Join our [Discord community](https://discord.gg/xt9WY3GnKR) for questions and discussion.

License
-------

[](#license)

MIT — see [LICENSE](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](CONTRIBUTING.md) for grammar inclusion criteria.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance96

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 92.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

85

Last Release

33d ago

PHP version history (2 changes)1.0.0-rc.1PHP ^8.4

v1.9.0-rc.4PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/30733348?v=4)[Na'aman Hirschfeld](/maintainers/Goldziher)[@Goldziher](https://github.com/Goldziher)

---

Top Contributors

[![Goldziher](https://avatars.githubusercontent.com/u/30733348?v=4)](https://github.com/Goldziher "Goldziher (1214 commits)")[![grantjenks](https://avatars.githubusercontent.com/u/118304?v=4)](https://github.com/grantjenks "grantjenks (24 commits)")[![cleiton-kiper-tm](https://avatars.githubusercontent.com/u/76437129?v=4)](https://github.com/cleiton-kiper-tm "cleiton-kiper-tm (8 commits)")[![tancnle](https://avatars.githubusercontent.com/u/756722?v=4)](https://github.com/tancnle "tancnle (6 commits)")[![talshef](https://avatars.githubusercontent.com/u/20249378?v=4)](https://github.com/talshef "talshef (6 commits)")[![Akuli](https://avatars.githubusercontent.com/u/18505570?v=4)](https://github.com/Akuli "Akuli (6 commits)")[![kh3rld](https://avatars.githubusercontent.com/u/171191586?v=4)](https://github.com/kh3rld "kh3rld (6 commits)")[![pratik-mahalle](https://avatars.githubusercontent.com/u/124587957?v=4)](https://github.com/pratik-mahalle "pratik-mahalle (4 commits)")[![IDontHaveBrain](https://avatars.githubusercontent.com/u/3039496?v=4)](https://github.com/IDontHaveBrain "IDontHaveBrain (4 commits)")[![lokkju](https://avatars.githubusercontent.com/u/235371?v=4)](https://github.com/lokkju "lokkju (3 commits)")[![tobocop2](https://avatars.githubusercontent.com/u/5562156?v=4)](https://github.com/tobocop2 "tobocop2 (3 commits)")[![nolanlwin](https://avatars.githubusercontent.com/u/113712250?v=4)](https://github.com/nolanlwin "nolanlwin (3 commits)")[![Zmaroo](https://avatars.githubusercontent.com/u/96015302?v=4)](https://github.com/Zmaroo "Zmaroo (2 commits)")[![Carreau](https://avatars.githubusercontent.com/u/335567?v=4)](https://github.com/Carreau "Carreau (2 commits)")[![gbtb](https://avatars.githubusercontent.com/u/37017396?v=4)](https://github.com/gbtb "gbtb (2 commits)")[![jdanbrown](https://avatars.githubusercontent.com/u/627486?v=4)](https://github.com/jdanbrown "jdanbrown (2 commits)")[![ObserverOfTime](https://avatars.githubusercontent.com/u/24971970?v=4)](https://github.com/ObserverOfTime "ObserverOfTime (2 commits)")[![pboling](https://avatars.githubusercontent.com/u/19505?v=4)](https://github.com/pboling "pboling (2 commits)")[![rahuliyer95](https://avatars.githubusercontent.com/u/4255590?v=4)](https://github.com/rahuliyer95 "rahuliyer95 (2 commits)")[![rynewang](https://avatars.githubusercontent.com/u/56065503?v=4)](https://github.com/rynewang "rynewang (2 commits)")

---

Tags

astc-fficsharpelixirgolanggrammerjavakreuzberglanguage-packnodeparserpolyglotpythonrubyrustsyntaxtree-sitterparserperformancesyntaxcode analysisastphp8rustlanguage packtree-sittercode-intelligence

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kreuzberg-tree-sitter-language-pack/health.svg)

```
[![Health](https://phpackages.com/badges/kreuzberg-tree-sitter-language-pack/health.svg)](https://phpackages.com/packages/kreuzberg-tree-sitter-language-pack)
```

###  Alternatives

[jakubledl/dissect

Lexing and parsing in pure PHP

2234.7M11](/packages/jakubledl-dissect)[tmilos/scim-filter-parser

System for Cross-domain Identity Management SCIM AST filter parser PHP library

111.8M6](/packages/tmilos-scim-filter-parser)[butschster/proto-parser

Proto parser is a library for parsing Protocol Buffers files into AST

581.2k](/packages/butschster-proto-parser)[atanamo/php-codeshift

A PHP code transformation toolkit based on 'PHP-Parser'

32159.6k1](/packages/atanamo-php-codeshift)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
