Skip to content

Commit cfe6f3a

Browse files
Upd: readme, changelog and package.json
1 parent 5a77517 commit cfe6f3a

File tree

3 files changed

+76
-10
lines changed

3 files changed

+76
-10
lines changed

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: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,79 @@
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)
5+
*(Replace with your own banner if needed)*
46

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

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "plain-git",
3-
"version": "1.0.0",
3+
"version": "1.0.0-beta.1",
44
"description": "A lightweight cross-platform CLI & library to perform Git operations using plain language commands — no dependencies, pure Node.js.",
55
"main": "dist/index.js",
66
"type": "commonjs",

0 commit comments

Comments
 (0)