> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install and upgrade the Plivo CLI

> Install the Plivo CLI on macOS, Linux, Windows or CI, keep it current, and turn on shell completion.

## Install

Install with a package manager, or with the one-line installer. The installer detects your OS and architecture, downloads the matching release binary, verifies its SHA-256 checksum, and places it in a user-owned directory on your `PATH`: no `sudo`.

<Tabs>
  <Tab title="Homebrew (macOS / Linux)">
    ```bash theme={null}
    brew install plivo/tap/plivo
    ```
  </Tab>

  <Tab title="Scoop (Windows)">
    ```powershell theme={null}
    scoop bucket add plivo https://github.com/plivo/homebrew-tap
    scoop install plivo
    ```
  </Tab>

  <Tab title="macOS / Linux / WSL">
    ```bash theme={null}
    curl -fsSL https://raw.githubusercontent.com/plivo/plivo-cli/main/install.sh | bash
    ```
  </Tab>

  <Tab title="Windows (PowerShell)">
    ```powershell theme={null}
    irm https://raw.githubusercontent.com/plivo/plivo-cli/main/install.ps1 | iex
    ```
  </Tab>

  <Tab title="From source">
    ```bash theme={null}
    git clone https://github.com/plivo/plivo-cli && cd plivo-cli && go build -o plivo .
    ```

    Requires Go 1.26 or later.
  </Tab>
</Tabs>

Once the CLI is installed, [log in to Plivo](/docs/cli/authenticate#log-in-with-a-browser), set up [autocompletion](/docs/cli/install#shell-autocompletion), or install the [agent skill](/docs/cli/agents) if an AI coding agent will be driving the CLI.

**Installer options**

* `PLIVO_CLI_VERSION`: install a specific release tag instead of the latest (for example `v0.2.0`).
* `PLIVO_INSTALL_DIR`: install into a specific directory instead of the first user-owned directory on `PATH`.

**Verifying a release**

Release binaries for macOS, Linux and Windows (amd64 and arm64), the `SHA256SUMS` file and its signature are published on the [GitHub releases page](https://github.com/plivo/plivo-cli/releases). The checksums are signed with [cosign](https://docs.sigstore.dev/cosign/installation/) in keyless mode, and `install.sh`, `install.ps1` and `plivo upgrade` all verify that signature when cosign is present on the machine. To check by hand:

```bash theme={null}
V=v1.0.0
for f in SHA256SUMS SHA256SUMS.sig SHA256SUMS.pem; do
  curl -fsSLO "https://github.com/plivo/plivo-cli/releases/download/$V/$f"
done

cosign verify-blob SHA256SUMS \
  --signature SHA256SUMS.sig --certificate SHA256SUMS.pem \
  --certificate-identity cx-tech@plivo.com \
  --certificate-oidc-issuer https://accounts.google.com
```

`Verified OK` means the checksums genuinely came from Plivo. Pin both the identity and the issuer: without them any valid Sigstore signature would pass.

## Upgrade

Keep your Plivo CLI up to date to get new commands, fixes, and security updates.

**Command:** `plivo upgrade`

`plivo upgrade` fetches the latest release, verifies the downloaded binary against the release's `SHA256SUMS` (and, when cosign is installed, the signature on those checksums), then atomically replaces the running executable. It honours `-o json`, printing a single summary on stdout with progress on stderr.

If the running binary lives inside a Homebrew prefix, `upgrade` refuses and points you at `brew upgrade plivo` so the two do not fight over the same file.

**Flags**

* `--check`: report whether a newer release exists without installing it.
* `--version <tag>`: install a specific release tag instead of the latest.
* `--force`: reinstall even if you are already on the target release.

**Examples**

```bash theme={null}
plivo upgrade            # install the latest release
plivo upgrade --check    # check only
plivo upgrade --version v0.4.1
```

The CLI also prints a one-line hint on stderr when a newer version is available (at most once every 24 hours, only when attached to a terminal). Set `PLIVO_NO_UPDATE_CHECK=1` to silence it.

## Shell autocompletion

Generate a completion script for your shell so that commands, subcommands, and flags tab-complete.

**Command:** `plivo completion <shell>`

**Examples**

```bash theme={null}
# zsh
plivo completion zsh > "${fpath[1]}/_plivo"

# bash
plivo completion bash > /usr/local/etc/bash_completion.d/plivo

# fish
plivo completion fish > ~/.config/fish/completions/plivo.fish

# PowerShell
plivo completion powershell | Out-String | Invoke-Expression
```

Run `plivo completion <shell> --help` for shell-specific installation notes.
