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-git-review

v0.1.0

Published

Review before commit: opens a real lazygit overlay inside Pi and only then lets the agent's git commit run.

Readme

pi-git-review

在 Pi 里给 git commit 加一道人工闸门:AI 要提交时,先把 lazygit 以浮层形式打开在 Pi 内部,你看完退出,才决定这次提交要不要真的执行。

浮层用 node-pty 跑一个真 lazygit,再用 @xterm/headless 把屏幕渲染进 Pi 的 overlay —— 不抢占终端,不打断会话,退出后 Pi 立刻可用。

安装

npm i -g lazygit    # 或 brew install lazygit
pi install npm:pi-git-review

重启 Pi(或在会话里 /reload)。

它拦什么

只拦 AI 通过 bash 执行 git commit。你在 Pi 编辑器里用 ! 手动跑的 shell 不受影响。

AI 要 git commit
   ↓
┌ 提交前:先看一下改动吗? ────────────┐
│  打开 lazygit 审查                    │
│  直接提交(不看)                     │
└──────────────────────────────────────┘
   ↓ 审查                              ↓ 不看
lazygit 浮层(看完按 q 退出)         原命令直接执行
   ↓
确认提交流程

退出 lazygit 后还有三道检查:

| 检查 | 行为 | |---|---| | HEAD 变了吗 | 变了说明你在 lazygit 里自己提交了 → 取消原命令,不会产生重复提交 | | 工作区还有变更吗 | 全清空了 → 跳过提交 | | 命令里带 git add 且暂存区非空 | 弹三选一:只提交已暂存的内容(跳过 git add)/按原命令提交/取消。选第一个会原地改写命令 |

没装 lazygit 时

不会卡住提交,而是退回内置 diff 屏(带行号、文件分组、行内 word-level 高亮),并在屏上给出安装入口:

⚡ 没装 lazygit · 按 i 一键安装,之后能看完整的文件 / 暂存 / 分支操作
↑↓/jk 滚动  PgUp/PgDn 翻页  g/G 首尾    │  Enter 提交  Esc 取消

按 i 会二次确认,然后按平台自动安装(macOS 走 brew,Linux 在免密 sudo 下走 apt-get / dnf / pacman / snap,否则只给出手动命令)。装好之后本次审查立刻切到 lazygit 浮层。

命令

| 命令 | 作用 | |---|---| | /diff | 用 lazygit 浮层看工作区变更(不涉及提交) | | /diff builtin | 用内置 diff 屏看工作区变更 | | /review off | 本次会话不再拦提交 | | /review on | 恢复拦截 | | /review builtin | 本次会话改用内置 diff 屏 | | /review lazygit | 切回 lazygit 浮层 | | /review | 查看当前状态 |

开关都是会话级:新会话、/resume 后会恢复默认(拦截开、界面用 lazygit)。

浮层操作

| 按键 | 作用 | |---|---| | 任意键 | 透传给 lazygit | | q | 退出 lazygit(正常收尾) | | Ctrl+Q | 强制关闭浮层(lazygit 卡住时用) |

方向键会被翻译成 lazygit 认识的 legacy 序列(Pi 启用了 Kitty 键盘协议,原样透传 tcell 不认)。

已知限制

  • 只识别 bash 里的 git commit 字面命令:git 别名、包装脚本、git commit 写进 heredoc 的会被忽略或误判(heredoc 正文已做剥离)
  • 平台支持以 macOS / Linux 为主;Windows 缺 sh,会退化成内置 diff 屏 + 手动安装提示
  • 非交互模式(pi -p、RPC、SDK)不拦

License

MIT