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

@lobehub/commit-cli

v2.20.2

Published

Lobe Commit is a CLI tool that uses ChatGPT to generate Gitmoji-based commit messages

Readme

Lobe Commit 是一款使用 ChatGPT 生成基于 Gitmoji 的 CLI 提交工具

English・简体中文・Changelog · Report Bug · Request Feature

TOC

✨ 特性

  • [x] 🤯 支持使用 ChatGPT 根据 git diffs 自动生成提交信息
  • [x] 🛠️ 流畅的提交信息编辑流程
  • [x] 😜 支持添加 Gitmoji
  • [x] 📝 支持 Conventional Commits 规范
  • [x] ⚡️ 支持拉取 issues 列表并便捷绑定
  • [x] 💄 支持自定义 Prompt
  • [x] 🗺️ 支持多语言提交信息

📦 安装

要安装 Lobe Commit,请运行以下命令:

npm install -g @lobehub/commit-cli

[!IMPORTANT]
请确保环境中 Node.js 版本 >= 22

🤯 使用

使用 lobe-commit 命令为暂生成提交信息信息:

$ git add <files...>
$ lobe-commit

[!NOTE]
如果认为 lobe-commit 太长了,可以使用lobe别名

AI 模式

在 AI 模式下,可以使用 ChatGPT 生成完整的提交信息

[!IMPORTANT]
需要在设置中 lobe-commit -o 选择模型供应商(OpenAI、Anthropic、Gemini、DeepSeek、通义千问、Kimi、智谱 GLM、OpenRouter、Ollama 及任意 OpenAI 兼容接口等),依次选择接口协议(Chat Completions / Responses / Anthropic Messages / Gemini)、API 地址、API 密钥,再从供应商的模型列表中搜索选择模型。任意兼容接口可选择 custom。也可以用 LOBE_PROVIDER LOBE_API_TYPE LOBE_BASE_URL LOBE_API_KEY 环境变量覆盖设置。较大的 diff 会按 Diff chunk tokens(默认 32000)分片

编辑器模式

在编辑器模式下,可以通过简单的流程生成 <type>(<optional scope>): <subject> [<issues>] 格式的提交信息,使用 TAB 返回上一步

[!NOTE]
如果项目是 GitHub Repo,则将自动获取该仓库的 issues,可以使用 空格 选择多个问题将其链接到提交信息中

私密仓库自动跳过: 当处理私密仓库时,如果您未配置 GitHub 令牌或遇到认证问题,工具将自动跳过 issues 链接步骤并继续进行提交生成。这样可以防止工作流程卡住,同时仍允许在需要时手动链接 issues。

Git hook

可以通过 prepare-commit-msg钩子将 Lobe Commit 与 Git 集成,允许像往常一样使用 Git 并在提交之前编辑提交信息。git commit -m / -F、合并、squash 和 amend 会保留已有信息,不会打开向导

安装

要在项目中安装 hook,请运行以下命令:

$ lobe-commit --init # 或使用短标志 -i

卸载

要从项目中卸载 hook,请运行以下命令:

$ lobe-commit --remove # 或使用短标志 -r

AI Agent Skill

安装 lobe-commit skill,让 Claude Code、Cursor、Codex、Copilot 等编程 Agent 知道如何使用它,包括按 lobe-commit 的格式编写提交信息:

$ lobe-commit skill                # 当前项目:.agents/skills,存在 .claude 时同时安装到 .claude/skills
$ lobe-commit skill --global       # 安装到用户目录
$ lobe-commit skill --agent claude # 只安装到 .claude/skills(可选 agents / claude)

旧版本写入的配置会在下次运行任意 lobe-commit 命令时自动迁移到新格式。

配置

要配置 Lobe Commit,请运行以下命令:

$ lobe-commit --option # 或使用短标志 -o

运行

要进行 commit 提交,请运行以下命令:

$ lobe-commit --hook # 两个命令任选其一
$ git commit

  • 要使用 AI 自动生成,需要在设置中选择供应商和模型
  • 要自动拉取私人仓库 issues,需要在设置中填写具有 repo 权限的 GitHub 令牌

[!NOTE]
GitHub 令牌配置: 对于私密仓库或当您想要自动链接 issues 时,您需要配置具有适当权限的 GitHub 令牌。如果未提供令牌或存在认证问题(无效令牌、网络超时等),工具将自动跳过 issues 链接步骤并继续提交过程。您仍然可以在需要时手动输入 issue 编号。

错误处理: 工具优雅地处理各种场景,包括:

  • 未配置 GitHub 令牌
  • 无效或过期的令牌
  • 网络连接问题
  • 私密仓库访问限制
  • API 速率限制和超时

选项

Lobe Commit 支持以下选项:

--hook 使用基于提示的交互方式进行 commit 提交
-a, --ai 由 Ai 生成提示
-o, --option 设置 lobe-commit 首选项
-i, --init 将 lobe-commit 初始化为提交钩子
-r, --remove 移除先前初始化的提交钩子
-l, --list 列出所有支持的提交类型
-V, --version 打印 lobe-commit 的安装版本
-h, --help 打印基本选项

⌨️ 本地开发

可以使用 Github Codespaces 进行在线开发:

或者,可以克隆存储库并运行以下命令进行本地开发:

$ git clone https://github.com/lobehub/lobe-cli-toolbox.git
$ cd lobe-cli-toolbox
$ bun install
$ cd packages/lobe-commit
$ bun dev

🤝 参与贡献

我们非常欢迎各种形式的贡献。如果你对贡献代码感兴趣,可以查看我们的 GitHub Issues,大展身手,向我们展示你的奇思妙想。

🔗 链接

  • 🤯 LobeHub - 首席 Agent 运营官,帮你招募、调度并汇报整个 AI 团队的 7×24 运转
  • 🍭 Lobe UI - 面向 AI 应用的 React 组件库
  • 🥨 Lobe Icons - AI / LLM 品牌 Logo 与图标
  • 📊 Lobe Charts - React 图表组件
  • 🖋️ Lobe Editor - 基于 Lexical 的 React 富文本编辑器,支持 Markdown、插件与聊天输入框
  • 📖 Docs Kit - 可复用的文档工具包与 lobedocs CLI,用于 LobeHub 组件库文档
  • 🌊 Streamdown - 面向 React 的无头流式 Markdown 引擎


📝 License

Copyright © 2023 LobeHub. This project is MIT licensed.