Skip to main content
Opsh installs with a single command. The installer fetches the latest release for your platform, places the binary in ~/.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:
curl -fsSL https://opsh.dxu.one/install.sh | bash
After the installer finishes, open a new terminal window. Opsh starts automatically.

What the installer does

1

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

Fetch the latest release

The installer fetches the latest published release and resolves the correct download URL for your platform and architecture.
3

Download and extract the binary

The binary archive is downloaded to a temporary directory and extracted. The opsh executable is copied to ~/.opsh/bin/.
4

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
The block exports ~/.opsh/bin to your PATH and launches opsh automatically when you open an interactive shell session.
5

Open a new terminal

Close your current terminal and open a new one. Opsh detects that it is a fresh install and walks you through the initial configuration.

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:
opsh --init

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=/usr/local/opsh curl -fsSL https://opsh.dxu.one/install.sh | bash
The binary will be placed at $OPSH_INSTALL_ROOT/bin/opsh.

Disable auto-start

The auto-start block added to your shell rc files checks for the OPSH_DISABLE_AUTO environment variable. If it is set to any non-empty value, Opsh will not start automatically when you open a new terminal:
export OPSH_DISABLE_AUTO=1
You can still run Opsh manually at any time by typing opsh.

Supported platforms

Platformarm64x64
macOSYesYes
LinuxYesYes