npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ahrzb/omp-model-presets

v0.12.0

Published

Oh My Pi (OMP) plugin that switches every model role at once with scoped, user-defined presets

Readme

OMP Model Presets

Switch every Oh My Pi model role at once with a slash command. Presets are yours: the plugin ships none, and a preset changes only when you edit a role while it is in effect.

Install

omp plugin install @ahrzb/omp-model-presets

OMP loads plugin code when the process starts. After installing or updating this package, close every running OMP process and start a new one before using /preset; /reload does not replace an already loaded plugin module.

Restart OMP, then capture your current roles as a preset and switch between them for the current session (the default), globally, or for the current project:

/preset new work
/preset work
/preset review --scope project
/preset work --scope session

Commands

| Command | Description | | --- | --- | | /preset <name> [--scope global\|project\|session] | Apply a preset at the selected scope. The default scope is session. | | /preset default [--scope global\|project\|session] | Clear the selected scope so the next lower-precedence OMP configuration applies. | | /preset current | Show active presets by scope and the effective preset. | | /preset list | List available presets. | | /preset new <name> [--scope global\|project\|session] | Create a preset from the effective modelRoles mapping and select it at that scope. | | /preset delete <name> | Delete a preset definition (alias: /preset rm <name>). Applied roles are left in place; only the definition and any active-selection markers pointing at it are removed. |

Typing /preset completes your preset names, actions, --scope, and scope values. The editor also shows contextual inline usage hints as you type.

Scopes

Scopes follow OMP's normal precedence:

session > project > global > OMP defaults

| Scope | Behavior | | --- | --- | | global | Persists modelRoles in the active OMP profile's config.yml and applies everywhere without a higher-precedence override. | | project | Persists modelRoles in <cwd>/.omp/config.yml. It affects OMP sessions started in that exact working directory. | | session | Stores an in-memory role override and a marker in the OMP session transcript. It follows a persisted session across reload/resume, does not modify global or project configuration, and is the default when --scope is omitted. |

Setting or clearing one scope does not delete another scope. For example, a session preset continues to take precedence if you change the global preset underneath it.

Presets

The plugin starts empty. Configure the roles you want through OMP's normal model settings, then capture them:

/preset new work
/preset new review --scope project
/preset new experiment --scope session

The new preset becomes active at the requested scope.

Editing a preset

While a preset is in effect, changing a role through OMP's model settings (the model selector, /model) edits that preset: the change is written into its entry in model-presets.json.

| Effective preset | What happens to the role change | | --- | --- | | session | Written to the preset definition and applied to the live session. OMP saves it to the global config.yml first; the plugin undoes that, so leaving the preset brings back your previous roles. | | global | Written to the preset definition and kept in the global config.yml, which holds that preset's applied copy. | | project | Not tracked. OMP saves it to the global config.yml, where the project preset's roles shadow it. |

The effective preset is the session one if set, else the project one, else the global one. Only that preset and only the edited role change; other presets are never written. In a session preset, a role that neither the preset nor the roles underneath it define is left to OMP and goes to the global config.yml. With no preset in effect, role changes go to the global config.yml as usual. Applying, switching, and clearing presets never write preset definitions.

No preset definitions are bundled, so upgrading the plugin never changes, overwrites, or conflicts with your roles, and never pins a model id that the providers have since retired.

File location

Preset definitions are shared across scopes and live in one model-presets.json file in the active OMP agent directory:

  • Windows: %USERPROFILE%\.omp\agent\model-presets.json
  • macOS and Linux: ~/.omp/agent/model-presets.json
  • Named profiles: ~/.omp/profiles/<profile>/agent/model-presets.json

PI_CODING_AGENT_DIR is also honored. The authoritative location for the active profile is:

omp config path

Append model-presets.json to that path. The file contains one top-level JSON property per preset. You can place an existing preset file there or let /preset new <name> create it.

The active global preset is tracked beside it in model-presets.active. The active project preset is tracked in <cwd>/.omp/model-presets.active. Session state is recorded in the OMP session transcript rather than a separate file.

Model strings use OMP's provider/model:thinking-level format. Preset names may contain lowercase letters, numbers, ., _, and -; default, list, current, new, delete, and rm are reserved.

Returning to your base config

Switching presets is meant to feel like pointing at a different config file, so /preset default restores the configuration you had before you first applied a preset — not an empty mapping.

/preset default
/preset default --scope project
/preset default --scope session

The first time a preset is applied to the global or project scope, the plugin snapshots that scope's existing modelRoles (a model-presets.base.json sidecar; the session scope keeps its snapshot in the transcript). /preset default writes that snapshot back, re-points the live model at the restored default role, and removes the snapshot — so the scope is exactly as it was before presets. If the scope had no roles to begin with, default clears it. Preset definitions are never changed or deleted by restoring a scope.

What it changes

The plugin replaces the complete modelRoles mapping at the selected scope, including default, slow, smol, plan, advisor, task, designer, vision, commit, tiny, and spark.

Before applying a preset, it verifies that every model resolves in OMP. When the selected scope becomes effective, it switches the active model immediately; the roles take effect in the running OMP without a reload.

Your provider credentials and access to the configured models must already be available in OMP.

Development

Link a local checkout into OMP:

omp plugin link . --scope user

Validate the installed plugin:

omp plugin doctor @ahrzb/omp-model-presets --json

Run the tests with node --test. test/e2e.test.js drives a real omp process over its RPC mode in a throwaway agent directory, and is skipped when omp is not on PATH.

Releases

See CHANGELOG.md for user-facing changes in each published version.

Every push and pull request to main runs the Node.js test suite and checks the npm package contents.

To publish, update package.json to the next version, commit it, then push the matching tag:

version=$(node -p "require('./package.json').version")
git tag "v$version"
git push origin "v$version"

The tag workflow rejects mismatched versions and publishes the package to npm with provenance.

License

MIT