| title | Install & switch versions | ||
|---|---|---|---|
| permalink | /how-to/install | ||
| diataxis | how-to | ||
| redirect_from |
|
This guide shows how to install the jaiph command, check that it works, and switch between the stable release, the nightly prerelease, and a specific version.
The installer downloads one binary for your platform from the current stable GitHub Release. The binary contains everything Jaiph needs, so you don't need Node or npm.
- A POSIX
shonPATHfor hooks. Anyscriptstep also needs the interpreter named by its shebang onPATH(bashby default). The runtime spawns that interpreter directly instead of relying on the file's exec bit, so scripts still run undernoexecmounts. - For the curl installer (step 1):
curland eithershasumorsha256sumonPATH. - For the PowerShell installer (step 1, Windows): PowerShell (
irm/Invoke-WebRequestandGet-FileHashare built in). minisignonPATHto verify the detached release signature. Both installers embed the project public key (jaiph.pub) and require a valid signature by default. Whenminisignis missing, the install stops and does not fall back to a checksum-only install. For a deliberate checksum-only install, setJAIPH_ALLOW_UNSIGNED=1, which checks only the checksum and prints a warning. See Verify the release signature.
Use the curl installer:
curl -fsSL https://jaiph.org/install | bashThis downloads three files from the current stable Release: the platform binary jaiph-{darwin|linux}-{arm64|x64}, the checksum file SHA256SUMS, and the detached signature SHA256SUMS.minisig. It verifies the checksum and the release signature (see Verify the release signature). It then installs the binary to ~/.local/bin/jaiph. The installer fails closed if it cannot download SHA256SUMS.minisig, or if minisign is not installed and you have not set JAIPH_ALLOW_UNSIGNED=1. Override the install location with JAIPH_BIN_DIR.
Windows (PowerShell): the curl installer rejects Windows and points you here. Use the PowerShell one-liner instead:
irm https://jaiph.org/install.ps1 | iexThis downloads the same three files from the current stable Release: jaiph-windows-x64.exe, SHA256SUMS, and SHA256SUMS.minisig. It verifies the checksum with Get-FileHash and the release signature (see Verify the release signature). It then installs the binary to %LOCALAPPDATA%\jaiph\bin\jaiph.exe and adds that directory to your user PATH. Open a new terminal to pick up the new PATH. Override the ref with JAIPH_REPO_REF (or the first argument), and override the install location with JAIPH_BIN_DIR. Windows ships an x64 binary only, because Bun has no Windows arm64 target, so ARM Windows exits with an unsupported-platform message.
If jaiph --version reports command not found, add the install directory to PATH:
export PATH="$HOME/.local/bin:$PATH" # curl installerjaiph use nightly # rolling nightly prerelease
jaiph use 0.16.0 # reinstalls the v0.16.0 release binaryjaiph use runs the same installer as step 1 again, with JAIPH_REPO_REF set to nightly or v<version>. By default it does not pipe curl … | bash. It downloads the install script from ${JAIPH_SITE}/install (default https://jaiph.org), verifies it against the published ${JAIPH_SITE}/install.sha256, and runs it only when the checksum matches. A missing or mismatched checksum fails closed. jaiph use then replaces the binary at ~/.local/bin/jaiph, or at the location set by JAIPH_BIN_DIR. Set JAIPH_INSTALL_COMMAND to run a verbatim command instead for forks, offline bundles, or local scripts.
jaiph --versionThe command prints jaiph <version>, taken from the installed release at build time. After jaiph use <version>, run jaiph --version again and confirm the printed version matches. For example, you should see jaiph 0.16.0 after jaiph use 0.16.0.
Every release includes SHA256SUMS and a detached minisign signature SHA256SUMS.minisig. The installer downloads both files and requires a valid signature. A missing minisign, or a missing SHA256SUMS.minisig, aborts the install on every host, including CI, rather than degrading to checksum-only. The checksum ships over the same channel as the binary, so it is not an independent defense. Setting CI does not allow a checksum-only install, because most installs in CI would then skip the signature check. A CI job that needs a signed install must make minisign available on the runner, and the setup-jaiph action installs minisign for you. For a deliberate checksum-only install on a host that has no minisign, set JAIPH_ALLOW_UNSIGNED=1, which prints a prominent warning and proceeds without signature verification. When minisign is present the installer always verifies the signature and ignores this flag. An explicitly empty JAIPH_MINISIGN_PUBLIC_KEY is a misconfiguration and also fails closed.
From a checkout of this repo:
minisign -V -P "$(grep '^RW' jaiph.pub)" -m SHA256SUMS -x SHA256SUMS.minisigOverride with JAIPH_MINISIGN_PUBLIC_KEY only when testing a key rotation before merge.
For maintainer setup, see Contributing: Release signing.
To install a pinned jaiph CLI in a GitHub Actions job, use the reusable setup-jaiph composite action instead of writing the installer steps yourself. The action downloads the same standalone per-platform release binary as the curl installer, so the runner does not need Node or npm. It then appends the install directory to GITHUB_PATH, so jaiph is on PATH for every later step.
steps:
- uses: jaiphlang/jaiph/actions/setup-jaiph@v0.16.0
with:
version: 0.16.0 # semver, a release tag (v0.16.0), or 'nightly'
- run: jaiph --version # jaiph is now on PATH for later stepsPin both the action ref (@v0.16.0) and the version input to an exact release for reproducible CI. Use nightly to track the rolling prerelease. The action supports GitHub-hosted Linux and macOS runners on arm64 and x64, which are the platforms that have release artifacts.
The action follows the installer's fail-closed policy, and it installs minisign on the runner before running the installer so the release signature is always verified. GitHub-hosted runners set CI, and CI does not allow a checksum-only install, so the action installs minisign to keep the install signed. The step fails and installs nothing when the signature is missing or invalid, when there is a checksum mismatch, or when a release artifact is missing. For the full list of inputs and outputs, see the action README.
- Architecture: Distribution, Node vs Bun standalone: what the installer downloads and why the binary is self-contained.
- Deploy jaiph: wrap jaiph in an image or Kubernetes pod you own.
- Why Jaiph: the design context behind the single-binary distribution.