Development Windows

ast-grep

Search and rewrite code by syntax with ast-grep, an open-source command-line tool with reusable YAML lint rules. This download is the Windows x64 ZIP package.

WindowsFree and open source; MIT LicenseVersion 0.51.0
Operating system
Windows; minimum version not established
Architecture
x64 (x86_64-pc-windows-msvc)
Download package
ZIP archive
Download for Windows (x64 ZIP)

Separate ARM64 and i686 Windows archives are listed by the publisher. Command-line tool, not a desktop GUI. No installation or execution testing performed.

Link checked · Download guidance

What is ast-grep?

ast-grep searches source code by its abstract syntax tree rather than by text alone. Write a pattern resembling the code you want to find, capture variable parts with metavariables, and use the matches to inspect or rewrite a codebase. This suits repetitive API migrations and project-specific code checks where whitespace differences make a plain-text search less useful.

The command-line tool supports interactive rewrite review and YAML rules for repeatable linting. The publisher's quick start demonstrates replacing repeated property checks with optional chaining in TypeScript; its homepage also shows scan-based diagnostics. These are publisher examples, not tests performed for this entry.

The linked 0.51.0 archive targets 64-bit x86 Windows with MSVC; ARM64 and 32-bit Windows archives are separate release assets. The sources reviewed do not establish a minimum Windows version. The screenshot is the publisher's terminal demonstration with macOS-style window chrome, illustrating the cross-platform command-line workflow rather than a Windows installation.

Structural matching is not full semantic analysis. The publisher explicitly excludes type information, scope analysis, control-flow analysis and data-flow analysis. Patterns also need parseable code or an explicit context and selector, so a fragment that looks right as text can still require adjustment before it matches the intended syntax node.

What it offers

  • Match code by syntax using source-like patterns and metavariables instead of relying only on exact text.
  • Review proposed code rewrites interactively before accepting changes.
  • Define reusable lint and rewrite rules in YAML and run project scans.
  • Work with multiple programming languages through tree-sitter-based parsing.

Good to know

  • No type information, scope, control-flow or data-flow analysis; structural matches do not establish those semantic properties.
  • Patterns must be parseable in the selected language; incomplete fragments may need a context and selector.
  • The linked package is Windows x64 only; minimum Windows version was not established by the reviewed sources.

Product images

Sources

References used for this listing. Retrieval dates do not indicate hands-on testing.

  1. ast-grep — official structural search and rewrite overview ↗Retrieved
  2. ast-grep Quick Start — official command-line workflow ↗Retrieved
  3. ast-grep/ast-grep — official repository and README ↗Retrieved
  4. Official GitHub release metadata — ast-grep 0.51.0 ↗Retrieved
  5. ast-grep FAQ — pattern and static-analysis limitations ↗Retrieved

Browser storage

No analytics or advertising cookies. If you dismiss this notice, we remember its acknowledgement in your browser for 180 days. How storage works