omp packages

pi-codemode-toggle1.1.1

Toggle Pi's native Codemode tool at runtime.

iamaamir Published 1 month ago MIT ~250 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

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

https://github.com/user-attachments/assets/b4861e7c-d3ed-4bdc-a663-2461c196fb5a

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-bifrost
    
  • system-one — provider-neutral System One runtime for TypeScript and Pi. Calibrated choice, noul, and score decisions via Jev, Reflex, or your own provider.

    pi install npm:pi-system-one
    

License

MIT