tree-sitter-language-pack
Precompiled tree-sitter parsers and queries for 306+ languages in one install
Repository Health
Technical Analysis
tree-sitter-language-pack is a comprehensive bundle of tree-sitter grammars that gives Python a single dependency for parsing source code in over 306 programming languages. Instead of installing and compiling dozens of individual grammar packages, you get precompiled parsers and syntax-highlighting queries ready to use out of the box.
It exposes helpers to fetch a Language and a Parser for any supported language by name, so you can build syntax trees and run tree-sitter queries across a huge range of languages with a consistent API. The project is polyglot at its core, shipping the same grammar compilation to Rust, Node.js, Go, and other ecosystems.
What You Get
- Precompiled tree-sitter parsers for 306+ programming and markup languages
- Bundled highlight, injection, and locals query files for supported languages
- Helpers to fetch a Parser or Language by name with one call
- A single Python dependency instead of dozens of separate grammar packages
- Consistent binding APIs across Python, Rust, Node.js, Go, and more
Common Use Cases
- Parsing source code into syntax trees for analysis tools
- Running tree-sitter queries to extract functions, symbols, or structure
- Powering syntax highlighting across many languages
- Building linters, code search, or refactoring tools that span multiple languages
Under The Hood
Architecture - The project is a large polyglot monorepo (Cargo, pnpm, go.work, composer, Swift) that compiles a curated set of upstream tree-sitter grammars into distributable bindings for many languages. For Python, it ships precompiled parser binaries plus bundled query files (highlights, injections, locals) sourced from grammar repositories and query-overlays, exposed through a thin API that maps a language name to a compiled Language and Parser.
Tech Stack - Core grammar compilation is done in Rust (crates/, Cargo), with per-ecosystem packaging under packages/ and bindings/. The Python distribution is built via pyproject.toml and wraps the shared C/Rust grammar artifacts through the tree-sitter runtime.
Code Quality - The repo is actively maintained with CI, an e2e/ test suite, fixtures, deny.toml for dependency auditing, contribution docs, and a CHANGELOG, reflecting disciplined upkeep across many language targets.
API Design - For consumers the API is intentionally tiny: request a parser or language by string name and immediately start parsing, with query files available for highlighting. This hides the complexity of grammar compilation and versioning behind one dependency and a couple of helper calls.
Used by 2 apps in this directory
headroom
AI Development · Developer Tools
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.
OpenHands
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.