A Git automation CLI tool with PR and merge workflow
npm install git-autotoolbash
npm install -g git-autotool
`
Verify install:
`bash
auto --help
`
---
๐ ๏ธ Usage
Start interactive mode:
`bash
auto git
`
Or run individual commands:
`bash
auto add
auto branch
auto pr
auto merge
`
---
๐งญ Interactive Commands
Inside auto git, type:
| Command | Description |
|-----------|-----------------------------------------------|
| add | Auto add โ commit โ push |
| branch | Branch manager (create, delete, switch, pull) |
| pr | Create Pull Request (auto-auth via gh) |
| merge | Merge branch with conflict inspector |
| exit | Exit interactive mode |
---
๐ GitHub Authentication (No Token Required)
git-autotool uses GitHub CLI to authenticate automatically.
If not installed, the tool:
1. Detects that gh is missing
2. Offers two options:
- Open GitHub CLI download page
- Auto-install via Winget
First-time setup:
`
gh auth login
`
After that, PR creation works automatically.
---
๐ Project Structure
`
git-autotool/
โ
โโโ bin/
โ โโโ simple.js # CLI entry file
โ
โโโ src/
โ โโโ commands/
โ โ โโโ add.js # Add โ Commit โ Push
โ โ โโโ branch.js # Branch manager
โ โ โโโ pr.js # Pull Request generator
โ โ โโโ merge.js # Branch merge & conflict resolver
| | โโโ git.js # All the functionality to be done
โ
โโโ package.json
โโโ README.md
`
---
๐งช Example Workflow
$3
`bash
auto add
`
$3
`bash
auto pr
`
`
โ Pull Request Created!
๐ https://github.com/user/repo/pull/23
`
$3
`bash
auto merge
``