What problem does it solve? Regex and text-based search cannot reliably match code structure, producing false positives and missing nested patterns when refactoring, auditing security, or migrating APIs across large codebases. ## Core Features & Use Cases - Structural Pattern Search: Match code by AST structure using meta-variables like $VAR and $$$ARGS instead of fragile regular expressions. - Security Scanning: Detect SQL injection, XSS, hardcoded credentials, and command injection with prebuilt YAML rules mapped to OWASP Top 10. - Codemod Transformations: Rewrite code across files with pattern-to-fix rules for API migrations, deprecations, and modernization. - Use Case: A team migrating from axios to fetch can define a YAML rule matching axios.get($URL), preview changes with a dry run, and apply the rewrite across the entire TypeScript codebase in one command. ## Quick Start Ask the AI to find all console.log calls in the src directory using ast-grep structural pattern matching.