Install
Install with PiG
pig install npm:@deathbeam/pi-contextInstall with Pi
pi install npm:@deathbeam/pi-contextPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.0.9 (README.md). PiG does not review it.
@deathbeam/pi-context
Keep the context small: rewrite bash commands through RTK when rtk is in PATH, prune tool results that a later call made stale, and compact with a cheaper model.
Use the /gain command to see the tokens saved.
Installation
# Choose one:
pi install npm:@deathbeam/pi-context # this package
pi install git:github.com/deathbeam/pi-packages # all my packages
Configuration
Optional context settings live in ~/.pi/agent/settings.json or .pi/settings.json:
{
"context": {
"compaction": "anthropic/claude-haiku-4-5:low"
}
}
compactionis aprovider/model-idstring with an optional:<thinking>suffix, used as the compaction model. Project settings override global ones.
Development
From the repo root:
npm install
npm test -- packages/pi-context
pi install ./packages/pi-context