pi-callscript
One-tool code mode for Pi with parallel context, reasoning checkpoints, and reversible edits
Package details
Install pi-callscript from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-callscript- Package
pi-callscript- Version
0.3.1- Published
- Sep 15, 2026
- Downloads
- 588/mo · 42/wk
- Author
- codewithkenzo
- License
- UNLICENSED
- Types
- extension
- Size
- 507.2 KB
- Dependencies
- 2 dependencies · 3 peers
Pi manifest JSON
{
"image": "https://raw.githubusercontent.com/codewithkenzo/pi-callscript/main/assets/pi-callscript.webp",
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-callscript
pi-callscript lets Pi run several tool calls as one checked script. It supports parallel work, dependencies, decision checkpoints, background jobs, and file rollback.
Requirements
- Pi running from npm or Node.js
- Node.js 22.19 or newer
Install
pi install npm:pi-callscript
Restart Pi, or reload packages in an active session:
/reload
/callscript status
Install from GitHub or a local checkout when needed:
pi install git:github.com/codewithkenzo/pi-callscript
pi install /path/to/pi-callscript
Use
CallScript starts enabled. Ask Pi to use it when work needs several related tool calls. You do not need to write CallScript code.
Example requests:
Use CallScript to inspect package scripts and source imports in parallel.
Use CallScript to snapshot these files, apply the edits, then run focused checks.
CallScript can:
- Run independent calls in parallel.
- Pass results between dependent calls.
- Call built-in Pi tools and installed extension tools.
- Pause before queued work so Pi can continue, stop, or revise it.
- Track background jobs.
- Restore files from a snapshot.
Pi shows each operation in its normal tool view. Use Ctrl+O to expand details.
Commands
| Command | Purpose |
|---|---|
/callscript status |
Show mode, fixed tools, and Pi bridge status |
/callscript on |
Enable the callscript tool |
/callscript off |
Disable the callscript tool |
/callscript jobs |
Show background jobs |
/callscript doctor |
Show runtime and output limits |
/callscript reload |
Reload config while preserving retained state |
/callscript reset |
Cancel owned jobs and clear retained state |
off removes only callscript. Other Pi tools keep their current state.
Configuration
Global config: ~/.pi/agent/callscript.json
Project config: .pi/callscript.json
Project values override global values.
{
"mode": "on",
"limits": {
"maxSteps": 30,
"maxItemsPerStep": 100,
"maxTotalCalls": 200,
"maxConcurrency": 12,
"maxCallResultBytes": 10485760
},
"httpTimeoutMs": 30000,
"maxHttpResultBytes": 5242880
}
File and shell calls use the current Pi working directory. run uses PowerShell on Windows and Bash on Linux and macOS.
Compatibility
Registered Pi tool access works with npm and Node.js Pi. CI tests the locked Pi version and npm latest on Linux, macOS, and Windows.
A standalone compiled Pi binary cannot expose its tool registry to this extension. Fixed CallScript tools still work, and /callscript status reports that the Pi bridge is unavailable.
Optional agent skill
The included skill teaches Pi when to use CallScript and how to keep scripts small.
npx pi-callscript
Or with Bun:
bunx pi-callscript
This installs SKILL.md at ~/.agents/skills/pi-callscript/.
Development
git clone https://github.com/codewithkenzo/pi-callscript.git
cd pi-callscript
bun install
bun run check
bun run smoke
bun run matrix tests cold install, source, built output, packed package, user extension, and reload paths.
