tree-sitter-language-pack
Pre-compiled tree-sitter grammars for 371 programming languages
What it is and what it does
tree-sitter-language-pack wraps the tree-sitter parsing library and bundles pre-compiled grammars for 371 languages behind a single Python API. Instead of managing individual language grammars and compilation, you install this package and call get_language() to receive a ready-to-use parser for any supported language. Parsers are downloaded on first use and cached locally, keeping the initial install small while supporting selective language installation.
The package is designed for code analysis, inspection, and extraction tasks: pulling out functions, classes, imports, and symbols from source; feeding code into RAG pipelines; or giving language models structural understanding of a codebase. It bundles standard tree-sitter query types (highlights, injections, locals, tags, indents, folds) per language and maintains a compiled-query cache. The single runtime dependency is tree-sitter itself, and it supports Python 3.10 through 3.14.
Use it for:
- Extract functions, classes, and imports from source files for code indexing or documentation generation
- Prepare code chunks for retrieval-augmented generation (RAG) systems feeding language models
- Build developer tooling that needs to understand and navigate syntax trees across multiple languages
- Analyze and split large codebases into LLM-digestible pieces for code review or refactoring agents
- Implement syntax-aware code transformations or linting rules without writing language-specific parsers
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides pre-compiled tree-sitter parsers for 371 programming languages, enabling fast syntax tree parsing and code analysis without requiring grammar compilation.
Yes. The package is actively maintained (released 9 days ago), has no known vulnerabilities, uses a permissive MIT license, and solves a real problem—parsing 371 languages without compilation overhead. Medium install friction is acceptable given the breadth of language support and the lean dependency graph. Reach for it whenever you need to process or analyze code structurally.
Install
tree-sitter-language-pack on PyPI
pip
pip install tree-sitter-language-packuv
uv add tree-sitter-language-packpoetry
poetry add tree-sitter-language-packInstalling tree-sitter-language-pack
Before you install
Medium install friction due to platform-specific wheels (macOS, Linux, Windows, ARM variants), but wheels are pre-built and the package has active maintenance with a recent release (9 days old). Single runtime dependency on tree-sitter keeps the dependency graph lean.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects without restriction or obligation to share modifications.
Quickstart
pip install tree-sitter-language-pack
from tree_sitter_language_pack import get_language
lang = get_language('python')
parser = lang.parser()
tree = parser.parse(b'def hello(): pass')
Requires Python 3.10 or later; parsers are downloaded on first use and cached locally.
Verify before relying
- Whether on-demand parser downloads work offline after initial cache population
- Performance characteristics (parse speed, memory overhead) compared to direct tree-sitter usage
- Whether all 371 languages have equivalent feature parity or if some have limited query support
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — tree-sitter |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,935,599/month — #2,195 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tree_sitter_language_pack-1.14.3-cp310-abi3-macosx_10_12_x86_64.whl; tree_sitter_language_pack-1.14.3-cp310-abi3-macosx_11_0_arm64.whl; tree_sitter_language_pack-1.14.3-cp310-abi3-manylinux_2_34_aarch64.whl; tree_sitter_language_pack-1.14.3-cp310-abi3-manylinux_2_34_x86_64.whl; tree_sitter_language_pack-1.14.3-cp310-abi3-win_amd64.whl; tree_sitter_language_pack-1.14.3-cp310-abi3-win_arm64.whl
Keywords: language-pack, parser, syntax, tree-sitter
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
tree-sitter-zigProvides a tree-sitter grammar for parsing Zig…
permissive · top 5,000 on PyPI
tree-sitter-kotlinProvides a Kotlin language grammar for…
permissive · top 5,000 on PyPI
tree-sitter-languagesProvides pre-compiled Python bindings for…
permissive · top 1,000 on PyPI
tree-sitter-c-sharpProvides a C# language parser for tree-sitter,…
permissive · top 5,000 on PyPI
tree-sitter-cmakeProvides a tree-sitter grammar for parsing…
permissive · top 15,000 on PyPI
tree-sitter-cProvides a C language grammar for tree-sitter,…
permissive · top 5,000 on PyPI
tree-sitter-javaProvides a Java language grammar for…
permissive · top 5,000 on PyPI
tree-sitter-objcProvides a tree-sitter grammar for parsing…
permissive · top 5,000 on PyPI
tree-sitter-xmlProvides a tree-sitter parser grammar for XML…
permissive · top 5,000 on PyPI
tree-sitter-cppProvides a C++ language grammar for…
permissive · top 5,000 on PyPI