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

# Connect the CLI to your dashboard

> Run prescale login, approve it in your browser, then upload runs to your dashboard. Nothing leaves your machine unless you ask.

The CLI works fully offline. Connecting it to your dashboard at
[prescale.dev/dashboard](https://prescale.dev/dashboard) keeps a history of every run, a
capacity timeline per site, and shareable reports.

**1. Log in**

```bash theme={"system"}
prescale login
```

Your browser opens on the dashboard with a short code. Check it matches the one in
your terminal and click **Approve**. The CLI is signed in a second later; its token is
saved to `~/.config/prescale/credentials.json`, readable only by you.

**2. Upload a run**

```bash theme={"system"}
prescale investigate https://staging.myapp.com --i-own-this --upload
```

The CLI prints a link to the run. The first upload for a new site adds it as a target.

## Upload later, or check first

```bash theme={"system"}
prescale upload                    # the latest saved run
prescale upload 20261015T1200Z     # a specific run (id or unique prefix)
prescale upload --dry-run          # print exactly what would be sent, send nothing
```

An upload is the saved run file, unchanged. See [what gets uploaded](https://prescale.dev/docs/reference/data-boundary.md).

## Logged-in routes

Pass request headers with `-H`. They go to your site only and are never saved or uploaded.

```bash theme={"system"}
prescale investigate https://staging.myapp.com --path /api/orders \
  -H "authorization: Bearer $STAGING_TOKEN" --upload
```

## No browser on that machine

On a server or over SSH, `prescale login` prints the approval link instead of opening a
browser: open it on any device where you're signed in. `--no-browser` does the same
anywhere. Or create a token under **Connect** and run `prescale login --paste`.

## In CI

Set `PRESCALE_TOKEN` (and `PRESCALE_URL` if you self-host) instead of running
`prescale login`. For pull requests, use the [GitHub Action](https://prescale.dev/docs/guides/github-action.md).

## Tokens

Each approved login shows up on the **Connect** page as `CLI · <machine name>`. Revoke a
token there at any time: the CLI using it stops working immediately and tells you to log
in again. `prescale logout` forgets the saved token on this machine.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.