--- id: tree-sitter-powershell version: "0.26.4" license: MIT license_treatment: permissive maintenance: active --- # tree-sitter-powershell — A Powershell grammar for tree-sitter License: permissive · Maintenance: active · Downloads: 1.6M/mo ## What it is and what it does tree-sitter-powershell is a language grammar binding that provides PowerShell syntax parsing for the tree-sitter incremental parsing framework. It allows you to parse PowerShell code into an abstract syntax tree that can be traversed and analyzed programmatically, without relying on PowerShell's own parser. The package is a compiled grammar with no runtime dependencies. It targets PowerShell 7.3 and is maintained by Airbus CERT. It's useful for static analysis tools, linters, code formatters, or any application that needs to understand PowerShell code structure. Use it for: - Build a PowerShell linter or static analysis tool that inspects code structure - Create a code formatter or refactoring tool for PowerShell scripts - Implement syntax highlighting or IDE features for PowerShell in a custom editor - Analyze PowerShell scripts for security patterns or compliance violations - Generate documentation or metrics from PowerShell codebases ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a tree-sitter grammar for parsing PowerShell code, enabling incremental syntax analysis and tree-based code inspection for PowerShell scripts. Yes, if you need programmatic PowerShell parsing. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides prebuilt wheels for common platforms. Install friction is moderate but acceptable. Verify that the grammar covers your specific PowerShell features before committing to production use. ## Install pip install tree-sitter-powershell uv add tree-sitter-powershell poetry add tree-sitter-powershell ## Installing tree-sitter-powershell Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (macOS x86_64/arm64, Linux x86_64/aarch64, Windows x86_64/arm64). Package is actively maintained with recent commits and no runtime dependencies. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install tree-sitter-powershell Requires Python 3.10 or later; tree-sitter framework must be installed separately as a peer dependency. Verify before relying: - Whether the grammar covers all PowerShell 7.3 language features or has known gaps - Performance characteristics for parsing large or complex PowerShell files - Integration examples or documentation beyond the GitHub repository - How tree-sitter-powershell integrates with the tree-sitter framework in practice ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags powershell parser, tree-sitter grammar, incremental parsing, powershell syntax analysis, code parsing library, powershell ast, language grammar, parsing, powershell, static-analysis [View on SkillFed](https://skillfed.io/packages/tree-sitter-powershell) · [View on PyPI](https://pypi.org/project/tree-sitter-powershell/)