Skip to content

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.

sh
curl -fsSL https://ocx.sh/install.sh | sh
ps1
irm https://ocx.sh/install.ps1 | iex

After installation, open a new terminal and verify:

sh
ocx info

Skip 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:

sh
curl -fsSL https://ocx.sh/install.sh | sh -s -- --no-modify-path

You 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.

PlatformArchitectureArchive
Linuxx86_64ocx-x86_64-unknown-linux-gnu.tar.xz
Linuxaarch64ocx-aarch64-unknown-linux-gnu.tar.xz
Linux (static)x86_64ocx-x86_64-unknown-linux-musl.tar.xz
Linux (static)aarch64ocx-aarch64-unknown-linux-musl.tar.xz
macOSApple Siliconocx-aarch64-apple-darwin.tar.xz
macOSIntelocx-x86_64-apple-darwin.tar.xz
Windowsx86_64ocx-x86_64-pc-windows-msvc.zip
WindowsARM64ocx-aarch64-pc-windows-msvc.zip

Each release also includes a sha256sum.txt file for checksum verification.

Manual install example (Linux x86_64)
sh
# 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/ocx

The 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:

sh
ocx index update ocx
ocx install --select ocx

Alternatively, re-run the install script — it always fetches the latest release:

sh
curl -fsSL https://ocx.sh/install.sh | sh
ps1
irm https://ocx.sh/install.ps1 | iex

Pin a specific version

To install a specific version instead of the latest, pass --version (Shell) or set $Version (PowerShell) — see the examples below.

sh
curl -fsSL https://ocx.sh/install.sh | sh -s -- --version 0.5.0
ps1
& { $Version = '0.5.0'; irm https://ocx.sh/install.ps1 | iex }

Verify Installation

ocx info prints the installed version, supported platforms, and detected shell:

sh
ocx info

Uninstalling

To completely remove ocx and all installed packages, delete the data directory (default ~/.ocx, or whatever OCX_HOME points to):

sh
rm -rf "${OCX_HOME:-$HOME/.ocx}"
ps1
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/env source line from ~/.bash_profile or ~/.profile
  • zsh: remove the .ocx/env source line from ~/.zshenv
  • fish: delete ~/.config/fish/conf.d/ocx.fish
  • PowerShell: remove the .ocx\env.ps1 source 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