paku: pacman for Git Bash
paku is a pacman-compatible package manager for Git Bash (Git for Windows). It downloads
packages from the official MSYS2 repositories and installs them per user
into ~/.local, so you never need an administrator shell. Commands and options match MSYS2
pacman: paku -Syu, paku -S rsync, paku -Rs, paku -Qq.
paku is not affiliated with MSYS2, Arch Linux’s pacman or Git for Windows.
Status: usable for daily work. Install, upgrade, remove and signature checks work; see Limitations for what is missing.
Key features
- pacman-compatible CLI: same operations, options and combined short flags (
-Syu,-Qqe,-Rns) as MSYS2pacman. - No admin rights: installs per user under
~/.local; programs land in~/.local/bin. - Official MSYS2 repositories:
msys,ucrt64(x64) andclangarm64(ARM64) packages. - x64 and ARM64: picks the environment from the real CPU, even when Git Bash runs under x64 emulation.
- Reuses Git for Windows: packages already bundled with Git count as installed and are never replaced.
- Single binary: one
paku.exe, no dependency oncurl,gpg,zstdortar.
Quick start
In Git Bash:
curl -fsSL https://raw.githubusercontent.com/haba713/paku/master/install.sh | sh
paku -Sy # download the package databases
paku -S rsync # install rsync and its missing dependencies
Next steps:
- Installation: prerequisites,
PATHsetup, manual install - Usage: searching, installing, upgrading and removing packages
- Configuration: where files go,
paku.conf, limitations
More information
- Source code: GitHub repository
- AGENTS.md: architecture and conventions
- Issues: bug reports and feature requests
- License: GPL-2.0-or-later
Installation
Prerequisites
- Windows x64 or ARM64
- Git for Windows, which provides Git Bash
- no administrator rights
Install script
In Git Bash:
curl -fsSL https://raw.githubusercontent.com/haba713/paku/master/install.sh | sh
The script downloads the latest release binary for your machine (x64 or ARM64), checks its SHA-256
checksum and installs it as ~/.local/bin/paku.exe.
curl | sh runs whatever the server returns. The script is about 50 lines; to read it first:
curl -fsSL https://raw.githubusercontent.com/haba713/paku/master/install.sh | less
Install a specific release
Set PAKU_VERSION:
curl -fsSL https://raw.githubusercontent.com/haba713/paku/master/install.sh | PAKU_VERSION=v0.1.0 sh
Add paku to PATH
If ~/.local/bin is not on your PATH yet, the script prints how to add it. Add it to Git Bash’s
PATH in ~/.bashrc, then open a new Git Bash window:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
Avoid adding ~/.local/bin to the Windows user PATH for cmd and PowerShell: msys programs such
as rsync need DLLs from Git’s usr\bin (msys-2.0.dll, msys-iconv-2.dll, …), which only Git
Bash has on its PATH, so they fail to start there. Native Windows packages (mingw-w64-ucrt-x86_64-*,
mingw-w64-clang-aarch64-*) keep their DLLs next to the program and would work, but the same
directory holds both kinds.
Manual installation
-
Download
paku-x86_64.exe(x64) orpaku-aarch64.exe(ARM64) andSHA256SUMSfrom the latest release. -
Verify:
sha256sum -c --ignore-missing SHA256SUMS -
Copy the binary to
~/.local/bin/paku.exe.
Build from source
Only a Rust toolchain is needed; no Visual Studio:
rustup toolchain install stable-x86_64-pc-windows-gnu --profile minimal
export RUSTUP_TOOLCHAIN=stable-x86_64-pc-windows-gnu
git clone https://github.com/haba713/paku.git
cd paku && cargo build --release && cargo test --workspace
mkdir -p ~/.local/bin && cp target/release/paku.exe ~/.local/bin/
Code signing
The release binaries are not code-signed yet. On Windows 11 with Smart App Control enabled, Windows may block them.
Usage
paku takes the same operations and options as MSYS2 pacman. Run paku -h for help and
paku -S -h for the options of one operation.
Example: install rsync
Install rsync, which Git Bash lacks:
paku -Sy # download the package databases
paku -Ss '^rsync$' # search by exact name; `paku -Ss rsync` also matches descriptions
msys/rsync 3.5.2-1 (net-utils)
A file transfer program to keep remote files in sync
msys/ is the repository. If nothing matches, -Ss prints nothing and exits with code 1.
paku -Si rsync # package details
paku -S rsync # install it and its missing dependencies
Common commands
| Command | What it does |
|---|---|
paku -Sy | download the package databases |
paku -Ss <text> | search package names and descriptions |
paku -Si <pkg> | show package details |
paku -Sl | list packages in the repositories |
paku -Sg | list package groups |
paku -S <pkg> | install a package and its missing dependencies |
paku -Syu | upgrade all packages installed with paku |
paku -Q | list packages installed with paku |
paku -Rs <pkg> | remove a package and the dependencies nothing else needs |
paku -T <dep> | check whether dependencies are satisfied |
Combined short flags work as in pacman (-Syu, -Qqe, -Rns), and - reads targets from stdin.
When MSYS2 renames or merges a package, paku -Syu asks Replace <old> with <repo>/<new>? and, on
yes, removes the old package and installs the new one, like pacman.
Package names
| Repository | Host CPU | Package name prefix |
|---|---|---|
msys | both | none, e.g. rsync |
ucrt64 | x64 | mingw-w64-ucrt-x86_64- |
clangarm64 | ARM64 | mingw-w64-clang-aarch64- |
paku picks the environment from the real CPU, even when Git Bash itself runs under x64 emulation.
msys programs like rsync use the msys-2.0.dll runtime from Git for Windows, so run them from
Git Bash.
Packages bundled with Git
Packages bundled with Git for Windows (listed in /etc/package-versions.txt) count as installed, so
dependencies like libiconv or libopenssl are not downloaded again. They are not listed by -Q.
paku never replaces Git’s own runtime (msys2-runtime, bash, filesystem, pacman, mintty)
and refuses them as explicit targets.
Configuration
Where files go
Files from ucrt64/..., clangarm64/... or usr/... in a package are installed under ~/.local,
the usual per-user prefix (pip and Claude Code use it too):
| In package | Installed to |
|---|---|
ucrt64/bin/rg.exe | ~/.local/bin/rg.exe |
ucrt64/share/... | ~/.local/share/... |
usr/lib/... | ~/.local/lib/... |
etc/... (msys) | ~/.local/etc/... |
Programs find their DLLs and data relative to their own location, so the tree keeps its shape.
paku’s own files:
| Purpose | Default | Option |
|---|---|---|
| config | ~/.config/paku/paku.conf | --config |
| databases | ~/.local/share/paku/db | --dbpath |
| package cache | ~/.cache/paku/pkg | --cachedir |
| keyring | ~/.local/share/paku/keyring | --gpgdir |
| log | ~/.local/share/paku/paku.log | --logfile |
--root changes the install prefix; the databases and log then move to <root>/share/paku.
paku.conf
~/.config/paku/paku.conf is optional and uses pacman.conf syntax ([options], [repo]
sections, Include, Server, IgnorePkg, NoExtract, NoUpgrade, ParallelDownloads,
Color, …). paku adds these keys:
| Key | Meaning |
|---|---|
InstallPrefix | install prefix, default ~/.local |
Environment | MSYS2 environment, default ucrt64 (x64) or clangarm64 (ARM64) |
GitRoot | Git for Windows directory, default found via git.exe on PATH |
Example:
[options]
InstallPrefix = ~/.local
ParallelDownloads = 5
IgnorePkg = rsync
Color
Edited config files
paku never overwrites or deletes a package’s config file that you have edited, same as pacman:
| When | What happens |
|---|---|
| upgrade, and the package changed the file too | your file stays; the new one is saved as .pacnew |
| upgrade, and the package did not change it | your file stays |
| removal (or the new version drops the file) | your file is renamed to .pacsave; -Rn deletes it |
Files matching NoUpgrade (paths relative to the install prefix, e.g. NoUpgrade = etc/foo.conf)
are never replaced or removed; new versions are saved as .pacnew.
Signatures
paku -Sy downloads each repository’s <repo>.db.sig and checks it; paku -S checks every
package’s signature after download and before anything is extracted. Signatures are checked
against MSYS2’s keyring, which is built into paku. A database that fails the check is deleted, and
a failing package stops the whole transaction:
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: failed to update msys (invalid or corrupted database (PGP signature))
SigLevel works as in pacman.conf, in [options] or per repository. The default is Required
for databases and packages, as in MSYS2’s own pacman.conf:
| Value | Effect |
|---|---|
Required | every database or package must have a valid signature |
Optional | check signatures that exist; accept unsigned files |
Never | do not check signatures |
Prefix a value with Package or Database to set only that part, e.g.
SigLevel = Required DatabaseOptional. TrustedOnly and TrustAll are accepted and ignored:
paku trusts every key in its keyring that is not revoked.
To use a newer MSYS2 keyring than the built-in one, put msys2.gpg and msys2-revoked from the
msys2-keyring package into ~/.local/share/paku/keyring (GPGDir, --gpgdir).
Environment variables
| Variable | Used for |
|---|---|
HOME | home directory; falls back to USERPROFILE |
USERPROFILE | home directory when HOME is not a Windows path |
PATH | finding Git for Windows via git.exe |
COLUMNS | output width |
PAKU_VERSION | install.sh only: release to install, e.g. v0.1.0 |
Downloads use Windows’ built-in WinHTTP, so the system’s certificates and proxy settings apply.
Limitations
msysprograms resolve absolute POSIX paths (/usr/share/...,/etc/...) against Git’s install directory, not~/.local. Programs that need their data files there won’t find them; prefer mingw packages..pcfiles,*-configscripts and libtool.lafiles contain hardcoded/ucrt64paths; paku does not rewrite them.- Install scriptlets (
.INSTALL) are not run yet; paku prints a warning for packages that have one. - Not implemented yet:
-U(install local package files),-D,-F,-Sc, and the-Qoptions-g,-k,-c,-pand-t. - Release binaries are not code-signed yet; Smart App Control may block them.