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-cache-extension

v1.1.0

Published

一个简单友好的 pi 扩展,查看 AI 对话的缓存效率和节省的 Token

Readme

pi-cache-extension 📊

一个简单友好的 pi 扩展,帮助你了解 AI 对话的缓存效率。

截图演示

核心功能:

  • 🎯 一眼看清缓存命中率(进度条 + 评级)
  • 💰 累计节省了多少 Token,估算省了多少钱
  • 📋 最近几轮对话的缓存命中情况

安装

在 pi 中使用 GitHub 地址安装:

pi install https://github.com/Q-Peppa/pi-cache-extension.git

或本地开发:

git clone https://github.com/Q-Peppa/pi-cache-extension.git
cd pi-cache-extension
npm install
pi -e .

使用

在 pi 中输入:

/cache

即可看到:

  • 📊 缓存命中率进度条
  • 效率评级(优秀 🟢 / 良好 🟡 / 一般 🔴)
  • 累计节省 Token 数和估算金额
  • 最近几轮的命中情况

快捷键:

  • r - 刷新数据
  • ↑/↓ - 滚动
  • q / Esc - 关闭

示例输出

📊 缓存效率概览

  缓存命中率:73.5%
  ████████████████████████░░░░░░░

  效率评级:优秀 🟢

  ✅ 累计节省 Token:124,580
  💰 估算节省金额:$0.62
  📝 对话轮次:42

  ─── 详细数据 ───
  当前分支:42轮 • 命中124580 • 命中率73.5%
  整个会话:42轮 • 命中124580 • 命中率73.5%

  📋 最近 5 轮
  第 42 轮: 85.2%  ✅
  第 41 轮: 78.1%  ✅
  第 40 轮: 32.5%  ⭕
  第 39 轮: 91.2%  ✅
  第 38 轮: 88.7%  ✅

为什么关心缓存?

  • 省钱:缓存命中的 Token 不用再花钱买
  • 更快:缓存的内容 AI 读取更快
  • 了解:知道你的对话模式对缓存友好程度