> ## 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 log in

> Install the Plivo CLI on macOS, Linux or Windows, log in, use it in CI and from agents, switch accounts, upgrade, and turn on shell completion.

Install `plivo`, sign in through your browser with `plivo login`, and confirm which account the CLI will use with `plivo auth whoami`.

## Install

The one-line 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`.

> [tab] macOS / Linux
>
> ```bash theme={null}
> brew install plivo/tap/plivo
> ```
>
> Without Homebrew, or on WSL, use the install script:
>
> ```bash theme={null}
> curl -fsSL https://raw.githubusercontent.com/plivo/plivo-cli/main/install.sh | bash
> ```

> [tab] Windows
>
> ```powershell theme={null}
> scoop bucket add plivo https://github.com/plivo/homebrew-tap
> scoop install plivo
> ```
>
> Without Scoop, use the install script in PowerShell:
>
> ```powershell theme={null}
> irm https://raw.githubusercontent.com/plivo/plivo-cli/main/install.ps1 | iex
> ```

To build from source (Go 1.26 or later): `git clone https://github.com/plivo/plivo-cli && cd plivo-cli && go build -o plivo .`

Then [log in](#log-in-with-a-browser). If a coding agent will drive the CLI, also install the [Plivo skills](https://plivo.com/docs/cli/agents.md).

| Installer setting | Description |
| - | - |
| `PLIVO_CLI_VERSION` | install a specific release tag instead of the latest (for example `v1.3.2`). |
| `PLIVO_INSTALL_DIR` | install into this directory instead of the first user-owned directory on `PATH`. |

**Verify a release.** Binaries for macOS, Linux and Windows (amd64 and arm64), `SHA256SUMS` and its signature are 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; `install.sh`, `install.ps1` and `plivo upgrade` verify that signature when cosign is installed. To check by hand:

```bash theme={null}
V=v1.3.2
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 were signed by that Plivo identity. Pin both the identity and the issuer: without them any valid Sigstore signature would pass.

## Log in with a browser

`plivo login` is the only way to sign in. It opens the Plivo Console in your browser, where you sign in and approve access, so your password never touches the CLI. The CLI saves a named **profile** in `~/.plivo/config.toml` and puts the auth token in your OS credential store (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux). Only when no credential store is available is the token written into `~/.plivo/config.toml`, readable by you alone.

| Flag | Description |
| - | - |
| `-n, --name <profile>` | name to save the profile under. When omitted, login derives it from your organization; the flag default is `default`. |
| `--no-verify` | skip the check request to `GET /Account/` after login (offline or mock use only). |
| `-y, --yes` | inside a coding agent, install the Plivo skills without asking. See [Skills offer inside a coding agent](#skills-offer-inside-a-coding-agent). |
| `-q, --quiet` | skip the skills offer. |

```bash theme={null}
plivo login --name staging
```

**Browser can't reach the terminal?** In a container, WSL, a VM or over SSH, the page the browser opens after you approve may fail to load. Copy the full URL from the address bar and paste it into the terminal. The CLI accepts only the URL of this login.

### Skills offer inside a coding agent

Run `plivo login` inside Claude Code, Cursor or Codex, and after sign-in it offers to install the Plivo skills where that agent reads them. `--yes` installs them without asking; `--quiet` skips the offer. See [Offer after login](https://plivo.com/docs/cli/agents.md#offer-after-login).

## Run in CI and from agents

There is no headless login, and `PLIVO_AUTH_ID` and `PLIVO_AUTH_TOKEN` are not read from the environment. For a CI runner, a container or a coding agent, a person must run `plivo login` once in the environment that will run commands; later commands use that saved profile and its credential store. Copying `config.toml` alone does not copy a token stored in the OS keychain, so use a persistent runner with access to the same profile and credential store, then confirm with `plivo auth whoami`.

> [!WARNING]
>
> A saved profile grants access to your account. For automated use, select the intended account, use [subaccounts](https://plivo.com/docs/cli/apis/account.md#subaccounts) to separate resources where appropriate, and protect the machine that holds the profile.

Useful settings in scripts (see [Telemetry](https://plivo.com/docs/cli/configure.md#telemetry) for what the last one turns off):

```bash theme={null}
export PLIVO_FEEDBACK_PROMPT=0    # never show the "rate the CLI?" prompt
export CI=1                       # turn off all prompts that need a terminal
export PLIVO_CLI_TELEMETRY=0      # see Telemetry
```

## Switch between accounts

A profile is a saved login. Keep one profile per account or subaccount and switch between them. Logging in to a different organization saves a second profile, named after it, instead of replacing the first.

| Command | What it does |
| - | - |
| `plivo auth list` | List saved profiles and show which one is active |
| `plivo auth use <name>` | Make a profile the active one for later commands |
| `plivo auth whoami` | Show the account behind the active profile (add `-o json` for JSON) |
| `plivo auth remove <name>` | Delete a profile and its stored token |

The CLI picks credentials from the `--profile` flag, then the active profile. Use `--profile` to run one command under another profile without switching:

```bash theme={null}
plivo --profile staging numbers list
```

## Log out

`plivo logout [profile]` removes a saved profile and deletes its token from the credential store.

```bash theme={null}
plivo logout            # the active profile
plivo logout staging
```

## Upgrade

`plivo upgrade` fetches the latest release, verifies the binary against the release's `SHA256SUMS` (and, when cosign is installed, the signature on those checksums), then atomically replaces the running executable. With `-o json` it prints one summary on stdout and progress on stderr.

A binary installed by Homebrew (it lives in a Homebrew Cellar) is refused, with a pointer to `brew upgrade plivo`, so the two don't fight over the same file. A binary from the install script works with `plivo upgrade`, even in a Homebrew `bin` folder.

| Flag | Description |
| - | - |
| `--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. |

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

On a terminal, the CLI prints a one-line hint on stderr when a newer version is available, at most once every 24 hours. Set `PLIVO_NO_UPDATE_CHECK=1` to silence it.

## Shell autocompletion

`plivo completion <shell>` generates a completion script so commands, subcommands and flags tab-complete. Run `plivo completion <shell> --help` for shell-specific notes.

```bash theme={null}
plivo completion zsh > "${fpath[1]}/_plivo"                     # zsh
source <(plivo completion bash)                                  # bash: enable in this shell
mkdir -p ~/.config/fish/completions                              # fish
plivo completion fish > ~/.config/fish/completions/plivo.fish
plivo completion powershell | Out-String | Invoke-Expression   # PowerShell
```
