Skip to content

Commit dd05f28

Browse files
Merge pull request #6 from prakashaditya13/release/v1.0.0-beta.1
Promote Release: v1.0.0-beta.1 → main
2 parents 44a3db2 + d05d24a commit dd05f28

24 files changed

+4660
-177
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
dist
33
.DS_Store
44
.env
5-
coverage
5+
coverage
6+
tests/sandbox/
7+
tests/sandbox/repo/

CHANGELOG.md

7.38 KB

plain-git Changelog

[1.0.0-alpha] — Phase 1 Core Setup (2025-11-09)

✨ Added

  • CLI entry point with figlet banner and interactive menu (src/cli/index.ts)
  • Git environment detection (src/core/GitDetector.ts)
  • Git command executor (src/core/GitExecutor.ts)
  • Logger utility for styled console output (src/utils/Logger.ts)

⚙️ Configuration

  • Configured TypeScript (CommonJS, ES2020 target)
  • Added npm scripts for build, dev, and clean
  • Added cross-platform dependency setup (chalk, inquirer, figlet)

📦 CHANGELOG — v1.0.0-beta.1

Release Date: 2025-11-21
Status: Beta Release

This is the first public beta of plain-git, introducing the complete baseline architecture, CLI, managers, and test suite.
The release focuses on full interactive Git workflows powered by plain-English commands and a fully extensible manager-based system.


🚀 Highlights

  • Brand-new interactive CLI with clean UX, categorized menus, colored output, and dynamic prompts.
  • Complete Git operation abstraction through specialized managers.
  • Fully implemented test suite (Vitest) for every manager.
  • Internal system architecture finalized for beta stability.
  • Ready for external contributors, issue tracking, and PR workflows.

🛠 Added

Core System

  • Full CLI entrypoint with:
    • ASCII banner
    • Environment checks
    • Dynamic command mapping
    • Current-branch indicator
    • Grouped menu categories
  • Added HandleCommands core dispatcher.
  • Implemented project-wide Logger with color-coded output.

Managers (Complete Feature Set)

RepositoryManager

  • Init repository (standard / bare)
  • Clone repo
  • Show status (short / long)
  • Show & set Git config
  • Manage remotes (add / update / remove / list)
  • Show repo info
  • Repository integrity check (git fsck)
  • GC / repository optimization

BranchManager

  • Create branch
  • Create & switch
  • Switch existing branch
  • Delete branch (safe & force)
  • Rename branch
  • List branches
  • Show current branch
  • Push & set upstream

CommitManager

  • Stage all files
  • Stage selected files
  • Unstage selected files
  • Commit changes
  • Amend last commit
  • Undo last commit (soft)
  • Show last commit details
  • Show log (graph, detailed, compact)
  • Show diff (unstaged, staged)

RemoteManager

  • List remotes
  • Add / rename / remove remote
  • Push (simple & upstream)
  • Pull
  • Fetch
  • Show remote info
  • Sync all remotes

StashManager

  • Create stash (optionally with message)
  • List stashes
  • Apply stash
  • Pop stash
  • Drop stash
  • Clear all stashes

TagManager

  • List tags
  • Create tag (lightweight & annotated)
  • Show tag details
  • Delete tag
  • Push all tags
  • Push single tag

MergeManager

  • Merge selected branch
  • Detect merge conflicts
  • Show conflicting files
  • Abort merge
  • Continue merge

ConflictManager

  • List files with conflict markers
  • Inspect conflict markers inside selected file
  • Open file in editor
  • Show diff for conflicting file
  • Conflict resolution guide

RebaseManager

  • Start rebase
  • Interactive rebase
  • Continue / skip / abort
  • Detect conflicts

HistoryManager

  • Show history (multiple formats)
  • Reflog
  • Commit details
  • Compare commits
  • File diff
  • File history
  • Blame
  • Author summary

ResetManager

  • Undo last commit (soft / mixed / hard)
  • Reset to specific commit
  • Discard file changes
  • Clean untracked files
  • Interactive reset flow

🧰 Developer ExperienceTooling

  • Auto-detects missing Git installations
  • Prompts to initialize repo if .git folder missing
  • Clean console output with emojis and colored text
  • Global CLI executable (plain-git) via npm bin

