Skip to content

Install

portcheck is a single static binary with no runtime dependencies.

brew install roystondwork-dev/tap/portcheck
winget install roystondwork-dev.portcheck

Open a new terminal afterwards so portcheck is on your PATH.

Note

The package is waiting for review in microsoft/winget-pkgs. Until it's merged, use Scoop or the zip from the releases page.

scoop bucket add portcheck https://github.com/roystondwork-dev/scoop-bucket
scoop install portcheck

Download the .deb, .rpm or .apk for your architecture from the latest release, then:

sudo apt install ./portcheck_*_amd64.deb            # Debian, Ubuntu (arm64: *_arm64.deb)
sudo dnf install ./portcheck-*.x86_64.rpm           # Fedora, RHEL (arm64: *.aarch64.rpm)
sudo apk add --allow-untrusted ./portcheck_*_x86_64.apk  # Alpine (arm64: *_aarch64.apk)

Download the archive for your OS and CPU from the latest release, extract it, and put portcheck (portcheck.exe on Windows) on your PATH.

Requires Go 1.26 or newer:

go install github.com/roystondwork-dev/portcheck/cmd/portcheck@latest

Check the installation:

portcheck version
man portcheck      # man pages ship with Homebrew and the Linux packages

Shell completion

portcheck completion bash > /etc/bash_completion.d/portcheck          # bash
portcheck completion zsh  > "${fpath[1]}/_portcheck"                  # zsh
portcheck completion fish > ~/.config/fish/completions/portcheck.fish # fish
portcheck completion powershell | Out-String | Invoke-Expression      # PowerShell (current session)

Homebrew installs completions for you.

Verifying downloads

Every release publishes checksums.txt, signed with Sigstore cosign using GitHub's OIDC identity (no long-lived keys). It also publishes SPDX SBOMs and SLSA build provenance.

  1. Verify that the checksum file was produced by this repository's release workflow:

    cosign verify-blob \
      --bundle checksums.txt.sigstore.json \
      --certificate-identity 'https://github.com/roystondwork-dev/portcheck/.github/workflows/release.yml@refs/heads/main' \
      --certificate-oidc-issuer https://token.actions.githubusercontent.com \
      checksums.txt
    
  2. Verify your download against it:

    sha256sum --ignore-missing -c checksums.txt     # Linux
    shasum -a 256 --ignore-missing -c checksums.txt # macOS
    
  3. Optionally, verify the build provenance with the GitHub CLI:

    gh attestation verify portcheck_*_linux_amd64.tar.gz --repo roystondwork-dev/portcheck
    

Running with elevated privileges

Some information is only visible to root or Administrator; see Permissions by OS. sudo often resets PATH, so pass the full path:

sudo "$(command -v portcheck)" list -l

Uninstall

Remove the binary, or use your package manager (brew uninstall portcheck, scoop uninstall portcheck, apt remove portcheck, …). portcheck writes no configuration or cache files.