Search and Rewrite code at large scale using precise AST pattern
- Types
- ESM
- CJS
- License
- MIT
- Deps
- 0
- Install Size
- 360.7 kB(8.1 MB)
- Vulns
- 0
- Published
$
npm install @ast-grep/napi$
pnpm add @ast-grep/napi$
yarn add @ast-grep/napi$
bun add @ast-grep/napi$
deno add npm:@ast-grep/napi$
vlt install @ast-grep/napi$
vp add @ast-grep/napi@ast-grep/napi
ast-grep(sg)
ast-grep(sg) is a CLI tool for code structural search, lint, and rewriting.
This npm package is for programmatic usage of ast-grep. Please see the API usage guide and API reference.
Other resources include ast-grep's official site and repository.
Support matrix
Operating Systems
| node14 | node16 | node18 | |
|---|---|---|---|
| Windows x64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |