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

ly-git-ai

v1.0.0

Published

Local Git commit assistant with AI-powered analysis

Readme

AI Git Manager

一个本地运行的 Git 提交助手,最简单的使用方式就是:

cd /你的项目目录
aicm review
aicm commit

核心设计

现在不再需要:

  • 项目别名
  • 项目编号
  • 项目绑定

aicm 直接把“当前文件夹所在的 Git 仓库”当作当前项目。

也就是说:

  • 你在哪个项目目录里执行
  • aicm 就分析哪个项目
  • aicm commit 就提交哪个项目

安装

npm install -g ly-git-ai

第一次使用:

aicm setup

setup 现在只负责配置 AI 厂商和 API Key,不再绑定项目。

最推荐的使用方式

你写完一个需求后,直接:

aicm review

它会自动:

  1. 识别当前 Git 项目
  2. 分析本次改了哪些文件
  3. 展示代码 diff 预览
  4. 总结本次改动做了什么
  5. 提示潜在风险
  6. 生成建议 commit message

如果你确认没问题,再执行:

aicm commit

如果刚刚已经 review 过,而且中间代码没有变化,aicm commit 会直接复用刚才的分析结果。 如果你没有先 review,aicm commit 也会自动先分析一遍再提交。

默认行为

  • aicm review 默认分析当前目录这个 Git 项目的所有改动
  • aicm commit 默认提交当前目录这个 Git 项目的所有改动
  • aicm review --staged 只分析已经 git add 的内容
  • aicm commit --staged 只提交已经 git add 的内容
  • aicm status 查看当前目录项目状态、分支、模型和改动文件

也就是说,普通用户平时不需要:

  • 手动 git add
  • 记项目编号
  • 记项目别名
  • 提前绑定项目

提交前会展示什么

执行 aicm reviewaicm commit 后,默认会优先展示:

  1. 改动概览
  2. 改动文件列表
  3. 本次改动说明
  4. 逐文件说明
  5. 关键代码片段
  6. AI 建议的 commit message
  7. 风险提醒

完整原始 diff 默认不展示,避免信息太乱。 工具会优先把关键变更解释成“变更项 / 修改前 / 修改后”,识别不了时才退回普通代码片段。 如果你确实想看完整代码级 diff,可以手动加:

aicm review --diff
aicm commit --diff

执行 aicm commit 时还会继续:

  1. 让你确认最终 commit message
  2. 提交到本地仓库
  3. 再问你是否推送到远端

敏感文件保护

工具会默认跳过这些敏感文件,不发送给 AI:

  • .env
  • 证书文件
  • 私钥文件
  • token / secret / credentials 相关文件
  • .npmrc

这样可以降低把敏感信息发给模型的风险。

API Key 存储

现在这版已经把 API Key 从主配置里拆开了:

  • 主配置仍然在 config.json
  • API Key 单独保存在 secrets.json
  • 会尽量设置为更严格的本地文件权限

这比直接把 key 明文放在主配置里更安全一些。后续最值得继续升级的是系统钥匙串集成。

命令

aicm setup
aicm status
aicm review [--staged] [--diff]
aicm commit [--staged] [--diff]
aicm analyze [--staged]
aicm provider list
aicm provider add <providerId> <vendor> <apiKey> [model] [baseUrl]

下一步最值得做的

如果继续往“超级好用”做,我建议优先做:

  1. review 增加按文件逐项解释
  2. 接系统钥匙串替代 secrets.json
  3. 增加 aicm config 管理厂商和默认模型