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

v0.0.2

Published

Configurable multi-line Powerline status bar extension for Pi

Downloads

359

Readme

pi-dstatus

个人的多逻辑行、可配置 Pi Footer(底栏)扩展,使用 Powerline 箭头色块风格。

公开仓库:github.com/ssdiwu/pi-dstatus

安装

安装已发布的 0.0.2 版本:

pi install npm:pi-dstatus

开发版可以从仓库目录安装:

git clone https://github.com/ssdiwu/pi-dstatus.git
cd pi-dstatus
pi install .

启用前请移除或停用 @npm-ken/pi-bar,因为两个扩展都会竞争自定义 Footer。

使用

  • /dstatus:打开设置面板。
  • 配置文件:~/.pi/pi-dstatus/config.json
  • 默认一条逻辑行:目录/Git/模型/思考等级/上下文/多个独立 quota 用量查询/工具或工作动画/所有当前非空扩展状态;可按需加入会话名、输入输出 token、缓存命中率、费用等独立组件。
  • 当前模型组件同时显示模型名与 provider,例如 (openai-codex)gpt-5.6-luna;在 /dstatus 选中模型组件后按 Enter,可切换 provider 显示;context 独立显示模型上下文窗口;每个 quota 组件订阅并显示一个 pi-dusage provider / 模型额度,分别渲染为独立 Powerline 色块。上下文示例:87% ━━━━━━━━━━━━━━━━━─── · 324K/372K

逻辑行可以新增、删除、排序,并编排行内组件;sessiontokenscachecostcontext、每个 quota 和按 key 绑定的 statuses 都是独立组件。session 显示 Pi session name;tokens 显示输入、输出与合计 token;cache 显示累计缓存读写与累计命中率;cost 显示累计费用。安装 pi-dusage 后,provider / 模型额度会从结构化快照动态发现;选中 quotastatuses 组件后按 Enter 进入设置,再选择绑定模型或状态。无 key 的 statuses 仍表示显示全部状态。逻辑行不是终端物理行:宽度不足时默认自动 wrap(换行)。全局默认和每行均支持 wrapcollapsehide

扩展状态只读取 Pi 公开的 setStatus(key, value) 协议及 getExtensionStatuses();未发布状态不显示,不解析 pi-dgoal 或其他扩展私有状态。

本地 TUI 验证

  1. 先停用 @npm-ken/pi-bar
  2. 执行 pi install npm:pi-dstatus,或在仓库目录用 pi -e ./extensions/index.ts 临时加载。
  3. 启动 pi,观察 Footer;输入 /dstatus
  4. 用方向键选择行/组件,使用界面显示的快捷键新增、删除、排序、编辑溢出策略。
  5. 使用 ↑↓/←→ 选择并聚焦行或组件,按 Enter 进入当前对象设置;使用 a/d 增删逻辑行,c 修改组件,n 新增组件,x 删除组件,[/] 移动当前聚焦对象,u/j 移动逻辑行,s 保存,Esc 返回或取消。
  6. 输入 /dstatus 后确认预览、保存与取消行为;再调整终端宽度验证 wrap。

目录导航

  • extensions/:Pi Extension(扩展)入口,注册 /dstatus 并安装自定义 Footer。
  • src/:配置、渲染、设置状态模型、设置 UI 与 session usage 聚合。
  • test/:配置、渲染、设置交互与 usage 聚合的行为测试。
  • doc/:项目文档地图与 Pi 公开 Footer 数据审查;当前保持小项目平铺结构。

开发

npm install
npm run typecheck
npm test

范围

本项目不修改 Pi 核心与旧 pi-bar,不实现项目级覆盖或 Claude 专属用量指标。