---
title: "Installation"
description: "Install the PgBeam CLI with npm, Homebrew, or the install script, on macOS, Linux, or Windows."
canonical: "https://pgbeam.com/docs/cli"
last-updated: "2026-10-29T19:01:20.000Z"
---

# Installation

> Install the PgBeam CLI with npm, Homebrew, or the install script, on macOS, Linux, or Windows.

URL: https://pgbeam.com/docs/cli

The PgBeam CLI is open source at [sferarc/pgbeam-cli](https://github.com/sferarc/pgbeam-cli).

> **npm and Homebrew are not live yet**
>
> The install script below works today. The npm package `@pgbeam/cli` and the
> Homebrew tap `sferarc/pgbeam` are documented here as what they will be, and
> neither installs anything until the first release publishes them. Use the
> install script, or the Windows script, until then.

Pick whichever fits how you already install tools. They all give you the same `pgbeam` command.

**npm**

Not published yet, so this command does not work today. It is what the npm
install will be.

```bash
npm install -g @pgbeam/cli
```

Runs on Node 20.19 or newer. To use it once without installing:

```bash
npx @pgbeam/cli --help
```

**Homebrew**

The tap is not populated yet, so this command does not work today. It is
what the Homebrew install will be.

```bash
brew install sferarc/pgbeam/pgbeam
```

Installs a self-contained native binary, so no Node runtime is needed. macOS and Linux, on both Apple silicon or ARM64 and x86_64.

Upgrade with `brew upgrade pgbeam`.

**Install script**

```bash
curl -fsSL https://pgbeam.com/install | sh
```

Downloads the same native binary as Homebrew and puts it on your PATH. macOS and Linux, x86_64 and ARM64. The binary is checked against the release's `SHA256SUMS` first, and nothing is installed if it does not match. Set `PGBEAM_VERSION` to install a specific release.

**Windows**

```powershell
irm https://pgbeam.com/install/windows | iex
```

Checks the binary against the release's `SHA256SUMS` before installing it, like the install script.

Once `@pgbeam/cli` is published, npm will work the same on Windows: `npm install -g @pgbeam/cli`.

Verify the installation:

```bash
pgbeam --version
```

After installing, authenticate with your PgBeam account:

```bash
pgbeam auth login
```

See [auth login](/docs/cli/auth/login) for details.

## Keeping it up to date

How you upgrade depends on how you installed:

| Installed with | Upgrade with                        |
| -------------- | ----------------------------------- |
| npm            | `npm install -g @pgbeam/cli@latest` |
| Homebrew       | `brew upgrade pgbeam`               |
| Install script | `pgbeam update`                     |

[`pgbeam update`](/docs/cli/update) replaces the native binary in place, so use it for an install-script install. On a Homebrew or npm install, let the package manager do it instead, or its bookkeeping and the binary on disk will disagree.