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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lobehub/commit-cli

v2.15.2

Published

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

Downloads

1,218

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 版本 >= 18

🤯 使用

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

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

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

AI 模式

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

[!IMPORTANT]
需要在设置中 lobe-commit -o 配置 OpenAI 令牌,同时如果有特殊的网络要求,也可以在设置中配置 OpenAI 的转发地址

编辑器模式

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

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

Git hook

可以通过 prepare-commit-msg钩子将 Lobe Commit 与 Git 集成,允许像往常一样使用 Git 并在提交之前编辑提交信息

安装

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

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

卸载

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

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

配置

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

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

运行

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

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

  • 要使用 AI 自动生成,需要在设置中填写 OpenAI 令牌
  • 要自动拉取私人仓库 issues,需要在设置中填写具有 repo 权限的 GitHub 令牌

选项

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,大展身手,向我们展示你的奇思妙想。

🔗 链接

More Products

  • 🤖 Lobe Chat - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
  • 🤯 Lobe Theme - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.

Credits


📝 License

Copyright © 2023 LobeHub. This project is MIT licensed.