UNPKG

gchcg-cli

Version:
121 lines (84 loc) 2.04 kB
# 脚手架 > `node >= v20.0.0` ## 安装 ```sh npm install -g gchcg-cli ``` ## 使用 ```sh cg help cg publish cg push # ai 生成 commit message,执行 add commit push cg commit ``` ### 示例 ```bash $ cg commit gchcg-cli info cli 2.2.13 gchcg-cli verb 当前使用模型:deepseek-chat gchcg-cli success git add 成功 gchcg-cli success AI 生成的内容: feat(zhangsan): 添加getOptionKey方法用于获取option数据 在设备类型管理组件中新增getOptionKey工具方法,用于从数据源中根据指定key查找对应的值。同时修改了提交逻辑,在提交参数时自动填充type字段。 gchcg-cli success 模型统计: 输入321 tokens、输出 53 tokens、费用 0.00007995 gchcg-cli success commit 提交成功 gchcg-cli success 代码推送成功 gchcg-cli verb 本次执行指令耗时:24.093秒 ``` ### ai commit 配置 > 设置 `baseUrl` ```sh # ollama ----------- http://localhost:11434/v1 # deepseek --------- https://api.deepseek.com/v1 # siliconflow ------ https://api.siliconflow.cn/v1 # openai ----------- https://api.openai.com/v1 # openrouter ------- https://openrouter.ai/api/v1 # 简写 cg commit -u cg commit --baseUrl ``` > 设置 `token` ```sh # 简写 cg commit -t cg commit --setToken ``` > 选择模型 `model` ```sh # 简写 cg commit -m cg commit --setModel ``` ## 版本 v1.1.10 ```md 增加: - 跳过 git add,直接 commit。指令:git push -s 或者 git push --skip ``` v1.1.19 ```md 修复 bug: - 修复检查更新时,文件读取错误的问题 ``` v1.1.20 ```md 增加: - 增加 push 时,没有需要 commit 的文件的提示 - 增加 push 时,没有需要 push 的文件的提示 ``` v1.1.21 ```md bug: - 每天检查一次版本,如果检查到有更新,则提示更新 ``` v2.1.4 ```md 增加: - 增加 ai 生成 commit ``` v3.0.0 ``` 增加: - ai commit 费用统计 ``` ``` ```