Installation
Quick Install
The install scripts download the latest ocx binary from GitHub Releases, verify its SHA-256 checksum, and place it under ~/.ocx. They also configure your shell so that ocx is available on PATH in new terminals.
curl -fsSL https://ocx.sh/install.sh | shirm https://ocx.sh/install.ps1 | iexAfter installation, open a new terminal and verify:
ocx infoSkip shell profile modification
If you manage your PATH manually — for example, in a CI environment or a dotfile framework — pass --no-modify-path to prevent the installer from touching your shell profile:
curl -fsSL https://ocx.sh/install.sh | sh -s -- --no-modify-pathYou can also set OCX_NO_MODIFY_PATH=1 as an environment variable. Either way, add ~/.ocx/symlinks/ocx.sh/ocx/current/bin to your PATH yourself.
GitHub Releases
Pre-built binaries for all supported platforms are published to GitHub Releases. Download the archive for your platform, extract it, and place the ocx binary somewhere on your PATH.
| Platform | Architecture | Archive |
|---|---|---|
| Linux | x86_64 | ocx-x86_64-unknown-linux-gnu.tar.xz |
| Linux | aarch64 | ocx-aarch64-unknown-linux-gnu.tar.xz |
| Linux (static) | x86_64 | ocx-x86_64-unknown-linux-musl.tar.xz |
| Linux (static) | aarch64 | ocx-aarch64-unknown-linux-musl.tar.xz |
| macOS | Apple Silicon | ocx-aarch64-apple-darwin.tar.xz |
| macOS | Intel | ocx-x86_64-apple-darwin.tar.xz |
| Windows | x86_64 | ocx-x86_64-pc-windows-msvc.zip |
| Windows | ARM64 | ocx-aarch64-pc-windows-msvc.zip |
Each release also includes a sha256sum.txt file for checksum verification.
Manual install example (Linux x86_64)
# Download the archive and checksums
curl -LO https://github.com/ocx-sh/ocx/releases/latest/download/ocx-x86_64-unknown-linux-gnu.tar.xz
curl -LO https://github.com/ocx-sh/ocx/releases/latest/download/sha256sum.txt
# Verify checksum
sha256sum --check --ignore-missing sha256sum.txt
# Extract and move into place
tar xf ocx-x86_64-unknown-linux-gnu.tar.xz
install -m 755 ocx-x86_64-unknown-linux-gnu/ocx ~/.local/bin/ocxThe musl builds are fully statically linked
The musl variants have no runtime dependency on glibc. Use them in Alpine containers, minimal Docker images, or any environment where libc compatibility is uncertain.
Updating
Once ocx is installed, it can manage its own updates. Refresh the local index to discover new versions, then install and select the latest:
ocx index update ocx
ocx install --select ocxAlternatively, re-run the install script — it always fetches the latest release:
curl -fsSL https://ocx.sh/install.sh | shirm https://ocx.sh/install.ps1 | iexPin a specific version
To install a specific version instead of the latest, pass --version (Shell) or set $Version (PowerShell) — see the examples below.
curl -fsSL https://ocx.sh/install.sh | sh -s -- --version 0.5.0& { $Version = '0.5.0'; irm https://ocx.sh/install.ps1 | iex }Verify Installation
ocx info prints the installed version, supported platforms, and detected shell:
ocx infoUninstalling
To completely remove ocx and all installed packages, delete the data directory (default ~/.ocx, or whatever OCX_HOME points to):
rm -rf "${OCX_HOME:-$HOME/.ocx}"Remove-Item -Recurse -Force $(if ($env:OCX_HOME) { $env:OCX_HOME } else { "$env:USERPROFILE\.ocx" })Then remove the shell integration line from your profile (look for any line containing .ocx/env — the current installer wraps it in an existence check so that removing ~/.ocx/ alone no longer errors on shell startup, but any previously-added unguarded line should still be removed):
- bash: remove the
.ocx/envsource line from~/.bash_profileor~/.profile - zsh: remove the
.ocx/envsource line from~/.zshenv - fish: delete
~/.config/fish/conf.d/ocx.fish - PowerShell: remove the
.ocx\env.ps1source line from your$PROFILE
This deletes everything
This removes all installed packages, the local index cache, and ocx itself. If you only want to remove specific packages, use ocx uninstall --purge and ocx clean instead.
Next Steps
- Getting Started — install your first package, switch versions, and set up shell integration.
- User Guide — the three-store architecture, versioning, locking, and authentication for private registries.
- Environment Reference — all environment variables ocx reads, including
OCX_HOMEfor custom data directories.