$npx skillfedfor your agent

tree-sitter-cpp

C++ grammar for tree-sitter

With conditionsPyPI LinguisticReleased Nov 20244.8M downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — tree_sitter_cpp-0.23.4-cp39-abi3-macosx_10_9_x86_64.whl · tree_sitter_cpp-0.23.4-cp39-abi3-macosx_11_0_arm64.whl · tree_sitter_cpp-0.23.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
v0.23.4 · released 2024-11-11 · Python >=3.9

Yes, if you need C++ parsing within a Python application and are already using or planning to use tree-sitter. The permissive MIT license, active maintenance, and prebuilt wheels for common platforms make it a low-friction choice. No known security vulnerabilities. Verify that your use case aligns with tree-sitter's incremental parsing model and that you have or will install the core tree-sitter Python bindings separately.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later; prebuilt wheels available for common platforms but may require compilation on unsupported architectures.
  • Medium install friction due to binary wheels for multiple platforms (macOS, Linux, Windows, ARM); prebuilt binaries available for Python 3.9+ reduce compilation overhead.
  • Repository is actively maintained with recent commits.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

last release 2024-11-11 (641 days) · last repo commit 2026-02-25 · 445 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,786,023 downloads/mo, #2,231 on PyPI

Verify before relying

pip install tree-sitter-cpp

from tree_sitter_cpp import language

parser = language.parser()
tree = parser.parse(b'int main() { return 0; }')
  • Whether the package provides direct parsing APIs or requires a separate tree-sitter Python binding to be installed alongside it.
  • Performance characteristics and memory overhead for parsing large C++ files or codebases.
  • Completeness of C++ standard coverage (C++11, C++17, C++20, etc.) in the grammar.
Same gist for agents: .md · .json

What it is and what it does

tree-sitter-cpp is a C++ language grammar for the tree-sitter incremental parsing framework. It translates C++ source code into syntax trees that can be traversed and analyzed programmatically. The package ships as prebuilt binary wheels for major platforms, avoiding compilation on installation.

The grammar enables use cases like code analysis, refactoring tools, linters, and IDE features that need to understand C++ structure. It integrates with tree-sitter's ecosystem and follows the C++ BNF specification, supporting incremental updates when code changes rather than reparsing from scratch.

Use it for

  • Build code analysis and linting tools that need to parse and inspect C++ syntax trees.
  • Implement IDE features like syntax highlighting, code navigation, and refactoring for C++ editors.
  • Analyze C++ codebases to extract metrics, dependencies, or patterns without invoking a full compiler.
  • Create documentation generators or code transformation tools that operate on C++ ASTs.
  • Develop static analysis or security scanning tools that examine C++ code structure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need C++ parsing within a Python application and are already using or planning to use tree-sitter.

The permissive MIT license, active maintenance, and prebuilt wheels for common platforms make it a low-friction choice. No known security vulnerabilities. Verify that your use case aligns with tree-sitter's incremental parsing model and that you have or will install the core tree-sitter Python bindings separately.

Install

tree-sitter-cpp on PyPI

Before you install

Medium install friction due to binary wheels for multiple platforms (macOS, Linux, Windows, ARM); prebuilt binaries available for Python 3.9+ reduce compilation overhead. Repository is actively maintained with recent commits.

Requires Python 3.9 or later; prebuilt wheels available for common platforms but may require compilation on unsupported architectures.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install tree-sitter-cpp

from tree_sitter_cpp import language

parser = language.parser()
tree = parser.parse(b'int main() { return 0; }')

Verify before relying

  • Whether the package provides direct parsing APIs or requires a separate tree-sitter Python binding to be installed alongside it.
  • Performance characteristics and memory overhead for parsing large C++ files or codebases.
  • Completeness of C++ standard coverage (C++11, C++17, C++20, etc.) in the grammar.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceActively maintained 641 days since the last release
Last repo commit
First released
Downloads4,786,023 / month, #2,231 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseTopic :: Software Development :: CompilersTopic :: Text Processing :: LinguisticTyping :: Typed

Evidence: tree_sitter_cpp-0.23.4-cp39-abi3-macosx_10_9_x86_64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-macosx_11_0_arm64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-musllinux_1_2_x86_64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-win_amd64.whl; tree_sitter_cpp-0.23.4-cp39-abi3-win_arm64.whl

Tags

Capabilities
c++ parsing grammartree-sitter c++ languageincremental c++ parsersyntax tree c++c++ code analysistree-sitter language bindingc++ ast generation
Topics
parsingc++-grammarsyntax-analysis
PyPI keywords
incrementalparsingtree-sittercpp

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “tree-sitter c++ language”

  • tree-sitter-cppProvides a C++ language grammar for tree-sitter, enabling incremental…
  • tree-sitter-goProvides a Go language grammar for tree-sitter, enabling incremental…
  • tree-sitter-c-sharpProvides a C# language parser for tree-sitter, enabling incremental…

Give your agent the search over MCP, or paste the wish link into any chat.

More Linguistic packages

charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
tiktoken Worth it
PyPI · Linguistic · released May 2026

tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.

Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.

permissive licensecompiled wheel · 3.9+
233.0Mdownloads / mo
chardet Worth it
PyPI · Python Modules · released Aug 2026

Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.

Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.

0BSDpure Python · 3.10+
199.0Mdownloads / mo
text-unidecode With conditions
PyPI · Python Modules · released Aug 2019

Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.

However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.

GPL-2.0-or-laterpure Pythonabandoned
89.0Mdownloads / mo
lark Worth it
PyPI · Python Modules · released Oct 2025

Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.

MITpure Python · 3.8+
79.7Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo

See also tree-sitter-java · cxxheaderparser · tree-sitter-python · tree-sitter-c · tree-sitter-php · tree-sitter-go · tree-sitter-kotlin · tree-sitter-c-sharp · tree-sitter-css · tree-sitter-json

Further reading