gitease-cli
v2.0.1
Published
AI-powered git workflows — understands your actual code, not just your commands
Maintainers
Readme
GitEase
AI-powered git workflows — understands your actual code, not just your commands
GitEase reads your real diffs and file structure to handle complex git situations intelligently — resolving conflicts, generating meaningful commit messages, and flagging risky changes before they land.
Features
- Smart commit messages — generated from your actual diff, never a placeholder
- Merge conflict resolution — reads both sides of a conflict, understands the context, suggests or applies a fix
- Risky change detection — warns when auth, payment, or config files are modified without test updates
- Related file suggestions — when an exported function or interface changes, flags other files that likely need updating
- Multi-step workflows — chain operations like "commit and push" or "pull and merge" as a coordinated pipeline
- Smart branch recovery — if a branch doesn't exist locally, offers to track from remote or create it
- Safety-first — preview commands before execution, with risk-level warnings for destructive operations
- Undo history — tracks every action so you can reverse mistakes
Installation
npm install -g gitease-cliPrerequisites:
- Node.js 18+
- A Groq API key — free to sign up
export GROQ_API_KEY=your_key_hereAdd that line to your
~/.zshrcor~/.bashrcso you only do it once.
Quick Start
# In any git repo
gitease "commit everything"
gitease "pull and merge main"
gitease "undo my last commit but keep the changes"Usage
Natural language queries
# Commits
gitease "commit everything"
gitease "stage and commit my auth changes"
gitease "undo my last commit but keep the changes"
# Branches
gitease "create a new branch called feature-auth"
gitease "switch to main and pull latest"
gitease "delete the feature-test branch"
# History
gitease "show me what changed in the last commit"
gitease "show commit history for the past week"
# Advanced
gitease "cherry pick commit abc123"
gitease "squash last 3 commits"
gitease "interactive rebase last 5 commits"Multi-step workflows
GitEase detects compound requests and runs them as a pipeline:
gitease "stage everything, commit, and push"
gitease "pull from origin and merge main"
gitease "fetch and rebase onto main"Example output:
Multi-step workflow (3 steps)
1. git add -A
2. git commit -m "fix: resolve session expiry on token refresh"
3. git push origin main
Run this workflow? (y/N): y
[1/3] ✓ git add -A
[2/3] ✓ git commit -m "fix: resolve session expiry on token refresh"
[3/3] ✓ git push origin main
✓ DoneSmart commit messages
When you run a commit, GitEase reads your actual diff and generates a message that describes what changed:
✓ Suggested commit message:
fix: resolve session expiry bug in token refresh flow
- TokenService.refresh() now resets expiry timer on each call
- Added null check for missing session in AuthMiddleware
Use this message? (y/N):Merge conflict resolution
When a merge or pull creates conflicts, GitEase reads each conflict block, understands both sides, and suggests a resolution:
⚠ Merge conflict detected in 2 files
src/auth/token.ts
src/middleware/session.ts
Resolve conflicts with AI? (y/N): y
[1/2] Resolving src/auth/token.ts...
[2/2] Resolving src/middleware/session.ts...
✓ Conflicts resolved — files staged and ready to commitRisky change detection
Before committing, GitEase checks whether sensitive files were modified without test coverage:
⚠ Risky changes detected
src/auth/middleware.ts — authentication logic modified
src/config/permissions.ts — permission rules changed
No test files updated in this commit.
These files affect auth and access control — consider adding tests before pushing.
Commit anyway? (y/N):Related file suggestions
When an exported function or interface changes, GitEase scans the codebase for other files that reference it:
⚠ Related files may need updating
UserSession interface changed
Referenced in:
• src/routes/profile.ts
• src/services/cache.ts
• src/hooks/useAuth.tsBuilt-in commands
gitease status # Detailed repository status
gitease history # Command history
gitease undo # Undo last executed command
gitease --help
gitease --versionSafety model
GitEase categorises commands by risk before executing:
| Level | Operations | Behaviour |
|---|---|---|
| Safe | status, log, diff, add | Minimal confirmation |
| Warning | merge, rebase, push, commit | Shows preview + confirmation |
| Dangerous | reset --hard, push --force, clean -fd, branch -D | Shows diff + strong warning |
Undo history
Every command is saved to ~/.gitease-ledger.json.
gitease historyRecent commands:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. git commit -m "fix: token expiry"
/Users/you/projects/my-app — 2 minutes ago
2. git add src/auth.ts
/Users/you/projects/my-app — 5 minutes agogitease undo # Reverses the last action where possibleReversible: commit, add, checkout -b, merge (if in progress)
Not reversible: push, reset --hard, destructive operations — GitEase will tell you before it runs them.
How it works
You type plain English
"commit and push my auth changes"
↓
GitEase validates
✓ Git repo exists
✓ AI connected
✓ Repo has commits
↓
Workflow detection
Single command → one-shot
Multi-step → pipeline plan
↓
AI reads your diff + file structure
Generates command(s) and commit message
Checks for risky files and broken references
↓
Safety check
Risk level assessed
Preview shown
↓
You confirm
↓
Executes sequentially
Handles conflicts if they arise
Saves to historyDevelopment
git clone https://github.com/simukuka/gitease.git
cd gitease
npm install
npm run build
npm linknpm run build # Build once
npm run dev # Watch mode
node dist/cli.js "your query" # Run without installingTroubleshooting
gitease command not found
npm config get prefix
# Add <prefix>/bin to your PATHCould not connect to AI
# Make sure your key is exported in the current shell
echo $GROQ_API_KEY
# If empty, add to your shell profile
export GROQ_API_KEY=your_key_hereContributing
- Fork the repo
- Create a branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m "feat: add your feature" - Push and open a pull request
License
MIT © simukuka
