---
title: CLI Examples
description: Practical Capawesome Cloud CLI examples — build a debug APK, ship a Live Update, roll back, sign a bundle, and automate in CI.
---

# Examples

Practical recipes using the [Capawesome CLI](index.md). Each one is a starting point you can adapt — see the [Command reference](commands.md) for the full set of options on any command.

## List your apps and builds

To see what's in your account, list your apps, then the builds for one of them:

```bash
npx @capawesome/cli apps:list
npx @capawesome/cli apps:builds:list --app-id "$APP_ID"
```

## Build a debug APK for Android

For quick on-device testing, build a debug APK from a Git branch:

```bash
npx @capawesome/cli apps:builds:create --platform android --type debug --git-ref main
```

## Build an iOS app for the App Store

To produce a store-ready iOS build, use the `app-store` type with the matching signing certificate:

```bash
npx @capawesome/cli apps:builds:create --platform ios --type app-store --git-ref main
```

## Download a build artifact

Once a build finishes, download its artifact to a local path:

```bash
npx @capawesome/cli apps:builds:download --apk ./app.apk
```

## Build your web app and publish a Live Update

To ship a web change over the air, build locally and upload the result to a channel:

```bash
npm run build
npx @capawesome/cli apps:liveupdates:upload --channel production
```

## Deploy a Live Update to multiple channels

To ship the same bundle to several channels in one go, repeat the `--channel` flag for each target:

```bash
npx @capawesome/cli apps:liveupdates:create --channel production --channel staging
```

## Roll back the latest Live Update

If a release misbehaves, roll the channel back to the previous bundle:

```bash
npx @capawesome/cli apps:liveupdates:rollback --channel production
```

## Sign and publish a bundle

To publish a signed bundle, pass your private key alongside the upload:

```bash
npx @capawesome/cli apps:liveupdates:upload --channel production --private-key private.pem
```

## Share a build with testers

To give external testers a public link they can open without an account, share a succeeded build:

```bash
npx @capawesome/cli apps:builds:share --description "Please test the new checkout flow"
```

Add `--json` to get the share `webUrl` and a `qrCodeUrl` you can embed in Slack or a pull request. See [Share a build](../native-builds/share-a-build.md).

## Submit a build to a store

To submit an existing build to a configured destination, create a deployment:

```bash
npx @capawesome/cli apps:deployments:create --build-number 42 --destination my-destination
```

## Automate in CI

Running these commands from a pipeline has its own considerations — token authentication, non-interactive flags, parsing JSON output, and waiting on builds. See [Scripting](scripting.md) for a complete walkthrough and a full build-and-deploy CI example.

## Next steps

- [Command reference](commands.md) — every command and option.
- [Scripting](scripting.md) — automate the CLI in scripts and CI.
- [Usage](usage.md) — global flags, JSON output, and exit codes.
- [Integrations](../integrations/index.md) — wire these recipes into your CI/CD provider.
