Install
Install with PiG
pig install npm:pi-codemode-toggleInstall with Pi
pi install npm:pi-codemode-togglePackages 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 1.1.1 (README.md). PiG does not review it.
pi-codemode-toggle
A tiny Pi extension to toggle Pi's native codemode tool at runtime
pi install npm:pi-codemode-toggle
/codemode # toggle (this session only, nothing is saved)
/codemode on
/codemode off
/codemode status
Persisting across sessions
Toggling only changes the current session — Pi resets active tools on every
startup, which keeps things minimal by default. If you want your choice to
survive new sessions, persist it explicitly with -l (local to project) or -g
(all projects):
/codemode on -l # enable now + persist for this project (.pi/settings.json)
/codemode off -l # disable now + clear the project's saved default
/codemode on -g # enable now + persist globally (agent settings.json)
/codemode off -g # disable now + clear the global saved default
Demo
Why
Pi ships a native Codemode tool (builtin:codemode) that lets the model emit a small Javascript
program instead of one tool call per step.
Enabling or disabling it previously meant editing config and restarting the session.
Related work
Other Pi extensions by the same author:
pi-bifrost — configuration-first model router. Routes each prompt to a model by task tier, cost, speed, or context length.
pi install npm:pi-bifrostsystem-one — provider-neutral System One runtime for TypeScript and Pi. Calibrated
choice,noul, andscoredecisions via Jev, Reflex, or your own provider.pi install npm:pi-system-one