Install Preflight
on this page
Install the preflight CLI from a precompiled release, or build it from source.
| Method | Use when |
|---|---|
| Install script | Setting up a workstation |
| Direct download | You need to verify artifacts yourself |
| Build from source | You are developing Preflight or need an unreleased change |
Install with the script
On macOS or Linux:
curl -fsSL https://preflight.bluecadet.com/install.sh | shThe script installs to /usr/local/bin/preflight, using sudo if that directory is not writable. To install elsewhere, set PREFLIGHT_INSTALL_DIR:
curl -fsSL https://preflight.bluecadet.com/install.sh | PREFLIGHT_INSTALL_DIR="$HOME/.local/bin" shOn Windows PowerShell:
irm https://preflight.bluecadet.com/install.ps1 | iexThe script installs to %LOCALAPPDATA%\preflight\preflight.exe and adds that directory to your user PATH.
Both scripts install the latest release. Set PREFLIGHT_VERSION=v1.2.3 (or $env:PREFLIGHT_VERSION = "v1.2.3") to pin a release.
Both scripts check the archive against the published SHA-256 checksum. If cosign is on your PATH, they also verify the checksum file’s signature.
Download a release
-
Download the archive for your OS and architecture from GitHub Releases. Archives follow the pattern
preflight_<OS>_<ARCH>.tar.gz(.zipon Windows), for examplepreflight_Windows_x86_64.zip,preflight_Darwin_arm64.tar.gz, orpreflight_Linux_x86_64.tar.gz. -
Extract the
preflightbinary to a directory on yourPATH. -
Confirm the install:
bashpreflight --version
Verify a release manually
Each release includes preflight_checksums.txt and a Sigstore bundle, preflight_checksums.txt.sigstore.json. The release workflow signs the checksum file with keyless cosign through GitHub OIDC.
-
Download the archive,
preflight_checksums.txt, andpreflight_checksums.txt.sigstore.json. -
Compute the archive digest and compare it with the matching line in
preflight_checksums.txt:bashshasum -a 256 <archive>powershellGet-FileHash <archive> -Algorithm SHA256 -
Verify the checksum file’s signature:
bashcosign verify-blob \ --bundle preflight_checksums.txt.sigstore.json \ --certificate-identity-regexp '^https://github\.com/bluecadet/preflight/\.github/workflows/release\.yml@refs/tags/.+$' \ --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ preflight_checksums.txt
Build from source
You need Go and a checkout of the repository.
make build-local # dist/preflight for this machine
make build-windows-amd64 # dist/preflight-windows-amd64.exe
make build-windows-arm64 # dist/preflight-windows-arm64.exeUpgrade
Re-run the install script. Set PREFLIGHT_VERSION to move to a specific release. If you installed by direct download, replace the binary with the one from the new archive.
Confirm the new version with preflight --version.
Uninstall
Delete the binary.
On macOS or Linux:
sudo rm /usr/local/bin/preflightOn Windows, delete the install directory, then remove it from your user PATH:
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\preflight"Uninstalling leaves your projects alone. To reclaim space, delete the remote action cache at ~/.preflight/actions.
Troubleshooting
The script cannot write to the install directory
Set PREFLIGHT_INSTALL_DIR to a directory you can write to, so the script does not need sudo.
The shell cannot find preflight
Add the install directory to your PATH, open a new shell, and run preflight --version.