面向任意项目的 GitHub 仓库创建 / 一键提交 CLI,以及 Cursor / AI 助手自动提交规则。
官网:https://www.guanhuazhiyu.com/github-tool
公开库(安装脚本 / 规则 / 二进制):https://github.com/EhuaDB/github-tool-release
本仓库只放安装脚本、规则与 Release 二进制。源码私有维护,不影响你在任意项目里使用本工具。
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/EhuaDB/github-tool-release/main/scripts/install.sh | bashWindows(PowerShell)
irm https://raw.githubusercontent.com/EhuaDB/github-tool-release/main/scripts/install.ps1 | iex安装后重开终端(或 source 对应 shell 配置),确认:
github-tool --versiongithub-tool init填写 GitHub Personal Access Token、用户名、远端协议(ssh / https)。配置写入本机,不进项目仓库。
在你自己的任意项目根目录,或写入 Cursor User Rules:
mkdir -p .cursor/rules
curl -fsSL https://raw.githubusercontent.com/EhuaDB/github-tool-release/main/cursor-rules/github-tool-auto-commit.mdc \
-o .cursor/rules/github-tool-auto-commit.mdc之后 Cursor / AI 助手会在未提交增删行超过 10 行时,用 github-tool push 提交并推送(提交信息带日期)。
# 为当前项目创建私有库并绑定
github-tool create your-repo-name --path . -d "项目描述"
# 创建公开库
github-tool create your-repo-name --path . --public -d "开源项目"
# 开发后一键提交推送
github-tool push -m "2026-08-05 feat: 完成登录"
github-tool push| 系统 | 架构 | 安装包名 |
|---|---|---|
| macOS | x64 | github-tool-x86_64-apple-darwin.tar.gz |
| macOS | ARM64 | github-tool-aarch64-apple-darwin.tar.gz |
| Linux | x64 | github-tool-x86_64-unknown-linux-gnu.tar.gz |
| Linux | ARM64 | github-tool-aarch64-unknown-linux-gnu.tar.gz |
| Windows | x64 | github-tool-x86_64-pc-windows-msvc.zip |
# macOS / Linux(克隆本仓库后)
./scripts/uninstall.sh
# Windows
.\scripts\uninstall.ps1