tree-sitter-language-pack

Precompiled tree-sitter parsers and queries for 306+ languages in one install

Library
PyPI
v1.14.3
459stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
88/100Excellent
Development Activity100
Maintenance100
Community68
Maturity44
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture85
Code Quality84
Innovation82
Learning Curve80

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.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search