- Overview
- Linux/macOS Remote Script (.sh)
- Windows Remote Script (.ps1)
- Command Examples
- Security Notes
GitNapse includes remote installation scripts under scripts/ so the tool can be installed
or uninstalled without cloning the repository first.
scripts/install.sh- Linux/macOS installer/uninstaller with dependency checks and Rust bootstrap.scripts/install.ps1- Windows 11 PowerShell installer/uninstaller with Rust bootstrap.
The shell script supports Linux and macOS with OS-aware preparation and Rust detection.
- Linux package manager detection priority:
apt,pacman,dnf,yum,zypper, fallback notice forrpm. - macOS flow includes Xcode Command Line Tools check and Homebrew-based dependency installation.
- Checks for Rust (
cargo/rustc) and installs Rustup only when missing. - Installs GitNapse via
cargo install --git ... --locked gitnapse. - Supports uninstall and optional config/cache cleanup.
Linux script parameters:
| Parameter | Accepted Values | Description |
|---|---|---|
--action | install or uninstall | Select operation mode. |
--repo-url | Git URL | Override repository source. |
--sudo | flag | Force sudo for package operations. |
--no-sudo | flag | Disable sudo usage on Linux. |
--cleanup | flag | On uninstall, remove local GitNapse config/cache. |
The PowerShell script is designed for Windows 11 and supports install/uninstall with parameters.
- Checks for
cargofirst and reuses existing Rust toolchain if present. - If Rust is missing, installs Rustup via
wingetwhen available, or via direct rustup-init download fallback. - Installs GitNapse from the Git repository using Cargo.
- Supports uninstall and optional cleanup of local app directories.
PowerShell script parameters:
| Parameter | Accepted Values | Description |
|---|---|---|
-Action | install or uninstall | Select operation mode. |
-RepoUrl | Git URL | Override repository source. |
-Cleanup | switch | On uninstall, remove local GitNapse config/cache. |
Linux/macOS install (curl):
curl -fsSL https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.sh | bash -s -- --action install
Linux/macOS uninstall with cleanup (wget):
wget -qO- https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.sh | bash -s -- --action uninstall --cleanup
Windows 11 install (PowerShell):
irm https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.ps1 | iex
Windows 11 uninstall with cleanup (PowerShell):
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/xscriptor/gitnapse/main/scripts/install.ps1))) -Action uninstall -Cleanup
- Review remote scripts before execution in sensitive environments.
- Prefer pinning to a specific commit in production automation.
- Run with least required privileges when possible.