@yofriadi/pi-ast
```bash pi install git:github.com/yofriadi/pi-extensions@ast-v<version> ```
Package details
Install @yofriadi/pi-ast from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@yofriadi/pi-ast- Package
@yofriadi/pi-ast- Version
0.1.1- Published
- Feb 17, 2026
- Downloads
- 107/mo · 17/wk
- Author
- yofriadi
- License
- unknown
- Types
- extension
- Size
- 94.1 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
AST Extension
Install from git URL
pi install git:github.com/yofriadi/pi-extensions@ast-v<version>
To load only this extension from the monorepo package source, use package filtering in settings:
{
"packages": [
{
"source": "git:github.com/yofriadi/pi-extensions@ast-v<version>",
"extensions": ["packages/ast/src/index.ts"]
}
]
}
This extension provides integration with ast-grep (sg).
Features
- Health check for
sgbinary (sg_healthtool) - AST Search (
ast_searchtool): search code usingsg run --pattern - AST Rewrite (
ast_rewritetool): rewrite code usingsg run --pattern --rewrite(safe default: dry-run)
Prerequisites
sg(ast-grep) must be installed and available in your PATH.