Skip to content

GregoryNavasarkian/git-cli-tool

Repository files navigation

GitToolCLI

An interactive, console-based helper for everyday Git workflows. It wraps common commands (status, add/commit, branch, sync, tags) into a guided menu using Spectre.Console, with built-in cancellation handling and captured output for review.

git_cli_tool_demo.mp4

Features

  • Main menu for Status, Repo, Add + Commit, Branch, Sync, Tag, and Print Output.
  • Repo tasks: init, clone, log, diff.
  • Add/commit flow: add all or a single file, commit, amend, undo last commit.
  • Branching: list, create, switch, merge, delete.
  • Sync: push, pull (ff-only), fetch (prune + tags), branch status.
  • Tags: list, create annotated, push, checkout, delete.
  • Ctrl+C support to cancel long-running git commands and exit cleanly.
  • Run history for reference.

Prerequisites

  • .NET SDK 10 (or matching SDK used by the project).
  • Git is installed and available on PATH.

Getting Started

git clone https://github.com/GregoryNavasarkian/git-cli-tool.git
cd git-cli-tool/GitToolCLI 
dotnet restore 
dotnet build

Run

From the project directory:

dotnet run

Show help without entering the interactive menu:

dotnet run -- --help

Installation

1) Download (Executable)

Download the appropriate executable from Releases and follow the installation instructions below.

make sure to rename gittool-<platform> to gittool


2) Build (Release)

Clone the repo and publish a self-contained single-file binary for your platform.

.NET 10 required

dotnet publish -c Release

Publish path: \GitToolCLI\GitToolCLI\bin\Release\net10.0\publish

Follow the installation instructions below (copy the entire contents of the publish folder to the desired location).


3) Build (Publish)

Clone the repo and publish a self-contained single-file binary for your platform.

Does not require .NET to be installed

Windows x64:

dotnet publish .\GitToolCLI\GitToolCLI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true

macOS Apple Silicon (arm64):

dotnet publish .\GitToolCLI\GitToolCLI.csproj -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true

Linux x64:

dotnet publish .\GitToolCLI\GitToolCLI.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true

Publish output is located at:

.\GitToolCLI\bin\Release\net10.0\<platform>\publish\


Install (Add to PATH)

Windows

1) Copy the published binary to:
C:\Program Files\GitToolCLI\

2) Add folder to User PATH (PowerShell):
setx PATH "$env:PATH;C:\Program Files\GitToolCLI"

3) Open a new terminal and test:
gittool --help

macOS (zsh)

mkdir -p ~/.local/bin
cp ./gittool ~/.local/bin/gittool
chmod +x ~/.local/bin/gittool
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
gittool --help

Linux (bash)

mkdir -p ~/.local/bin
cp ./gittool ~/.local/bin/gittool
chmod +x ~/.local/bin/gittool
echo export PATH="$HOME/.local/bin:$PATH" >> ~/.bashrc
source ~/.bashrc
gittool --help

Usage

  • Navigate the interactive menu with arrow keys/enter.
  • Press Ctrl+C to cancel the current git command or exit the app loop.
  • Choose Print Output to review the recorded results of prior operations.

Notes

  • Output is rendered with Spectre.Console for readable tables and markup.
  • Exit code 0 indicates a normal termination (interactive or help mode).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages