Skip to content
导航栏

czg

交互式命令行工具生成标准化的 git commit message

GitHub Repo starsawesome-cli-app
npmhomebrew


  • 🤖 OpenAI 支持. 让 AI 来辅助生成你 git commit 的描述信息
  • ⚡️ 轻量级 : 零依赖项 (1.5MB)
  • 🤗 简单且快速 : 无需前置配置,无需适配器,没有额外的步骤,你可以使用 npx | npm 脚本 | 全局下载... 在你的任何项目中快速启动
  • 😎 高度可定制化 : 内部包含 cz-git 的核心,继承了 cz-git 的所有特性,具有相同的行为,配置加载... 你可以根据自己的需要配置的 CLI 的行为

demo-gif

快速入门

  1. 你在你任何的项目中运行 npx czg
  2. 接下来让我们进行简单的配置,查看效果。创建 .czrc 在你的项目根路径中,然后运行相同的命令
json
{
  "$schema": "https://cdn.jsdelivr.net/gh/Zhengqbbb/cz-git@1.6.1/docs/public/schema/cz-git.json",
  "scopes": [
    "hello",
    "world"
  ]
}
{
  "$schema": "https://cdn.jsdelivr.net/gh/Zhengqbbb/cz-git@1.6.1/docs/public/schema/cz-git.json",
  "scopes": [
    "hello",
    "world"
  ]
}

TIP

关于配置文件以及配置项的更多信息,可查看 → 配置

特性以及帮助文档

sh
$ czg --help
NAME: 
    czg - Interactive Commitizen CLI that generate standardized git commit message

WEBSITE:
    https://cz-git.qbb.sh/cli/
    https://github.com/Zhengqbbb/cz-git

SYNOPSIS:
    czg [subcommand...] [options...] [git-commit-options...]

SUBCOMMAND:
    ai               Turn on OpenAI generate subject mode
    break            Turn on appends a ! after the type/scope
    emoji            Turn on output message with emoji mode
    checkbox         Turn on scope checkbox mode
    gpg              Turn on use GPG sign commit message
    
OPTIONS:
    :, --alias       Directly submit the defined commit message
    -r, --retry      Directly retry submit by the last message
    --config=        Specify the configuration file to use
    --openai-token=  Setup OpenAI API secret key to local (.config/.czrc)
    --api-proxy=     Setup request OpenAI API proxy to local (.config/.czrc)
    -N=,--ai-num=    Setting AI return number subjects and Turn on choose mode
    --no-ai          Turn off AI prompt mode in this session
    --unset-proxy    Unset request API proxy on local configure
    -h, --help       Show help
    -v, --version    Show version

EXAMPLES:
    czg
    czg emoji
    czg :fd
    czg --config="./config/cz.json"
    czg --openai-token="sk-XXXXX"
    czg ai -N=3

Extends 'git commit' options. 
See 'git commit --help' for more information. 
$ czg --help
NAME: 
    czg - Interactive Commitizen CLI that generate standardized git commit message

WEBSITE:
    https://cz-git.qbb.sh/cli/
    https://github.com/Zhengqbbb/cz-git

SYNOPSIS:
    czg [subcommand...] [options...] [git-commit-options...]

SUBCOMMAND:
    ai               Turn on OpenAI generate subject mode
    break            Turn on appends a ! after the type/scope
    emoji            Turn on output message with emoji mode
    checkbox         Turn on scope checkbox mode
    gpg              Turn on use GPG sign commit message
    
OPTIONS:
    :, --alias       Directly submit the defined commit message
    -r, --retry      Directly retry submit by the last message
    --config=        Specify the configuration file to use
    --openai-token=  Setup OpenAI API secret key to local (.config/.czrc)
    --api-proxy=     Setup request OpenAI API proxy to local (.config/.czrc)
    -N=,--ai-num=    Setting AI return number subjects and Turn on choose mode
    --no-ai          Turn off AI prompt mode in this session
    --unset-proxy    Unset request API proxy on local configure
    -h, --help       Show help
    -v, --version    Show version

EXAMPLES:
    czg
    czg emoji
    czg :fd
    czg --config="./config/cz.json"
    czg --openai-token="sk-XXXXX"
    czg ai -N=3

Extends 'git commit' options. 
See 'git commit --help' for more information. 

使用 czg CLI 的项目

Nx logoNxElement Plus logoElement PlusTDesign-Vue-Next logoTDesign-Vue-NextVben-Admin logoVben-Admin

LICENSE

MIT Copyright (c) 2022-present Qiubin Zheng zhengqbbb@gmail.com (https://github.com/Zhengqbbb)

I just do my best to make thing well, Could you give a star ⭐ to encourage me ?

我只是尽力将工具做得更好,如果可以的话欢迎给一个star ⭐