- Get started
- Install OCX
Install OCX
Install ocx on Linux, macOS or Windows with one command in the shell you already use.
No root access is needed.
Pick your shell and paste the command.
Install in your shell
Section titled “Install in your shell”curl -fsSL https://setup.ocx.sh/sh | shWorks in bash, zsh, dash, ash and ksh on Linux and macOS.
It needs curl or wget, and one of sha256sum, shasum or openssl.
irm https://setup.ocx.sh/pwsh | iexWorks in Windows PowerShell 5.1 and PowerShell 7 on Windows, and in PowerShell 7 on Linux and macOS.
On Linux and macOS it also needs tar.
From a POSIX shell:
nu -c "$(curl -fsSL https://setup.ocx.sh/nu || echo 'exit 3')"From inside Nushell:
nu -c (http get https://setup.ocx.sh/nu)Needs Nushell 0.105.1 or later. It works on Linux, macOS and Windows.
A bare curl https://setup.ocx.sh/nu | nu installs nothing, because Nushell does not run a script from a pipe.
curl -fsSL https://setup.ocx.sh/fish | fishNeeds fish 3.6.0 or later on Linux or macOS. It does not run on Windows.
From a POSIX shell:
elvish -c "$(curl -fsSL https://setup.ocx.sh/elvish || echo 'exit 3')"From inside Elvish:
elvish -c (e:curl -fsSL https://setup.ocx.sh/elvish | slurp)Needs Elvish 0.20.1 or later. It works on Linux, macOS and Windows.
A bare curl https://setup.ocx.sh/elvish | elvish installs nothing and exits 0, because Elvish reads the pipe as a terminal session.
The installer prints its progress to stderr and then hands over to ocx self setup.
That command installs OCX into your OCX home directory, ~/.ocx by default, and adds OCX to your shell profile.
The installer checks the archive against the SHA-256 digest in its manifest before it runs anything from the archive.
Open a new terminal and run ocx about to confirm that ocx is on your path.
Installer output shows what the installer prints.
Install in CI
Section titled “Install in CI”In CI, use the maintained integration for your provider.
It installs ocx and, in a project with an ocx.lock, pulls the pinned toolchain.
ci
- GitHub ActionsInstall and cache ocx tools in one step.
- GitLab CIplannedA CI/CD component with a shared cache.
For any other CI system, see the generic CI wrapper. Pin the installer and the version in CI, as Pin a version describes.
Where to go next
Section titled “Where to go next”- Pin a version: install a fixed
ocx, use thenextchannel, or freeze the whole manifest. - Configuration: every environment variable and flag the installers read.
- Mirrors and proxies: host one patched installer and trust a corporate CA.
- Installer output: what the installer prints, in each shell.
- Examples: a Dockerfile, an air-gapped host and a generic CI job.
- Exit codes and contract: what each exit code means and what the installers print.
- OCX documentation: what to do with
ocxonce it is installed.