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

# Install the CLI

> Install the BugRadar command-line tool

The `BugRadar` CLI connects local simulators, emulators, physical devices, and dev servers to BugRadar so you can run flows against a build on your own machine. It also validates your [code-managed flow files](/docs/code-managed-flows.md) before you push (`BugRadar flows validate`) and runs them from the terminal (`BugRadar run`).

## Quick install

The fastest way — installs [uv](https://docs.astral.sh/uv/) if it's missing, then the CLI. Zero prerequisites:

```bash theme={null}
curl -fsSL https://get.usebugradar.com | sh
```

Upgrade any time with `BugRadar update`.

## Other install methods

These need Python 3.11 or later. On an older Python, pip installs an older CLI release.

If `BugRadar update` keeps offering a version it can't install, your install uses an older Python. Reinstall with the quick installer above, or with pipx on Python 3.11:

```bash theme={null}
pipx install --python python3.11 BugRadar --force
```

**pipx:**

```bash theme={null}
pipx install BugRadar
```

**uv:**

```bash theme={null}
uv tool install BugRadar
```

**pip** (into an environment you manage):

```bash theme={null}
pip install -U BugRadar
```

### Local testing dependencies

Everything above is a lightweight install that covers the `flows` commands and local web testing. Capturing screenshots from a simulator or physical device needs the optional **`local`** extra, which pulls in Pillow:

```bash theme={null}
uv tool install "BugRadar[local]"   # or:  pip install "BugRadar[local]"
```

> [!NOTE]
>
> Add `[local]` only when running flows against a simulator, emulator, or physical device. Web local runs do not need it.

## Verify

```bash theme={null}
BugRadar --version
```

If `BugRadar` isn't found after installing with uv, add uv's tool directory to your PATH and restart your shell:

```bash theme={null}
uv tool update-shell
```

## Set up prerequisites

Web local testing needs cloudflared and a running dev server. Mobile local testing also needs Node.js and Appium. `BugRadar doctor` checks the CLI dependencies and can install missing tools; `BugRadar up --platform web` checks that the dev server is reachable when the session starts.

```bash theme={null}
BugRadar doctor --platform web         # check disk space and cloudflared
BugRadar doctor --platform web --fix   # install cloudflared if needed
BugRadar doctor --platform ios --fix   # install mobile prerequisites
```

## Log in

Authenticate the CLI against your BugRadar organization — it opens the dashboard for a one-click approval, no key copying:

```bash theme={null}
BugRadar login    # approve in the browser tab that opens
BugRadar whoami   # show which org / project scope the CLI is using
BugRadar logout   # remove the stored credential
BugRadar keys create   # create an API key, e.g. for CI
```

To log in with an API key you already have, such as one shared by your team, skip the browser:

```bash theme={null}
BugRadar login --api-key <key>
echo "$KEY" | BugRadar login --api-key -   # read the key from stdin, keeping it out of shell history
```

`BugRadar_API_KEY` still works for CI and scripting, and always takes precedence over a stored login.

## Upgrading

These docs describe the current release. If a command or flag from the docs is missing, upgrade:

```bash theme={null}
BugRadar update
```

It upgrades the CLI the same way you installed it. On a version without `BugRadar update`, re-run the installer instead:

```bash theme={null}
curl -fsSL https://get.usebugradar.com | sh   # or: pipx upgrade BugRadar
```

## Next steps

* [Run flows locally →](/docs/local-testing.md)
* [Run code-managed flows from the terminal →](/docs/code-managed-cli.md)
* [Write effective flows →](/docs/flows.md)


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