# Quickstart

Publish a file, open its stable URL and send your first channel notification from a terminal.

Publish a private HTML page and send its link to your Personal channel in one command. You need Node.js 20 or newer, npm and a browser for signing in. You can complete the first run in the web dashboard without pairing a phone.

## Install the CLI

```sh
npm install -g @pushbag/cli
pushbag version
pushbag auth login
```

The first command installs the [pushbag CLI](https://www.npmjs.com/package/@pushbag/cli). The second prints the installed version. The third prints:

```text
Create a CLI key at:
  https://app.pushbag.dev/settings/keys

Then run:
  pushbag auth set <api-key>
```

## Connect your account

Open the printed URL and sign in with Google. Create a **Both** key. Keep the default publish grant for **Personal**. Paste the issued key in place of `YOUR_API_KEY`:

```sh
pushbag auth set YOUR_API_KEY
pushbag whoami
```

On a fresh installation you should see `Saved key for https://api.pushbag.dev in profile "default".` Check the account email and the credential line in the identity output. It should say `artifact and notification key`. If the account differs from the one in your browser, check whether your shell already sets `PUSHBAG_API_KEY`.

## Publish and notify

In a working directory, create a small report and send its first version:

```sh
printf '<!doctype html><title>Review</title><h1>Ready for review</h1>' > review.html
pushbag upload review.html --private --title "First review" --notify
```

The terminal prints an artifact ID, the stable URL and a notification receipt. Your values will differ from this example:

```text
Published html as private, version 1.
Artifact id: artifact-1
https://example.pushbag.dev
Notification receipt: receipt-1 (channel personal-channel, id message-1)
```

Open the stable URL in your signed-in browser. The page should say **Ready for review**. Open **Personal** in the [dashboard](https://app.pushbag.dev) and select **First review** to open version 1. To receive the same message on your phone, enable notifications for Personal in a registered app. Use the [Android app on Google Play](https://play.google.com/store/apps/details?id=dev.pushbag.app) or the [iPhone app](/docs/ios).

## Update the page under the same link

Replace `ARTIFACT_ID` with the ID printed above. The second upload appends one version and leaves the artifact private:

```sh
printf '<!doctype html><title>Review</title><h1>Approved</h1>' > review.html
pushbag upload review.html --artifact ARTIFACT_ID --json
```

Refresh the stable URL to see **Approved**. The original notification still links to version 1. The JSON array contains the stable `url` and the new pinned `versionUrl`. To send a plain message without a file, run `pushbag notify "Review complete"`. If the upload or delivery failed, start with the [troubleshooting guide](/docs/troubleshooting).
