- docs
- Start here
- Install OCX
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:
ocx aboutDownload 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.
| Platform | Architecture | Archive |
|---|---|---|
| Linux | x86_64 | ocx-x86_64-unknown-linux-gnu.tar.gz |
| Linux | aarch64 | ocx-aarch64-unknown-linux-gnu.tar.gz |
| Linux (static) | x86_64 | ocx-x86_64-unknown-linux-musl.tar.gz |
| Linux (static) | aarch64 | ocx-aarch64-unknown-linux-musl.tar.gz |
| macOS | Apple Silicon | ocx-aarch64-apple-darwin.tar.gz |
| macOS | Intel | ocx-x86_64-apple-darwin.tar.gz |
| Windows | x86_64 | ocx-x86_64-pc-windows-gnullvm.zip |
| Windows | ARM64 | ocx-aarch64-pc-windows-gnullvm.zip |
Each release also includes a sha256.sum file for checksum verification.
# Download the archive and checksumscurl -LO https://github.com/ocx-sh/ocx/releases/latest/download/ocx-x86_64-unknown-linux-gnu.tar.gzcurl -LO https://github.com/ocx-sh/ocx/releases/latest/download/sha256.sum
# Verify checksumsha256sum --check --ignore-missing sha256.sum
# Extract and run the managed setuptar xf ocx-x86_64-unknown-linux-gnu.tar.gz./ocx-x86_64-unknown-linux-gnu/ocx self setupExtract the zip and run the setup from the extracted directory in PowerShell. Then reload your profile:
.\ocx.exe self setup. $PROFILEOn 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
- Install a package installs a package, switches versions and removes it again.
- Pin a toolchain pins the tools of a repository, or your global toolchain, in a file.
- Customize the install covers installer flags, pinned versions, the session
PATHand signature checks. - Update or uninstall OCX covers
ocx self updateand the full removal recipe. - Docker images and GitHub Actions setup cover container builds and GitHub Actions.
- Environment reference lists every variable OCX reads.