~/.opsh/bin, and adds an auto-start block to your shell configuration files so Opsh launches every time you open a new interactive terminal.
Prerequisites
- curl must be installed (it is available by default on macOS and most Linux distributions)
- A supported platform: macOS (arm64 or x64) or Linux (arm64 or x64)
Install
Run the following command in your terminal:What the installer does
Detect your platform and architecture
The installer checks your operating system (
uname -s) and CPU architecture (uname -m) to pick the correct binary. Supported combinations are macOS arm64, macOS x64, Linux arm64, and Linux x64.Fetch the latest release
The installer fetches the latest published release and resolves the correct download URL for your platform and architecture.
Download and extract the binary
The binary archive is downloaded to a temporary directory and extracted. The
opsh executable is copied to ~/.opsh/bin/.Add auto-start to your shell configuration
The installer appends a managed block to the following files if they exist:
~/.zprofile~/.zshrc~/.bashrc~/.bash_profile
~/.opsh/bin to your PATH and launches opsh automatically when you open an interactive shell session.Post-install: first launch
The first time Opsh starts, it creates a default config at~/.opsh/config.json and immediately launches the interactive setup to choose your AI provider and enter your API key. You can re-run this setup at any time:
Environment variables
Custom install location
By default, Opsh installs to~/.opsh. To install to a different directory, set OPSH_INSTALL_ROOT before running the installer:
$OPSH_INSTALL_ROOT/bin/opsh.
Disable auto-start
The auto-start block added to your shell rc files checks for theOPSH_DISABLE_AUTO environment variable. If it is set to any non-empty value, Opsh will not start automatically when you open a new terminal:
opsh.
Supported platforms
| Platform | arm64 | x64 |
|---|---|---|
| macOS | Yes | Yes |
| Linux | Yes | Yes |

