# Quick start

Retain an IPA, APK or AAB outside CI. **Choose either upload path**; both create the same immutable Build in AppBarn.

## Received a build instead?

You do **not** need to sign up to open a valid Share Link or QR code. Read [Share and install a build](/guides/share-install), then follow [iPhone steps](/guides/install-ios) or [Android steps](/guides/install-android). An emailed Build Tester invitation is different: it requires a verified AppBarn account.

## Common setup

1. [Create a free account](https://app.app-barn.com/signup) and verify your email.
2. Create a Free Workspace. AppBarn creates your first Project, App and production Environment automatically and opens **App → Builds**.
3. Choose **Upload in browser** or **Upload with the CLI** below. You do not need to create those registry resources again.

## Option A — Upload in browser

**Requires:** a signed-in Account Admin or App Manager and an `.ipa`, `.apk` or `.aab` file. **Does not require:** Node.js or an Automation Token.

1. Open **App → Builds**, the landing page after Workspace creation.
2. Under **Upload in browser**, choose the file and active Environment.
3. Enter the app identifier (for example `com.example.app`), version (`1.2.3`) and build number (`42`).
4. For an IPA, optionally enter the provisioning profile expiry. A future date is **not** proof of a valid device signature/profile or guaranteed iPhone installation.
5. Select **Verify and upload build** and then **View build** when ready.

The browser hashes the file locally and uploads directly to private storage with a short-lived signed URL. AAB files can be downloaded but not installed directly.

## Option B — Upload with the CLI

**Requires:** Node.js 22+, the official `appbarn-cli` npm package and a scoped Automation Token. This path also works in [CI pipelines](/ci/).

1. Open **Automation tokens** in the AppBarn app. Create a token scoped to your Project or App and copy it once.
2. [Install the CLI](/cli/install), then configure the App and Environment IDs shown in AppBarn:

```sh
npm install --global appbarn-cli
appbarn config set api https://api.app-barn.com
appbarn config set app <app-uuid>
appbarn config set environment <environment-uuid>
```

3. Supply the token via an environment variable or CI secret store, never a config file or command argument:

```sh
export APPBARN_TOKEN='<automation-token>'
```

4. Upload a build and confirm it is retained:

```sh
appbarn upload ./build/app.apk \
  --app-identifier com.example.app \
  --version 1.2.3 \
  --build-number 42
appbarn builds list
```

APK/AAB uploads need explicit identity options; the CLI can extract IPA identity when available. The CLI also captures detected CI provenance.

::: details AI prompt — Set up the first upload (Copilot, Codex, Cursor)

```text
Inspect this repository and locate an existing IPA, APK or AAB. Install the official appbarn-cli with Node.js 22+, configure https://api.app-barn.com and the real App/Environment UUIDs, and read the scoped token only from APPBARN_TOKEN. Supply Android identity flags explicitly. Ask me for missing IDs, artifact choices or secret setup; never invent them. Keep the current build process, upload the selected artifact and confirm a ready Build using appbarn builds list. Report the Build identity, SHA-256 and provenance without exposing secrets.
```

:::

## Expected result — either path

A **ready Build** appears under **App → Builds**, with its identity and SHA-256. You can [share it or assign testers](/guides/share-install). Browser uploads record local provenance; CLI uploads can record CI provenance.

## Common failures

- Browser upload cannot connect to secure storage: check the network and retry; support may need to verify R2 CORS.
- `401` in CLI: Automation Token missing, expired or revoked. Browser upload uses your sign-in instead.
- `403`/`404`: verify App/Environment, current permission and any token scope.
- `409`: reservation, idempotency or Environment conflict.
- `413`: artifact exceeds the 2 GiB upload cap.
- `429`: Workspace Build/storage quota is exhausted.

## Related

- [Upload with CLI](/cli/upload)
- [Configure CLI](/cli/configure)
- [Automation Tokens](/reference/automation-tokens)
- [Artifacts and limits](/reference/artifacts-limits)
