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

v0.7.2

Published

AI-first Git CLI automation — atomic AI commits, co-change relations (git-agent related), native extension guard for git commit/add, and workspace initialization (native /git-agent menu, no skill surface)

Readme

Git Agent for Pi

Version License

English | 简体中文

一个 Pi 编码代理包,把 git-agent 变成原生的 /git-agent 命令菜单:原子 AI 提交、共同变更分析,以及把裸 git add/git commit 重定向到原子提交流程的防护。无 skill 面。

概览

  • 原子提交:把暂存的改动拆成最多 5 个逻辑独立的提交,用 AI 生成 Conventional Commit 消息(git-agent commit)。
  • 共同变更分析:从 git 历史中挖掘一起变化的文件和测试套件(git-agent related)。
  • 原生扩展防护:extensions/validate-commit.ts 拦截裸 git commit / git add 工具调用,引导代理改用 git-agent 原子提交。
  • 会话驱动的提交:extensions/session-context.ts 提供 session_context 工具,读取当前会话记录,让提交意图来自用户实际提出的请求,而不是一句压缩的话。
  • 自动模型身份识别:git-agent 自动检测代理环境变量(PI_MODELCLAUDE_CODE_MODELCODEX_MODELMODEL),无需手动传递 co-author 标志。

用法

输入 /git-agent 打开原生菜单:

git-agent workflows:
❯ 1. Commit changes        (procedures/commit.md)
  2. Commit and push       (procedures/commit-and-push.md)
  3. Init / optimize       (procedures/init.md)
  4. Related files & tests (procedures/related.md)

或者直接传一个工作流关键字跳过菜单:

/git-agent commit                # 用会话上下文构建 intent 提交
/git-agent commit --co-author "Alice <[email protected]>"
/git-agent related src/foo.ts    # 查询指定文件的共同变更
/git-agent related --tests src/
/git-agent init                  # 重新生成 scopes + .gitignore

每次选择都会通过 pi.sendUserMessage 把完整流程(procedures/*.md)嵌入下一条消息,并注入一小段引导,让自然语言请求("commit this"、"commit and push")直接路由到对应流程。

安装

# 已发布版本
pi install npm:pi-git-agent
# 或本地安装:pi install /path/to/git-agent/pi-git-agent

需要 PATH 上有 git-agent CLI(由本仓库的 git-agent-cli/ 目录构建)。

文件

pi-git-agent/
├── extensions/
│   ├── menu.ts               # /git-agent 命令菜单 + 引导注入
│   ├── session-context.ts    # session_context 工具(提交意图来源)
│   └── validate-commit.ts    # 拦截裸 git add/commit,重定向到 git-agent
├── procedures/
│   ├── commit.md             # 原子 AI 提交流程
│   ├── commit-and-push.md    # 提交 + 推送流程
│   ├── init.md               # scope/.gitignore 重新生成
│   └── related.md            # 共同变更查询
└── references/
    ├── cli.md                # git-agent CLI 参考
    └── coauthor-attribution.md

License

MIT