Get the CLI

Permguard offers multiple installation options. Review the methods below to choose the one that best fits your environment.

Official Package Managers

Official package managers maintained by the Permguard team and updated with every release.

deb

Ubuntu Debian Linux Mint Pop!_OS Elementary OS

The following example demonstrates how to install permguard using the deb package format on Debian-based systems:

# Download and install the package
# Make sure to adjust the VERSION variable to the desired release version
VERSION="v0.0.18"; ARCH=$( [ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "x86_64" ); curl -fsSL -o permguard.deb "https://github.com/permguard/permguard/releases/download/${VERSION}/permguard_cli_Linux_${ARCH}.deb"
sudo dpkg -i permguard.deb

The installation may be verified using the following command:

permguard version

To uninstall the package, use:

sudo dpkg -r permguard

rpm

Fedora CentOS Red Hat Enterprise Linux Rocky Linux AlmaLinux openSUSE

The following example demonstrates how to install permguard using the rpm package format on RPM-based systems:

# Download and install the package
# Make sure to adjust the VERSION variable to the desired release version
VERSION="v0.0.18"; ARCH=$( [ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "x86_64" ); curl -fsSL -o permguard.rpm "https://github.com/permguard/permguard/releases/download/${VERSION}/permguard_cli_Linux_${ARCH}.rpm"
sudo rpm -i permguard.rpm

The installation may be verified using the following command:

permguard version

To uninstall the package, use:

sudo rpm -e permguard

apk

Alpine Linux

The following example demonstrates how to install permguard using the apk package format on Alpine Linux:

# Download and install the package
# Make sure to adjust the VERSION variable to the desired release version
VERSION="v0.0.18"; ARCH=$( [ "$(uname -m)" = "aarch64" ] && echo "arm64" || echo "x86_64" ); curl -fsSL -o permguard.apk "https://github.com/permguard/permguard/releases/download/${VERSION}/permguard_cli_Linux_${ARCH}.apk"
sudo apk add --allow-untrusted permguard.apk

The installation may be verified using the following command:

permguard version

To uninstall the package, use:

sudo apk del permguard

Homebrew

macOS Linux

Using Homebrew, users can install Permguard on macOS and Linux with the following command:

brew update
brew install permguard/tap/cli

Get The Binary

MacOS & Linux

The latest release binary can be downloaded and installed to the system path.

curl -fsSL https://raw.githubusercontent.com/permguard/permguard/refs/heads/main/install.sh | sh -s

The binary should then be moved into the system path:

sudo mv ./bin/permguard /usr/local/bin/
chmod +x /usr/local/bin/permguard

The installation can be verified with:

permguard version

Windows

The PowerShell install script can be used:

Invoke-WebRequest -Uri https://raw.githubusercontent.com/permguard/permguard/refs/heads/main/install.ps1 -UseBasicParsing | Invoke-Expression

If the binary was downloaded manually, it should be moved to a folder included in the PATH:

if (-not (Test-Path "C:\Program Files\permguard")) { New-Item -ItemType Directory -Path "C:\Program Files\permguard" | Out-Null }; Move-Item .\bin\permguard.exe "C:\Program Files\permguard\permguard.exe" -Force; if ($env:PATH -notlike "*C:\Program Files\permguard*") { setx PATH "$($env:PATH);C:\Program Files\permguard" }

The installation can be verified with:

permguard version

Setup completions

Command-line completions can be generated for Bash, Zsh, Fish, or PowerShell to enhance the CLI experience.

# ~/.bashrc
permguard completion bash >> ~/.bash_completion
# ~/.zshrc
permguard completion zsh >> ~/.zshrc
# ~/.config/fish/config.fish
permguard completion fish >> ~/.config/fish/config.fish
# $PROFILE\Microsoft.PowerShell_profile.ps1
permguard completion powershell | Out-String | Invoke-Expression

Verify the binaries

The following example shows the recommended verification procedure for users..

The official release binaries are available on the project’s GitHub Releases page. It is recommended to download binaries exclusively from this source to ensure their authenticity and integrity.

# Set the version you want to verify
VERSION=v0.0.18

# Download the checksums file for the selected version
wget https://github.com/permguard/permguard/releases/download/${VERSION}/checksums.txt

# Verify the checksums file using cosign
cosign verify-blob \
  --certificate-identity "https://github.com/permguard/permguard/.github/workflows/release.yml@refs/tags/${VERSION}" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  --cert "https://github.com/permguard/permguard/releases/download/${VERSION}/checksums.txt.pem" \
  --signature "https://github.com/permguard/permguard/releases/download/${VERSION}/checksums.txt.sig" \
  ./checksums.txt

# Download the SBOM and the release artifact
wget https://github.com/permguard/permguard/releases/download/${VERSION}/permguard_cli_Linux_x86_64.tar.gz.sbom.json
wget https://github.com/permguard/permguard/releases/download/${VERSION}/permguard_cli_Linux_x86_64.tar.gz

# Verify the integrity of the downloaded files
sha256sum --ignore-missing -c checksums.txt