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

pi-model-profiles

v0.3.3

Published

Pi extension for saving, importing, and applying agent model frontmatter profiles.

Readme

pi-model-profiles

npm version License

pi-model-profiles is a Pi extension for saving, updating, deleting, sorting, and applying whole-agent model frontmatter snapshots.

  • Command: /model-profiles
  • npm: https://www.npmjs.com/package/pi-model-profiles
  • GitHub: https://github.com/MasuRii/pi-model-profiles

Features

  • Save the current user/project agent model frontmatter as a reusable snapshot.
  • Apply a saved snapshot across matching agent markdown files with atomic writes.
  • Rename, update, remove, and sort saved snapshots from the interactive modal.
  • Preserve profile data in profiles.json with schema-versioned migration support.
  • Write optional debug logs only to the extension-local debug/ directory when enabled.

Installation

npm package

pi install npm:pi-model-profiles

Git repository

pi install git:github.com/MasuRii/pi-model-profiles

Local extension folder

Place this folder in one of Pi's extension discovery paths:

| Scope | Path | |-------|------| | Global default | ~/.pi/agent/extensions/pi-model-profiles (respects PI_CODING_AGENT_DIR) | | Project | .pi/extensions/pi-model-profiles |

Pi discovers the extension through the root index.ts entry listed in package.json.

Usage

Run the command in interactive TUI mode:

/model-profiles

Modal shortcuts:

| Shortcut | Action | |----------|--------| | / | Move through snapshots | | Enter | Apply selected snapshot | | s | Save current agent state as a new snapshot | | r | Rename selected snapshot | | Ctrl+U | Update selected snapshot from current agent state | | Delete / Ctrl+D | Remove selected snapshot after confirmation | | Ctrl+S | Open sort menu | | Esc | Close modal, cancel input, or close sort menu |

Configuration

Runtime configuration lives in config.json at the extension root. The extension creates the file automatically with defaults on first load if it does not already exist.

A starter template is included at config/config.example.json. Copy it to config.json for local customization, or let the extension create config.json with defaults on first load.

{
  "debug": false,
  "profiles": {
    "autoSave": true,
    "maxProfiles": 100
  },
  "sorting": {
    "defaultSort": "date-desc"
  }
}

| Key | Type | Default | Purpose | |-----|------|---------|---------| | debug | boolean | false | Enables debug logging under debug/ directory | | profiles.autoSave | boolean | true | Reserved profile persistence setting | | profiles.maxProfiles | number | 100 | Reserved maximum profile retention setting | | sorting.defaultSort | name-asc \| name-desc \| date-asc \| date-desc | date-desc | Default snapshot sort order |

Profile Storage

Profile data is persisted in profiles.json at the extension root and should not be edited while Pi is running.

{
  "version": 2,
  "importedAt": "2026-04-26T00:00:00.000Z",
  "profiles": [
    {
      "id": "profile-id",
      "name": "Current agents snapshot",
      "createdAt": "2026-04-26T00:00:00.000Z",
      "updatedAt": "2026-04-26T00:00:00.000Z",
      "agents": [
        {
          "fileName": "code.md",
          "agentName": "code",
          "fields": {
            "model": "provider/model",
            "temperature": 0.2,
            "reasoningEffort": "medium"
          }
        }
      ]
    }
  ]
}

Debug Logging

Debug logging is controlled by the debug property in config.json.

  • When debug is false or absent, no debug file handles are opened and no debug files are written.
  • When debug is true, debug events are appended to debug/pi-model-profiles-debug.jsonl.
  • Debug output is never written to console, stdout, or stderr.

Development

npm install
npm run build
npm run lint
npm run test
npm run check
npm run package:dry-run

Publishing

The package metadata follows the same publish-ready shape used by established Pi extensions:

  • entrypoint: index.ts
  • package exports: ../index.ts
  • Pi extension manifest: pi.extensions
  • published files: source, README, changelog, license, and config template
  • runtime config.json, profiles.json, and debug/ logs excluded from npm publication

Related Pi Extensions

  • pi-context-injector — Inject compact project context into first-turn and compaction prompts
  • pi-agent-router — Active-agent routing and controlled subagent delegation
  • pi-multi-auth — Multi-provider credential management, OAuth login, and account rotation
  • pi-tool-display — Compact tool rendering and diff visualization

License

MIT