Command-line tool
ast-grep
brew/ast-grep
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Code searching, linting, rewriting rust typescript search command-line static-analysis grep tree-sitter command-line-tool linter ast refactoring babel
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id ast-grep.ast-grep -e scoop install ast-grep cargo install ast-grep
macOS
brew install ast-grep cargo install ast-grep
Linux
brew install ast-grep cargo install ast-grep
Search for a pattern in files
ast-grep run -p 'pattern' path/to/file
Search for a pattern in a specific language
ast-grep run -p 'pattern' -l python path/to/directory
Rewrite code matching a pattern
ast-grep run -p 'pattern' -r 'replacement' path/to/file
Browse
Related command-line tools
- deno-lint
Blazing fast linter for JavaScript and TypeScript written in Rust - tsync
Generate typescript types from rust code. - zits
Generate typescript bindings for zome code in Rust. - perg
A fast, feature-rich text search tool similar to grep, written in Rust - ripgrep
Search tool like grep and The Silver Searcher rust cli search ripgrep command-line grep regex command-line-tool… - @trunkio/launcher
Trunk CLI tool actionlint ansible-lint autopep8 bandit black brakeman buf buildifier cfnlint clang-format clang-tidy… - jsongrep
Query tool for JSON, YAML, TOML, and other structured formats rust cli search json yaml command-line grep… - konsistent
konsistent is a CLI tool that enforces structural conventions in TypeScript codebases. lint consistent code code…
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents