$npx skillfedfor your agent

tree-sitter-cmake

CMake grammar for tree-sitter

With conditionsPyPI LinguisticReleased Nov 202574.4K downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — tree_sitter_cmake-0.7.2.post1-cp310-abi3-win_amd64.whl
v0.7.2.post1 · released 2025-11-24 · Python >=3.10

Yes, if you need to parse or analyze CMake code programmatically in Python. The package is actively maintained, permissively licensed, and has no known vulnerabilities. Medium install friction is typical for tree-sitter bindings. Requires Python >= 3.10 and tree-sitter ~= 0.24.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10 and tree-sitter ~= 0.24
  • Medium install friction due to platform-specific wheels; actively maintained with last commit on 2026-07-08.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open and closed-source projects.

last release 2025-11-24 (263 days) · last repo commit 2026-07-08 · 59 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 74,361 downloads/mo, #14,847 on PyPI

Verify before relying

pip install tree-sitter-cmake

import tree_sitter_cmake
import tree_sitter

cmake_language = tree_sitter.Language(tree_sitter_cmake.language())
parser = tree_sitter.Parser(cmake_language)
tree = parser.parse(b"cmake_minimum_required(VERSION 3.10)")
print(tree.root_node)
  • Whether tree-sitter ~= 0.24 is automatically installed or must be manually added
  • Performance characteristics when parsing large or deeply nested CMake files
  • Completeness of grammar coverage for CMake syntax beyond documented constructs
Same gist for agents: .md · .json

What it is and what it does

tree-sitter-cmake is a Python binding for a tree-sitter grammar that parses CMake code into a syntax tree. It wraps the grammar from the uyha/tree-sitter-cmake repository and exposes it through a simple Python API. You supply CMake source code as bytes, initialize a tree-sitter Parser with the CMake language, and receive back a traversable syntax tree representing commands, arguments, variables, and comments.

The package is designed for developers who need to analyze, transform, or validate CMake files programmatically. It supports general commands, flow control (if, while, foreach), functions, macros, quoted and bracket arguments, variable references, and both line and bracket comments.

Use it for

  • Build system analysis: extract and inspect CMake project structure, dependencies, and compiler flags
  • CMake linting or validation: traverse the syntax tree to enforce coding standards or detect errors
  • Code generation: programmatically modify or generate CMake files by manipulating the parsed tree
  • Documentation extraction: parse CMake files to auto-generate build documentation or dependency graphs
  • IDE integration: provide syntax highlighting, code completion, or error reporting for CMake editors

Worth the install?

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

With conditions

Yes, if you need to parse or analyze CMake code programmatically in Python.

The package is actively maintained, permissively licensed, and has no known vulnerabilities. Medium install friction is typical for tree-sitter bindings. Requires Python >= 3.10 and tree-sitter ~= 0.24.

Install

tree-sitter-cmake on PyPI

Before you install

Medium install friction due to platform-specific wheels; actively maintained with last commit on 2026-07-08.

Requires Python >= 3.10 and tree-sitter ~= 0.24

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open and closed-source projects.

Quickstart

pip install tree-sitter-cmake

import tree_sitter_cmake
import tree_sitter

cmake_language = tree_sitter.Language(tree_sitter_cmake.language())
parser = tree_sitter.Parser(cmake_language)
tree = parser.parse(b"cmake_minimum_required(VERSION 3.10)")
print(tree.root_node)

Verify before relying

  • Whether tree-sitter ~= 0.24 is automatically installed or must be manually added
  • Performance characteristics when parsing large or deeply nested CMake files
  • Completeness of grammar coverage for CMake syntax beyond documented constructs

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceActively maintained 263 days since the last release
Last repo commit
First released
Downloads74,361 / month, #14,847 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersTopic :: Software Development :: CompilersTopic :: Text Processing :: LinguisticTyping :: Typed

Evidence: tree_sitter_cmake-0.7.2.post1-cp310-abi3-win_amd64.whl

Tags

Capabilities
cmake parser pythontree-sitter cmake grammarcmake syntax treeincremental cmake parsingcmake ast extractioncmake code analysis
Topics
parsingcmakebuild-tools
PyPI keywords
incrementalparsingtree-sittercmake

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 › “cmake parser python”

  • tree-sitter-cmakeProvides a tree-sitter grammar for parsing CMake code, enabling…
  • cmake-formatFormats, lints, and annotates CMake listfiles, and converts ctest…
  • cmakelangProvides command-line tools to format, lint, and annotate CMake…

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 · tree-sitter-python · tree-sitter-go · tree-sitter-language-pack · tree-sitter-ruby · tree-sitter-elixir · tree-sitter-c · tree-sitter-powershell · tree-sitter-php