grit
Installation
SKILL.md
gritql (grit)
Searches and rewrites source code using a declarative query language backed by tree-sitter. Any valid code snippet in backticks is a pattern — no AST vocabulary required. Install: curl -fsSL https://docs.grit.io/install | bash or npm install --location=global @getgrit/cli.
Searching Code
Find matches structurally (whitespace-insensitive):
grit apply '`console.log($_)`' ./src/
Patterns match the AST structure — variations in formatting are handled automatically.
Rewriting Code
Replace patterns in-place: