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-selector

v1.0.1

Published

A Pi coding agent extension that enhances model selection with pricing and cumulative usage information.

Readme

Pi Model Selector

A Pi coding agent extension that enhances model selection with pricing and cumulative usage information.

Preview

Features

  • /models command — Lists all available models with detailed metrics (leaves built-in /model untouched).
  • Pricing Display — Shows Input and Output price per million tokens (In($/M), Out($/M)).
  • Cumulative Usage Tracking — Parses your actual Pi session logs (.jsonl) to show exactly how many tokens you've used and how much it cost you per model (Total($), Total(tok)).
  • Scope Toggling — By default, shows usage for the current session. Press Shift+Ctrl+A to toggle and calculate usage across all sessions in the current month.
  • Smart Sorting & Filtering
    • Sort by input price (Shift+Ctrl+I)
    • Sort by output price (Shift+Ctrl+O)
    • Filter by provider (Shift+Ctrl+P)
  • Favorites — Mark your favorite models with Space. Favorites get a star (★) and are always pinned to the top of the list (to prevent jumping, sorting takes effect when you re-open the list or filter). Press Shift+Ctrl+F to filter and show only your favorites.
  • Auto-Calculated Costs — For providers that only report token usage but no costs (like local models or cursor-agent), the extension automatically calculates the true cost based on the model's pricing.

Installation

You can install this extension directly via Pi's package manager:

pi install npm:pi-model-selector

(Alternatively, you can manually place pi-model-selector.ts in your ~/.pi/agent/extensions/ directory.)

Usage

Once installed, use /models in any Pi session to browse available models.

Shortcuts in the UI:

  • ↑↓ — Navigate list
  • Enter — Select model
  • Esc or Ctrl+C — Cancel
  • Shift+Ctrl+I — Sort by Input Price
  • Shift+Ctrl+O — Sort by Output Price
  • Shift+Ctrl+P — Cycle through Providers
  • Shift+Ctrl+A — Toggle usage scope (Current Session ↔ All Sessions this Month)
  • Space — Toggle Favorite status for the selected model
  • Shift+Ctrl+F — Toggle "Favorites Only" view

Tech Stack

  • TypeScript
  • Pi Extension API (@mariozechner/pi-coding-agent)
  • Pi AI types (@mariozechner/pi-ai)
  • Pi TUI components (@mariozechner/pi-tui)