Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ node_modules
dist
.DS_Store
.env
coverage
coverage
tests/sandbox/
tests/sandbox/repo/
Binary file modified CHANGELOG.md
Binary file not shown.
83 changes: 74 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,78 @@
# 🧰 plain-git
# 🚀 plain-git
### _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix heading level increment.

The heading level jumps from h1 to h3, skipping h2. Markdown best practices require incrementing heading levels by one at a time.

Apply this diff:

-### _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
+## _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
## _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

2-2: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🤖 Prompt for AI Agents
In README.md around lines 2 to 2, the heading currently uses an h3 ("###
_Operate Git in plain English — a fully interactive, human-friendly Git CLI_")
immediately after the h1, skipping h2; change the heading level from h3 to h2
(replace "###" with "##") so heading levels progress incrementally and conform
to Markdown best practices.


A lightweight, cross-platform Node.js + TypeScript library and CLI that lets developers perform Git actions through plain English or short commands — powered by the native `git` CLI.
![banner](https://dummyimage.com/1200x200/222/fff&text=plain-git)

## 🚀 Features
- Zero runtime dependencies
- Cross-platform (Windows, macOS, Linux)
- Can be used as CLI or programmatically
- Lightweight and developer-friendly
---

## 📦 What is plain-git?

**plain-git** is a modern, interactive Git CLI that lets developers perform Git operations using **plain English**, guided prompts, clean menus, and a manager-driven architecture.

Think of it as:

> **Git for humans.**
> **A command palette inside your terminal.**
> **Zero memorization + maximum productivity.**
---

## ✨ Features

### 🖥 Beautiful interactive CLI
- ASCII banner
- Color-coded logs
- Scrollable menus
- Current branch indicator
- Clear grouped categories

### 🧠 Full Manager-Based Architecture
Every domain of Git is isolated into a clean “Manager”:

| Manager | Responsibilities |
|--------|------------------|
| **RepositoryManager** | init, clone, status, config, remotes, fsck, GC |
| **BranchManager** | create, rename, switch, delete, push upstream |
| **CommitManager** | stage, unstage, commit, amend, logs, diffs |
| **RemoteManager** | remotes, push, pull, fetch, sync |
| **StashManager** | stash create/apply/pop/drop/clear |
| **TagManager** | tags (LS, create, annotate, delete, push) |
| **MergeManager** | merge, conflicts, abort/continue |
| **ConflictManager** | conflict markers, editor open, diff |
| **RebaseManager** | rebase, interactive, skip/continue/abort |
| **HistoryManager** | history, reflog, diff, blame |
| **ResetManager** | soft/mixed/hard reset, discard changes |

Everything runs interactively — no need to remember Git syntax.

---

## 🧪 Full Test Suite (Vitest)

plain-git ships with complete tests for:

- RepositoryManager
- BranchManager
- CommitManager
- RemoteManager
- StashManager
- TagManager
- MergeManager
- ConflictManager
- RebaseManager
- HistoryManager
- ResetManager

With:

- Mocks for `inquirer`, `execSync`, `fs`
- Fully isolated sandbox environment
- Deterministic CI behavior
- Zero real Git side effects

---

## 🔧 Installation

## 🧑‍💻 Usage
```bash
npx plain-git
npm install -g plain-git
8 changes: 8 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
}
}
Loading