git-reaper
v0.1.2
Published
A CLI tool to manage git branches and clean up stale branches.
Maintainers
Keywords
Readme
Git Reaper
Description
Git Reaper is a command-line interface (CLI) tool designed to help developers manage their local Git branches efficiently. It allows users to list, review, and delete old or unused branches with ease, ensuring a cleaner and more organized workspace.
Table of Contents
Features
- List all local Git branches with detailed information.
- Interactive selection and deletion of branches.
- Confirmation prompts to prevent accidental deletions.
- Colorful and user-friendly CLI output.
- Easy integration with existing Git workflows.
Technologies Used
- Node.js (>= 18.x)
- Commander.js – CLI command parser
- Clack – Interactive CLI prompts
- Colorette – Terminal string styling
- Git – Underlying version control system
Installation
Clone the repository:
git clone https://github.com/migudevelop/git-reaper.git cd git-reaperInstall dependencies:
npm install # or pnpm installOr Install the CLI globally:
npm install -g git-reaper # or pnpm install -g git-reaper(Optional) Link the CLI globally:
npm link
Usage
Run the CLI
npx git-reaper
# or, if linked globally:
git-reaperList all branches
git-reaperDelete branches interactively
git-reaper --deleteExamples
Listing Branches
$ git-reaper
* main (a1b2c3d): Initial commit - John Doe (2 weeks ago) (current branch)
feature/login (d4e5f6g): Add login page - Jane Smith (1 week ago)
fix/typo (h7i8j9k): Fix typo in README - John Doe (3 days ago)Deleting Branches
$ git-reaper --delete
? Select branches to delete:
◯ feature/login (d4e5f6g): Add login page - Jane Smith (1 week ago)
◯ fix/typo (h7i8j9k): Fix typo in README - John Doe (3 days ago)
✔ Are you sure you want to delete the selected branches? (y/N)
Branches deleted successfully.License
This project is licensed under the MIT License.
