Git Navigator is an AI-powered CLI tool that converts natural language instructions into safe, structured, and executable git commands.
You describe what you want to do.
Git Navigator figures out how to do it — safely.
- 🧠 Natural language → git commands
- 🧭 Step-by-step execution plan
- 🔍 Dry-run mode by default (safe preview)
⚠️ Risk level estimation for each operation- ✅ User confirmation before execution
- 🤖 AI-powered intent interpretation (GitHub Copilot / LLM)
- 🛡 Designed for real production repositories
npm install
npm run build
npm linkAfter linking, the CLI becomes globally available:
gitnavigator --helpBasic usage (dry-run)
gitnavigator -- "Please revert last commit"📝 By default, Git Navigator runs in dry-run mode and does not execute any git commands.
Execute commands
gitnavigator -- "Please revert last commit from branch release/1" --applyYou will be asked to confirm before execution.
Using -m (message flag)
gitnavigator -m "Create new branch release-maintenance" --apply🧭 Git Navigator
Proposed plan:
1. Switch to branch release/1
git checkout release/1
2. Revert last commit
git revert HEAD
Risk level: high
✔ Proceed with execution? Yes
→ git checkout release/1
→ git revert HEAD
✔ Done
⚙️ Supported Actions
The AI planner currently supports the following git operations:
* create_branch
* revert_commits
* cherry_pick
* merge
* create_release_branches
The architecture is extensible, making it easy to add new actions.
-
The CLI receives a natural language instruction
-
AI interprets the intent into structured JSON
-
buildPlan converts the intent into executable git steps
-
The user reviews and confirms the plan
-
Commands are executed sequentially
-
Dry-run enabled by default
-
Explicit user confirmation required
-
Risk level displayed before execution
-
No hidden or implicit side effects
-
Git Navigator is designed to assist, not replace, your understanding of git.
Run locally
npm run dev -- "Please revert last commit"Run tests
npm testsrc/
├─ cli/ # CLI entry point & runner
├─ copilot/ # AI interpretation layer
├─ git/ # Git inspection, planning & execution
└─ safety/ # some safety rools
test/ # place for unit tests
## ⚠️ Disclaimer
This tool does not replace git knowledge.
Always review the proposed plan before execution.
You are responsible for the commands executed in your repository.