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

@git-ai/cli

v1.0.6

Published

一个基于 AI 的 Git 提交消息生成器 CLI 工具,可自动分析代码变更并生成符合规范的提交信息

Downloads

130

Readme

@git-ai/cli

npm version npm downloads Build Status License: MIT

基于 AI 的 Git 提交消息生成器,自动分析代码变更并生成规范的 commit message。

✨ 特性

  • 🤖 AI 自动生成提交消息
  • 🔄 完整 Git 工作流 (add/commit/fetch/merge/push)
  • 🛡️ 冲突检测 (Git 冲突 + 代码冲突标记)
  • 🔍 AI 诊断 (commit 失败时自动分析)
  • ⚙️ 灵活配置 (支持多 API/模型/密钥)
  • 🎯 符合规范 (feat/fix/docs 等格式)

📦 安装

npm install -g @git-ai/cli

🚀 快速开始

1. 配置 API

git ai set-baseURL https://api.siliconflow.cn/v1
git ai set-key your-api-key
git ai set-model Qwen/Qwen2.5-Coder-7B-Instruct

2. 生成提交

git ai

工具会自动执行:git add → AI 生成消息 → git commitgit fetchgit mergegit push

📖 常用命令

| 命令 | 说明 | | ---------------------------- | ----------------- | | git ai | 生成并提交 | | git ai -e, --allowEmpty | 允许空提交 | | git ai -n, --noVerify | 跳过 Git hooks | | git ai -s, --skip | 跳过 git add | | git ai set-baseURL <url> | 设置 API 地址 | | git ai set-key <key> | 设置 API 密钥 | | git ai set-model <model> | 设置模型 | | git ai set-max-token <num> | 设置最大 token 数 |

⚙️ 配置说明

多 API/模型支持

# 多个地址(随机选择)
git ai set-baseURL https://api1.com/v1,https://api2.com/v1

# 多个密钥(随机选择)
git ai set-key key1,key2,key3

# 多个模型(随机选择)
git ai set-model gpt-4,claude-3,gemini-pro

🔧 工作流程

检查环境 → git add → AI 生成消息 → git commit → git fetch → git merge → git push

📝 提交消息格式

<type>(<username>): <description>

[详细说明]

类型: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

示例:

$ git ai
git-ai verb @git-ai/[email protected]
git-ai verb 按 Ctrl+C 退出...
git-ai success AI 生成的内容:
docs(John): 更新文档和代码格式规范

- 添加了 select-model 命令的环境变量配置说明
- 统一了代码中的引号使用为双引号
- 修复了 package.json 中缺少的 access 字段
- 规范化了代码缩进和格式
git-ai info 本次模型消耗统计:总数 17050 tokens、输入 16977 tokens、输出 73 tokens
git-ai success git commit 提交成功...
git-ai info 获取 git 远程仓库地址
git-ai success 获取 git 远程仓库地址成功
git-ai info 获取远程仓库最新状态,执行 git fetch...
git-ai success 远程分支 origin 的最新更改状态获取成功
git-ai info 正在检测是否需要拉取...
git-ai success 本地代码是最新,无需合并
git-ai info 正在推送本地分支与远程分支的差异...
git-ai success 本地分支与远程分支的差异已推送。
git-ai verb 日志地址: C:\Users\用户名\.config\git-ai\cli\logs\2025-11\log-2025-11-22_10-56-59.txt
git-ai verb 本次执行指令耗时: 14.481 秒,程序退出...

📋 系统要求

  • Node.js >= 12.20.0
  • Git >= 2.0.0

📄 许可证

MIT License