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

# Install the CLI

> Install the autosana command-line tool

The `autosana` CLI connects local simulators, emulators, physical devices, and dev servers to Autosana so you can run flows against a build on your own machine. It also validates your code-managed flow files offline before you push (`autosana flows validate`).

## 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.autosana.ai | sh
```

Re-run it any time to upgrade.

## Other install methods

**pipx:**

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

**uv:**

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

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

```bash theme={null}
pip install "autosana>=0.8.0"
```

<Note>
  The `autosana flows` commands (validate/export) require **version 0.8.0 or newer**. Older installs won't have them.
</Note>

### Local device testing

Everything above is a lightweight install that covers the `flows` commands and the rest of the CLI. Capturing screenshots from a simulator or physical device needs the optional **`local`** extra (it pulls in Pillow), installed with uv or pip:

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

<Note>
  Add `[local]` only if you're running flows against a device on your own machine.
</Note>

## Verify

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

If `autosana` 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

Local device testing needs Node.js, Appium, and a tunnel. The CLI installs and checks them for you:

```bash theme={null}
autosana doctor        # report what's missing
autosana doctor --fix  # auto-install Node.js + Appium + cloudflared
```

## Log in

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

```bash theme={null}
autosana login    # approve in the browser tab that opens
autosana whoami   # show which org / project scope the CLI is using
autosana logout   # remove the stored credential
```

Requires CLI **0.9.0 or newer**. `AUTOSANA_API_KEY` still works for CI and scripting, and always takes precedence over a stored login.

## Upgrading

```bash theme={null}
curl -fsSL https://get.autosana.ai | sh   # or:
uv tool upgrade autosana
pipx upgrade autosana
```

## Next steps

* [Run flows locally →](/local-testing)
* [Write effective flows →](/flows)
