Get the prev CLI installed on your machine in seconds.

Quick Install

The fastest way to install the prev CLI is with our install script:

curl -fsSL https://prev.sh/install.sh | sh

This will automatically detect your operating system and architecture, and install using the best current method available:

  • Debian/Ubuntu: Installs via APT for automatic updates
  • RHEL/Fedora/Rocky/Alma/openSUSE/SLES: Downloads the binary directly until the RPM repository is published in lockstep with releases
  • macOS: Installs via Homebrew (if available), otherwise downloads the binary
  • Other Linux / Windows POSIX shells: Downloads the binary directly

Package Managers

APT (Debian/Ubuntu)

Import GPG key:

curl -fsSL https://apt.prev.sh/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/prev.gpg --yes

Add repository:

echo "deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/prev.gpg] https://apt.prev.sh stable main" | sudo tee /etc/apt/sources.list.d/prev.list > /dev/null

Install:

sudo apt-get update && sudo apt-get install -y prev

Updates will come automatically via sudo apt upgrade.

RPM-based Linux

Use the quick install script or manual binary install for now. The RPM repository is not used by the quick installer until it is published in lockstep with CLI releases.

Homebrew (macOS / Linux)

brew install prevsh/tap/prev

Updates via brew upgrade prev.

npm

npm install -g @prevsh/cli

This downloads the correct binary for your platform automatically. Updates via npm update -g @prevsh/cli.

Scoop (Windows)

scoop bucket add prev https://github.com/prevsh/scoop-bucket
scoop install prev

Updates via scoop update prev.

Automatic Update Checks

Interactive CLI runs check for a newer prev release at most once per day. The check is skipped in CI, in non-interactive shells, and for local development builds.

When a newer version is available, the CLI shows the detected installation method and offers an update where safe:

  • npm on Linux/macOS: installs the latest @prevsh/cli
  • Homebrew: uses the Homebrew upgrade path
  • APT: updates the prev package from apt.prev.sh
  • RPM-based Linux: uses the standalone installer fallback until an RPM repository is published in lockstep with releases
  • Scoop, direct Windows binaries, and Windows npm installs: show manual update instructions

The check stores only a timestamp in the user cache directory, typically ~/.cache/prev/update-check.json on Linux.

Manual Installation

Download Binary

You can download the latest binary directly from our public releases page:

Download the latest binary (example for Linux amd64):

VERSION=$(curl -fsSL https://api.github.com/repos/prevsh/apt/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
curl -fsSL -L "https://github.com/prevsh/apt/releases/download/${VERSION}/prev-linux-amd64" -o prev

Install it:

chmod +x prev && sudo mv prev /usr/local/bin/

Available binaries on each release:

  • prev-linux-amd64 / prev-linux-arm64 / prev-linux-386
  • prev-darwin-amd64 / prev-darwin-arm64
  • prev-windows-amd64.exe

Verify Installation

After installing, verify that the CLI is working:

prev --help

You should see the prev help menu with all available commands and options.

System Requirements

  • Linux: x86_64, ARM64, or 386 for standalone binary installs
  • macOS: Intel or Apple Silicon
  • Windows: x86_64

Next Steps

Once installed, you'll need an API key to start deploying. Head to the Quick Start guide to get up and running.