Skip to main content

androbuilder

Build and deploy Expo / React Native Android apps on ephemeral EC2, with a persistent EBS cache so repeat builds are fast — without keeping a machine running.

androbuilder release apk        # build a release APK to ./app-release.apk
androbuilder release aab        # build an AAB
androbuilder release deploy     # build an AAB and upload it to Google Play
androbuilder debug apk          # debug build

Each run: provisions a spot (or on-demand) builder, syncs your source, runs yarn install + expo prebuild + gradlew, uploads the artifact to S3, downloads it locally, and terminates the instance. Gradle caches and the yarn offline cache live on a small EBS volume that is reattached to the next builder — so nothing is lost when the instance dies.

Install

Requires Python ≥ 3.11 and the AWS CLI (configured, e.g. via aws login).

pipx install androbuilder-cli   # or: uv tool install androbuilder-cli
# from a clone:
pipx install .

Runtime deps: boto3, botocore, fabric, typer, rich, tqdm, tomli-w.

Quick start

From the root of your Expo project:

androbuilder init          # detect package name, prompt for AWS + keystore, write config
androbuilder doctor        # verify config; --provision creates key/SG/IAM/bucket
androbuilder release apk   # build

Configuration

Two levels, merged first-wins:

  1. Global — ~/.config/androbuilder/config.toml (shared across projects): AWS region/profile, AMI, subnet, SSH key, security group, IAM instance profile, instance types.
  2. Project — .androbuilder.toml in the project root (gitignored): repo/package name, S3 bucket, cache volume, signing keystore + passwords.

Precedence: CLI flags → ANDROBUBILDER_* env vars → project config → global config → defaults.

androbuilder init imports an existing legacy scripts/.env if present.

Secrets

By default signing passwords live in the gitignored .androbuilder.toml. For CI, prefer env indirection:

[signing]
keystore = "release.keystore"
alias = "my-alias"
store_password_env = "MYAPP_STORE_PASSWORD"
key_password_env = "MYAPP_KEY_PASSWORD"

AWS credentials are never stored by androbuilder — boto3 uses the standard chain; androbuilder login just wraps aws login.

App env (.env)

The selected env file is uploaded to the instance as .env:

  • release builds prefer .env.production (fallback .env);
  • debug builds use .env;
  • override with build.env_file in .androbuilder.toml, or androbuilder --env-file <path> release.

EXPO_PUBLIC_* vars from the selected file are also forwarded to the remote build environment.

The builder AMI

androbuilder needs an AMI with JDK 17, the Android SDK, Node, Yarn, the AWS CLI, and fastlane. Build one:

androbuilder bake-ami -w      # -w writes the resulting ami_id to the global config

It launches a temporary instance, installs the toolchain, registers an AMI, and terminates the instance. androbuilder release also auto-installs any extra Android SDK platform/build-tools the generated project requires.

Commands

Command Description
androbuilder init Scaffold .androbuilder.toml (+ global config)
androbuilder doctor [--provision] Verify config/AWS; optionally create resources
androbuilder login Refresh AWS credentials
androbuilder release [apk|aab|deploy] Build a release artifact
androbuilder debug [apk|aab] Build a debug artifact
androbuilder deploy Alias for release deploy
androbuilder bake-ami Build the toolchain AMI
androbuilder config show|get|set Inspect/edit config
androbuilder cache [info|delete] Manage the EBS cache volume
androbuilder instances [list|terminate-all] Housekeeping

Global flags: -C/--project, --config, -v/--verbose, --no-progress, --no-cache, --download-from auto|s3|sftp, --profile, --region, --dry-run.

How artifact retrieval works

  • S3 direct (default when locally readable): the instance is terminated first, then the artifact is downloaded straight from S3 — billing stops during download.
  • SFTP: the file is pulled over rsync → ssh cat → paramiko SFTP (in that order), then the instance is terminated.

Force a mode with --download-from s3|sftp.

Security notes

  • Keystores and play-store-key.json are gitignored; never commit them.
  • The builder security group only needs SSH (22) from your IP — tighten the 0.0.0.0/0 default created by init if you can.
  • Once published to Play, your signing keystore cannot change. Back it up.

Distribution

Published on PyPI (install via pipx/uv). Packaging assets for Homebrew, winget, and apt live under packaging/ — see docs/PUBLISHING.md.

License

MIT

Metadata

Release files for androbuilder-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for androbuilder-cli 0.1.1
File Size Uploaded
androbuilder_cli-0.1.1.tar.gz 96.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for androbuilder-cli 0.1.1
File Interpreter ABI Platform
androbuilder_cli-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 137.1 kB

Release files / androbuilder_cli-0.1.1.tar.gz

Download URL androbuilder_cli-0.1.1.tar.gz
Size 96.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8015b0c9410e5fcb037943860e2a1cd5b0200066cc83c3ac208c3a13cdb3304b
BLAKE2b-256 checksum
How to use checksums
fa6f50ee64e43403bd4543950085c452af7eef0f2bf1207c00965e21dfa88de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / androbuilder_cli-0.1.1-py3-none-any.whl

Download URL androbuilder_cli-0.1.1-py3-none-any.whl
Size 40.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1bd0ea7364b1d35cf1b8753ba7c875f8976c8073e81bb8b3accf87813075f69d
BLAKE2b-256 checksum
How to use checksums
ec12e7f8da06eb05710eb60d445f7292c9184067460fdd64669d1c51cd6fbcbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page