g-cli 0.1.0

Git that talks back. A human-friendly CLI wrapper for Git.
The winning idea is:
👉 a CLI that makes Git feel like a conversation instead of a puzzle

Let’s mock what that actually looks like.

🧠 Core philosophy
Every command answers: “What just happened?”
Every risky action has: preview + safety net
Everything is named like intent, not mechanics
🧪 CLI name (placeholder)
g
🔍 1. “Explain what’s going on”
Command
g status
Output
You're on branch: feature/auth

Changes:
  ✏️ modified   src/login.js
  ➕ added      src/session.js
  ❌ deleted    src/oldAuth.js

Unstaged changes: 2 files
Staged changes:   1 file

Suggested next steps:
  → g save "describe your changes"
  → g stash (if you're switching tasks)

⚠️ Warning:
  You have 3 uncommitted changes and you're 12 commits behind main.
💾 2. Replace git add + commit
Command
g save "add session handling"
Output
Staging all changes...
Creating commit...

✔ Commit created:
  "add session handling"

Files:
  + src/session.js
  ~ src/login.js

You're now 1 commit ahead of origin/feature/auth
⏪ 3. The killer feature: “undo anything”
Command
g undo
Output
Last action detected:
  commit: "add session handling"

What would you like to undo?

  1) Undo commit, keep changes (soft reset)
  2) Undo commit, discard changes (hard reset)
  3) Cancel

> 1
✔ Commit undone.
Your changes are back in your working directory.

👉 This is where most tools fail — making this safe and obvious is huge.

🔀 4. Branching without confusion
Command
g switch login-fix
Output
Branch 'login-fix' does not exist.

Options:
  1) Create new branch from current branch
  2) Create from main
  3) Cancel

> 2
✔ Created and switched to 'login-fix' (from main)
🔥 5. “What the hell did I just do?”
Command
g explain
Output
Last 3 actions:

1) You merged 'feature/auth' into 'main'
   → This brought in 5 commits

2) Before that, you pulled from origin/main
   → Your branch was updated

3) Before that, you committed:
   "fix token expiration"

Current state:
  ✔ Clean working directory
  ✔ Up to date with origin/main
🧹 6. Clean up branches safely
Command
g clean
Output
Analyzing branches...

Safe to delete:
  - feature/old-login  (merged 2 weeks ago)
  - test/tmp-api       (no commits in 10 days)

Possibly unsafe:
  - wip/refactor-auth  (not merged)

Delete safe branches? (y/n)
🚀 7. Push without anxiety
Command
g push
Output
You're about to push:

Branch: feature/auth
Commits: 3

Summary:
  - add session handling
  - fix login bug
  - cleanup auth flow

Destination: origin/feature/auth

Proceed? (y/n)
🧪 8. Smart conflict resolver (big differentiator)
Command
g sync
Output
Pulling latest changes from origin/main...

⚠️ Merge conflict detected in:
  src/login.js

What would you like to do?

  1) Open interactive resolver
  2) Accept incoming changes
  3) Keep your version
  4) Abort merge
📜 9. Human-readable log
Command
g log
Output
Your recent work:

🟢 add session handling        (2 hours ago)
🟢 fix login bug               (3 hours ago)
🟡 refactor auth middleware    (yesterday)
🔵 merge branch 'feature/ui'   (2 days ago)

Tip:
  Run `g log --story` to see what changed in plain English
🧠 10. “Story mode” (this could go viral)
Command
g log --story
Output
Project story:

You started working on authentication improvements.

- You refactored middleware to simplify request handling
- Then fixed a bug in login validation
- Added session handling to persist user state

Later, you merged UI updates into your branch.

Current focus:
  Authentication system improvements
🧩 What makes this actually different

Most wrappers fail because they:

Just alias commands
Don’t reduce cognitive load
Don’t add context

This one:

Tracks intent
Adds explanations
Provides guardrails
Builds a mental model
⚙️ MVP scope (realistic)

If you were to build v1:

g status
g save
g undo ⭐
g explain

That alone is already compelling.