Skip to content

Install OCX

This page installs OCX and puts it on your PATH. Pick your shell and paste the command:

Open a new terminal and check the install with ocx about. It prints the installed version, the detected platform and the detected shell:

Terminal window
ocx about

Download the binary instead

Security-conscious environments often forbid piping a network script into an interpreter. The downloaded binary is the answer. Pre-built binaries for every supported platform are published to GitHub Releases.

Download the archive for your platform, extract it and run ocx self setup. You reach exactly the same managed state the install script produces. That state is the content-addressed self-install, the $OCX_HOME/env.* env files, the managed shell-profile block and the session PATH. No shell script is piped from the network.

Each release also includes a sha256.sum file for checksum verification.

Terminal window
# Download the archive and checksums
curl -LO https://github.com/ocx-sh/ocx/releases/latest/download/ocx-x86_64-unknown-linux-gnu.tar.gz
curl -LO https://github.com/ocx-sh/ocx/releases/latest/download/sha256.sum
# Verify checksum
sha256sum --check --ignore-missing sha256.sum
# Extract and run the managed setup
tar xf ocx-x86_64-unknown-linux-gnu.tar.gz
./ocx-x86_64-unknown-linux-gnu/ocx self setup

On macOS, use the Linux commands with the macOS archive name in place of x86_64-unknown-linux-gnu. Where sha256sum is missing, shasum -a 256 computes the same hash.

If PowerShell’s execution policy is Restricted, the sourced env.ps1 file does not run even after setup completes. Setup reports a non-fatal advisory when it detects this. To fix it, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. Setup never changes the execution policy itself, because that is a user security decision.

The install options cover what the setup command does and pinning a version.

Next steps