CmdID

CmdID / Commands

ast-grep

Search, lint, and rewrite code using AST patterns. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Search for a pattern in files

ast-grep run --pattern 'pattern' path/to/fileIdentify

Search for a pattern in a specific language

ast-grep run --pattern 'pattern' --lang python path/to/directoryIdentify

Rewrite code matching a pattern

ast-grep run --pattern 'pattern' --rewrite 'replacement' path/to/fileIdentify

Run rules from a configuration file

ast-grep scan --rule path/to/rule.yml path/to/directoryIdentify

Interactively search and rewrite code

ast-grep run --pattern 'pattern' --interactive path/to/directoryIdentify

Display help for a subcommand

ast-grep run --helpIdentify