🚀 Installation & Running
Prerequisites
Gitwig requires the following external tools to be installed on your system:
git: A system installation ofgitis required in yourPATHfor operations like staging, diffing, pushing, pulling, and network syncing.ssh: Required if you use SSH-based Git remotes for network operations.[!NOTE] SSH Host Key Policy: To prevent connection hangs in the non-interactive TUI context, Gitwig executes git commands with
GIT_SSH_COMMANDset tossh -o BatchMode=yes -o StrictHostKeyChecking=accept-new.accept-newautomatically trusts and saves new host keys while verifying existing ones to protect against MITM attacks; setssh_strict_host_checking = trueinconfig.toml(or toggle it in Settings) to use-o StrictHostKeyChecking=yesinstead, in which case add host keys to yourknown_hostsbeforehand.BatchMode=yesstops ssh from prompting on the terminal for passphrases or confirmations (which would paint over the TUI), so an SSH key that needs a passphrase must be loaded intossh-agentfirst — otherwise the connection fails immediately and the error is shown in-app.
Via Homebrew (macOS / Linux)
You can tap and install Gitwig using Homebrew:
brew tap tareqmy/tap
brew install gitwigNote: brew install gitwig only resolves the formula once the tap is added — if Homebrew reports “No available formula”, run brew tap tareqmy/tap first and then brew install gitwig again.
Via Shell Script (macOS / Linux)
For a quick installation, run the following command in your terminal:
curl -fsSL https://raw.githubusercontent.com/tareqmy/gitwig/master/scripts/install.sh | shOn Windows
You can install Gitwig on Windows via PowerShell:
Run the following command in PowerShell:
irm https://raw.githubusercontent.com/tareqmy/gitwig/master/scripts/install.ps1 | iex- Benefits: Quick command-line installation to your user profile directory (
%USERPROFILE%\.gitwig\bin) without requiring administrator privileges. - Updating: Supports the in-app self-updater, which will automatically run
install.ps1to download newer versions.
Via Chocolatey (Windows)
You can install Gitwig using Chocolatey:
choco install gitwigNote: For the in-app self-updater, if installed via Chocolatey, you should update the package by running choco upgrade gitwig.
Via Cargo
You can install Gitwig directly from crates.io :
cargo install gitwigVia Nix (flake)
The repository ships a Nix flake building both the gitwig and gtg binaries. Run it directly without installing:
nix run github:tareqmy/gitwigOr install it into your profile:
nix profile install github:tareqmy/gitwigIn a flake-based NixOS / home-manager configuration, add the flake as an input and reference its package:
inputs.gitwig.url = "github:tareqmy/gitwig";
# ...
environment.systemPackages = [ inputs.gitwig.packages.${pkgs.system}.default ];A development shell with the Rust toolchain is also provided: nix develop.
Note: the in-app self-updater does not apply to Nix installs; update by bumping the flake input (nix flake update gitwig) or re-running nix profile upgrade.
Building from Source
Alternatively, you can clone the repository and build it from source:
git clone https://github.com/tareqmy/gitwig.git
cd gitwig
cargo build --releaseThe compiled binary will be located at target/release/gitwig. You can copy it to a directory in your $PATH or run it directly.
Uninstalling
If you installed Gitwig via the shell script, you can uninstall it at any time using:
curl -fsSL https://raw.githubusercontent.com/tareqmy/gitwig/master/scripts/uninstall.sh | shIf you installed Gitwig via the PowerShell script, you can uninstall it at any time using:
irm https://raw.githubusercontent.com/tareqmy/gitwig/master/scripts/uninstall.ps1 | iexRunning
You can launch Gitwig using either the full name or the short command alias gtg:
# Run with default config resolution
gitwig
# Or using the shortcut:
gtg
# Run with an explicit config path
gitwig path/to/config.toml
# Or:
gtg path/to/config.toml