---
title: AppFlight CLI
description: Upload Android APKs to AppFlight directly from your terminal or CI pipeline — no phone required.
---

AppFlight CLI lets you upload Android APKs to AppFlight directly from your laptop or CI pipeline — no phone required.

```bash
appflight upload --flavor stage
```

## Why CLI?

The AppFlight mobile app is great for managing testers and browsing builds, but real development happens on laptops and build servers. The CLI closes that loop:

- Build on your machine → upload in one command
- Wire into GitHub Actions or Codemagic
- No Firebase credentials or service account keys needed — just an API key

## How it works

1. **Generate an API key** — AppFlight mobile app → Settings → API Keys → tap **+**
2. **Install the CLI** — `dart pub global activate appflight_cli`
3. **Init your project** — `appflight init --flavors stage:com.myapp.stage,prod:com.myapp`
4. **Login** — `appflight login` and paste your key
5. **Build and upload** — `flutter build apk --flavor stage --release && appflight upload --flavor stage`

## Commands

| Command | Description |
|---------|-------------|
| [`init`](/commands/init) | Create `appflight.json` in your project root |
| [`login`](/commands/login) | Save your API key to `~/.appflight/credentials.json` |
| [`upload`](/commands/upload) | Build and upload an APK to AppFlight |
| [`whoami`](/commands/whoami) | Print the currently authenticated user |
| [`logout`](/commands/logout) | Remove saved credentials from this machine |

## Requirements

- Dart SDK `>=3.0.0`
- An AppFlight account with at least one app created
- An API key from the AppFlight mobile app
