ast-grep
Verified for current stable LTS
Ast Grep Commands
Ast Grep command syntax with verified terminal examples.
Commands
12 commands for Ast Grep
ast-grep Search
Ast Grep Command: Search For Pattern In Files
ast-grep run {-p|--pattern} '<pattern>' {path/to/file} ast-grep Search
Ast Grep Command: Run Rules From Configuration File
ast-grep scan {-r|--rule} {path/to/rule.yml} {path/to/directory} ast-grep Search
Ast Grep Command: Display Help For Subcommand
ast-grep {run} {-h|--help} ast-grep Search
Ast Grep Command: Search For Pattern In Specific Language
ast-grep run {-p|--pattern} '<pattern>' {-l|--lang} {python} {path/to/directory} ast-grep Search
Ast Grep Command: Rewrite Code Matching Pattern
ast-grep run {-p|--pattern} '<pattern>' {-r|--rewrite} '<replacement>' {path/to/file} ast-grep Search
Ast Grep Command: Interactively Search And Rewrite Code
ast-grep run {-p|--pattern} '<pattern>' {-i|--interactive} {path/to/directory} ast-grep Search
Ast Grep Command: Rewrite Code Matching Pattern
ast-grep run -p '<pattern>' -r '<replacement>' <path/to/file> ast-grep Search
Ast Grep Command: Display Help For Subcommand
ast-grep <run> -h ast-grep Search
Ast Grep Command: Search Pattern In Files
ast-grep run -p '<pattern>' <path/to/file> ast-grep Search
Ast Grep Command: Search Pattern In Language
ast-grep run -p '<pattern>' -l <python> <path/to/directory> ast-grep Search
Ast Grep Command: Run Rules From Config
ast-grep scan -r <path/to/rule.yml> <path/to/directory> ast-grep Search
Ast Grep Command: Interactive Search And Rewrite
ast-grep run -p '<pattern>' -i <path/to/directory> Suggest a Ast Grep Command
Submit missing workflows, corrections, or verified alternatives for this tool.
FAQ
Coverage: Focused examples for common Ast Grep workflows.
Verified version: current stable LTS.
Verification: Test commands in a disposable workspace and submit notes for edge cases.