🟢 Status: Phase 1 complete
🧩 Next: Phase 2 – Add RepositoryManager, BranchManager, CommitManager

  • Completed Vitest test suites for all managers.
  • Added mocks for:
    • inquirer
    • execSync
    • fs
    • GitExecutor
  • Sandbox-safe testing environment.
  • Added path alias support (@/...).

🧹 Changed / Improved

  • Refactored GitExecutor to handle stdout/stderr cleanly.
  • Improved command substitution handling.
  • Added current-branch display in menu banner.
  • Cleaner UX in grouped menu system.
  • Updated internal mapping structure for dynamic command handlers.
  • Normalized output logs across all managers.

🐛 Fixed

  • Fixed issues with git fsck output not showing.
  • Fixed terminal menu scrolling issue.
  • Fixed sandbox repo accidentally being tracked.
  • Fixed repeated menu rendering bug.
  • Fixed incorrect placeholder replacements in command list.

🧪 Testing

Added test suites for:

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

Ensured:

  • Fully mocked STDIN/STDOUT
  • No real Git operations
  • No async timeouts
  • Deterministic CI behavior

⚙️ Internal Architecture Finalized

The beta finalizes the stable core architecture for all future expansions:

  • Git abstraction layer (GitExecutor)
  • Manager registry
  • Command handler dispatcher
  • CLI lifecycle:
    banner → environment check → menu → command execution
  • Test-ready modular design

README.md

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,78 @@
1-
# 🧰 plain-git
1+
# 🚀 plain-git
2+
### _Operate Git in plain English — a fully interactive, human-friendly Git CLI_
23

3-
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.
4+
![banner](https://dummyimage.com/1200x200/222/fff&text=plain-git)
45

5-
## 🚀 Features
6-
- Zero runtime dependencies
7-
- Cross-platform (Windows, macOS, Linux)
8-
- Can be used as CLI or programmatically
9-
- Lightweight and developer-friendly
6+
---
7+
8+
## 📦 What is plain-git?
9+
10+
**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.
11+
12+
Think of it as:
13+
14+
> **Git for humans.**
15+
> **A command palette inside your terminal.**
16+
> **Zero memorization + maximum productivity.**
17+
18+
---
19+
20+
## ✨ Features
21+
22+
### 🖥 Beautiful interactive CLI
23+
- ASCII banner
24+
- Color-coded logs
25+
- Scrollable menus
26+
- Current branch indicator
27+
- Clear grouped categories
28+
29+
### 🧠 Full Manager-Based Architecture
30+
Every domain of Git is isolated into a clean “Manager”:
31+
32+
| Manager | Responsibilities |
33+
|--------|------------------|
34+
| **RepositoryManager** | init, clone, status, config, remotes, fsck, GC |
35+
| **BranchManager** | create, rename, switch, delete, push upstream |
36+
| **CommitManager** | stage, unstage, commit, amend, logs, diffs |
37+
| **RemoteManager** | remotes, push, pull, fetch, sync |
38+
| **StashManager** | stash create/apply/pop/drop/clear |
39+
| **TagManager** | tags (LS, create, annotate, delete, push) |
40+
| **MergeManager** | merge, conflicts, abort/continue |
41+
| **ConflictManager** | conflict markers, editor open, diff |
42+
| **RebaseManager** | rebase, interactive, skip/continue/abort |
43+
| **HistoryManager** | history, reflog, diff, blame |
44+
| **ResetManager** | soft/mixed/hard reset, discard changes |
45+
46+
Everything runs interactively — no need to remember Git syntax.
47+
48+
---
49+
50+
## 🧪 Full Test Suite (Vitest)
51+
52+
plain-git ships with complete tests for:
53+
54+
- RepositoryManager
55+
- BranchManager
56+
- CommitManager
57+
- RemoteManager
58+
- StashManager
59+
- TagManager
60+
- MergeManager
61+
- ConflictManager
62+
- RebaseManager
63+
- HistoryManager
64+
- ResetManager
65+
66+
With:
67+
68+
- Mocks for `inquirer`, `execSync`, `fs`
69+
- Fully isolated sandbox environment
70+
- Deterministic CI behavior
71+
- Zero real Git side effects
72+
73+
---
74+
75+
## 🔧 Installation
1076

11-
## 🧑‍💻 Usage
1277
```bash
13-
npx plain-git
78+
npm install -g plain-git

jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "./",
4+
"paths": {
5+
"@/*": ["src/*"]
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)