Install PiG

Every way to get the pig binary, with the exact command to run, where it goes, how to update it, and how to remove it.

Install script (macOS and Linux)

Downloads the release archive for your machine, checks its SHA-256 against the release’s SHA256SUMS, and installs pig. No root needed.

curl -fsSL https://pi-in-go.dev/install.sh | sh
Installs to
~/.local/bin/pig. If that directory is not on your PATH, the script prints the line to add.
Options
PIG_INSTALL_DIR sets the install directory. PIG_VERSION installs a given version, for example PIG_VERSION=0.2.0.
Update
Run the install command again.
Uninstall
rm ~/.local/bin/pig

To also remove settings and sessions:

rm -rf ~/.pig

npm

The npm package installs the native pig binary for your platform. Node is only the launcher.

npm install -g @pi-in-go/pig

To try it without installing:

npx @pi-in-go/pig
Installs to
npm’s global bin directory ($(npm prefix -g)/bin; on Windows, npm prefix -g itself).
Update
npm update -g @pi-in-go/pig
Uninstall
npm uninstall -g @pi-in-go/pig

To also remove settings and sessions:

rm -rf ~/.pig

Install script (Windows PowerShell)

Downloads the Windows release archive for your CPU (x64 or Arm64), checks its SHA-256 against SHA256SUMS, installs pig.exe, and adds it to your user PATH. No admin needed.

irm https://pi-in-go.dev/install.ps1 | iex
Installs to
%LOCALAPPDATA%\Programs\pig\pig.exe. Open a new terminal after the first install so the PATH change applies.
Options
$env:PIG_INSTALL_DIR sets the install directory. $env:PIG_VERSION installs a given version. $env:PIG_NO_MODIFY_PATH='1' leaves PATH unchanged.
Update
Run the install command again.
Uninstall
Remove-Item -Recurse "$env:LOCALAPPDATA\Programs\pig"

Then remove that directory from Path under Settings › System › About › Advanced system settings › Environment Variables. To also remove settings and sessions:

Remove-Item -Recurse "$env:USERPROFILE\.pig"

Go install

Builds pig from the tagged release with your Go toolchain. Needs Go 1.26 or later.

go install github.com/MichaelKinsy/PiG/cmd/pig@latest
Installs to
$GOBIN, or $(go env GOPATH)/bin when GOBIN is unset (usually ~/go/bin). Put that directory on your PATH.
Options
Pin a version with @v0.2.0 instead of @latest.
Update
Run the same command again with @latest.
Uninstall
rm "$(go env GOPATH)/bin/pig"

Download a release archive

Each GitHub release has an archive per platform and a SHA256SUMS file. Download both, check the archive, and put pig on your PATH yourself.

Download from GitHub Releases: pig-<version>-<os>-<arch>.tar.gz for linux or darwin, amd64 or arm64; .zip for windows. Then, in the download directory, on Linux:

sha256sum -c --ignore-missing SHA256SUMS
tar -xzf pig-*-linux-amd64.tar.gz
mkdir -p ~/.local/bin
install -m 0755 pig-*-linux-amd64/pig ~/.local/bin/pig

On macOS (Apple silicon; use darwin-amd64 on Intel):

shasum -a 256 -c --ignore-missing SHA256SUMS
tar -xzf pig-*-darwin-arm64.tar.gz
mkdir -p ~/.local/bin
install -m 0755 pig-*-darwin-arm64/pig ~/.local/bin/pig

On Windows, in PowerShell (use windows-arm64 on Arm), then move pig.exe onto your PATH:

$zip = Get-Item pig-*-windows-amd64.zip
$want = ((Select-String -Path SHA256SUMS -SimpleMatch $zip.Name).Line -split '\s+')[0]
if ((Get-FileHash $zip).Hash -ieq $want) { Expand-Archive $zip -DestinationPath . } else { throw "checksum mismatch" }
Installs to
Wherever you put it. The archive holds pig (or pig.exe) and its license files.
Update
Download the new release and replace the binary.
Uninstall

Delete the binary. Settings and sessions are in ~/.pig (%USERPROFILE%\.pig on Windows).

rm ~/.local/bin/pig

Build from source

Clone the repository and build with Go. Needs Git and Go 1.26 or later. Works on Linux, macOS, and Windows.

git clone https://github.com/MichaelKinsy/PiG.git
cd PiG
go build -o bin/pig ./cmd/pig
./bin/pig --version
Installs to
bin/pig in the clone. Copy it onto your PATH or run it from there. On Windows, build bin\pig.exe.
Update
In the clone: git pull, then run the go build line again.
Uninstall

Delete the clone. Settings and sessions are in ~/.pig.

rm -rf PiG

Notes

  • The install scripts, npm package, and archives need a published PiG release. Until then, build from source.
  • The PiG npm package is @pi-in-go/pig. npm install -g @earendil-works/pi-coding-agent installs Pi, not PiG. There is no Homebrew package.
  • Next: the quickstart (with a video), and install troubleshooting.