This is a submission for the GitHub Copilot CLI Challenge
What I Built
Let’s be honest.
I don’t really remember all git commands and usually have to google if I want to revert some changes or make cherry-picking or something like this.
“I just want to revert the last commit… but on that branch… without breaking prod… please.”
So I built Git Navigator — an AI-powered CLI that turns natural language into safe, reviewable git commands.
The Idea
What if you could just say:
Please revert last commit from branch release/1
And your terminal replied:
“Cool. Here’s what I’m about to do.
Take a look. Breathe. Confirm.”
That’s Git Navigator.
What Is Git Navigator?
- Git Navigator is an AI-powered CLI that:
- Accepts natural language instructions
- Converts them into structured git operations
- Builds a step-by-step execution plan
- Shows risk level
- Runs in dry-run mode by default
- Asks for confirmation before doing anything dangerous
In short:
You describe what you want
The tool figures out how to do it — safely
Example
gitnavigator -m = "Please revert last commit from branch release/1"
Output:
🧭 Git Navigator
Proposed plan:
1. Switch to branch release/1
git checkout release/1
2. Revert last commit
git revert HEAD
Risk level: high
Dry-run mode. No commands executed.
Demo
Architecture
Natural language
↓
AI (Copilot)
↓
Structured intent (JSON)
↓
buildPlan.ts
↓
Concrete git commands
↓
Execution
Installation and Local (Development)
npm install
npm run build
npm link
After linking, the CLI becomes globally available:
gitnavigator --help
Code
🧭 Git Navigator
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.
✨ Features
- 🧠 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
📦 Installation
Local (Development)
npm install
npm run build
npm link
After linking, the CLI becomes globally available:
gitnavigator --help
🚀 Usage
Basic 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" --apply
You…
My Experience with GitHub Copilot CLI
While building Git Navigator , GitHub Copilot CLI played a very specific and intentional role:
it was used as a planning assistant, not as an execution engine.
Instead of asking Copilot to run commands directly, I used it to translate natural language intent into structured JSON instructions. This allowed me to keep full control over execution logic while still benefiting from Copilot’s language understanding.
What Worked Well
Intent interpretation
Copilot CLI was very effective at understanding vague or high-level instructions like
“Please revert last commit from branch release/1” and turning them into actionable intent.Consistency with a strict prompt
By enforcing a system prompt that allowed only JSON output, I was able to reliably parse responses and avoid hallucinated explanations or unsafe commands.Fast iteration
Using Copilot CLI directly in the terminal made it easy to iterate on prompts and immediately see how small prompt changes affected the output.
This forced me to design a clear separation:
Copilot plans
The CLI decides
The user confirms
Final Thoughts
Git Navigator is here to meet developers where they are — thinking in intent, not syntax.
If you’ve ever:
- Googled “how to revert last commit”?
- Panicked after pressing Enter?
- Or whispered “please work” to your terminal…?
This tool my be for you.
Thanks for reading — and happy navigating 🧭 ⛴
Feedback and contributions are more than welcome!
P.S. Covered image was generated by dev.to platform ;-)




Top comments (0)