Install and verify
Four ways in, all of them ending at the same thing: one binary with no runtime dependencies.
One line
The official installers detect the operating system and CPU architecture, download the matching archive, verify its SHA-256 before installing, and tell you when the install directory is missing from your PATH.
curl -fsSL https://raw.githubusercontent.com/doggy8088/mgit/main/install.sh | shmacOS and Linux (POSIX sh).
irm https://raw.githubusercontent.com/doggy8088/mgit/main/install.ps1 | iexWindows PowerShell 5.1 and PowerShell 7+ (which also works on macOS and Linux).
install.sh and install.ps1 from the repository; there is no second copy.Verify the install
Check the version, and check that PATH really points at the binary you just installed:
$ mgit --version
mgit 2.0.2
$ command -v mgit
/usr/local/bin/mgit
npm and npx
Requires Node.js 20 or newer. The package already contains the official binaries for six platforms and runs no code at install time (there is no postinstall).
npm install -g @willh/mgitpnpm and yarn work too; npx @willh/mgit and bunx @willh/mgit run it without installing.
Download and verify by hand
Take the archive for your platform from GitHub Releases. Each one ships a matching .sha256, and every checksum is also collected in SHA256SUMS.txt.
| Platform | Archive |
|---|---|
| Linux x86_64 (musl, static) | mgit-x86_64-unknown-linux-musl.tar.gz |
| Linux aarch64 (musl, static) | mgit-aarch64-unknown-linux-musl.tar.gz |
| Linux x86_64 (glibc) | mgit-x86_64-unknown-linux-gnu.tar.gz |
| Linux aarch64 (glibc) | mgit-aarch64-unknown-linux-gnu.tar.gz |
| macOS Apple Silicon | mgit-aarch64-apple-darwin.tar.gz |
| macOS Intel | mgit-x86_64-apple-darwin.tar.gz |
| Windows x64 | mgit-x86_64-pc-windows-msvc.zip |
| Windows on ARM | mgit-aarch64-pc-windows-msvc.zip |
# macOS
shasum -a 256 -c mgit-aarch64-apple-darwin.tar.gz.sha256
# Linux
sha256sum -c mgit-x86_64-unknown-linux-musl.tar.gz.sha256
From source
Rust 1.85 or newer is required; the rust-version is declared and CI checks it.
git clone https://github.com/doggy8088/mgit.git
cd mgit
cargo build --release # target/release/mgit
cargo install --path . # or install into ~/.cargo/bin
Upgrading and removing
Upgrading is the same command again: the installer replaces the old binary. Removing it is deleting that one file, because mgit leaves nothing else anywhere.
MGIT_VERSION=2.0.1installs a specific version.MGIT_INSTALL_DIRchooses the install directory.- For the npm package,
npm uninstall -g @willh/mgit.