# appitool — Complete CLI Documentation > Unified CLI utility for Apple App Store Connect and Google Play operations. > Version: 0.11.25 > Generated automatically from VitePress Markdown documentation. --- # Getting Started ![appitool](https://appitool.appibara.com/banner.png) `appitool` is a unified Swift CLI utility and release orchestration engine for Apple App Store Connect, Apple Developer Portal, Google Play Console, Firebase App Distribution, Firebase Authentication, and Git-backed code signing. ## Requirements - **Prebuilt binary (`install.sh` / `self-update`)**: - **macOS**: Apple Silicon (`arm64`), macOS 26+ - **Linux**: `x86_64` (`amd64`) or `arm64` (`aarch64`) - **Platform build tooling** (only required when compiling mobile apps via `build` or `flow`): - **iOS**: macOS with Xcode command-line tools (`xcodebuild`, `xcrun`) and optionally `xcbeautify` (default formatter) - **Android**: Java JDK and project `./gradlew` wrapper - **Building from source**: Swift `6.4+` --- ## Installation ### One-Line Quick Install ```bash curl -fsSL https://raw.githubusercontent.com/appibara-ltd/appitool/main/install.sh | bash ``` The installer: 1. Detects your OS and CPU architecture (`darwin-arm64`, `linux-x86_64`, or `linux-arm64`). 2. Downloads the release tarball and `checksums.txt` from `appibara-ltd/appitool`. 3. Verifies the SHA256 checksum. - If the GitHub CLI (`gh`) is installed and signed in (`gh auth login`, or `GITHUB_TOKEN`/`GH_TOKEN` set), also verifies the GitHub build provenance attestation with `gh attestation verify --signer-workflow appibara-ltd/appitool/.github/workflows/release.yml`, and aborts if it fails. Otherwise this check is skipped with a notice. Set `APPITOOL_SKIP_ATTESTATION=1` to skip it explicitly. 4. Installs the binary to `/usr/local/bin/appitool` (if writable) or `~/.local/bin/appitool` (automatically updating `~/.zshrc`, `~/.bash_profile`, `~/.bashrc`, or `~/.config/fish/config.fish`) and creates or updates an `aptl` symlink next to it (leaving any existing unrelated file or symlink untouched). ### Avoiding GitHub API Rate Limits (Optional) In CI or shared networks, pass a GitHub Personal Access Token via `GITHUB_TOKEN` (or `GH_TOKEN`) to avoid unauthenticated GitHub API rate limits: ```bash curl -fsSL https://raw.githubusercontent.com/appibara-ltd/appitool/main/install.sh | GITHUB_TOKEN=$(gh auth token) bash ``` ### Build from Source ```bash git clone https://github.com/appibara-ltd/appitool.git cd appitool # Build optimized release binary with minimal binary size swift build -c release strip .build/release/appitool # Optional: Link to PATH ln -sf "$(pwd)/.build/release/appitool" /usr/local/bin/appitool ``` You can also run directly via Swift Package Manager during development: ```bash swift run appitool -h ``` --- ## Upgrading `appitool` includes a built-in self-updater with SHA256 verification and build provenance (attestation) verification with sigstore-swift, cross-checked with `gh` when it is installed: ```bash # Check if a newer release is available appitool self-update --check # Upgrade in place appitool self-update # Force re-installation even if already on the latest version appitool self-update --force ``` See [`appitool self-update`](https://appitool.appibara.com/commands/self-update) for details. --- ## Quick Start ### 1. Create a `.env` File Copy `.env.example` into your project root and configure your credentials: ```bash cp .env.example .env ``` ### 2. Inspect Local Project Identifiers Discover iOS bundle identifiers (across targets/configurations) and Android `applicationId`, `namespace`, and product flavors in the current repository: ```bash appitool inspect ``` ### 3. Verify Remote Store Connectivity Validate your credentials and check the latest build numbers on App Store Connect, Google Play Console, or Firebase App Distribution: ```bash # Check App Store Connect / TestFlight latest build appitool check ios -d appstore # Check Google Play Console latest build appitool check android -d appstore # Check Firebase App Distribution latest build appitool check ios -d adhoc appitool check android -d adhoc ``` ### 4. Run a Dry-Run Release Flow Validate all requirements, project detection, Match sync (in read-only mode), and build-number calculation without modifying project files or uploading binaries: ```bash appitool flow ios -d appstore --dry-run appitool flow android -d adhoc --dry-run ``` --- # Configuration & `.env` `appitool` uses a strict, deterministic configuration model. Commands resolve CLI options with environment variable fallbacks, while internal tasks, services, and flow presets receive resolved values explicitly. ## Resolution Priority Options and credentials are resolved in the following priority order (highest to lowest): 1. **Explicit CLI Flags** (e.g., `-b com.example.app`, `--apple-key-id ...`) 2. **Process Environment Variables** (already exported in your shell or CI runner) 3. **`.env` File** (automatically loaded from the current working directory if present; existing environment variables are **not** overwritten) --- ## `.env` Parser (`EnvLoader`) The built-in `EnvLoader` parses `.env` files without external dependencies and supports: - **Comments**: Full-line `#` comments and trailing inline comments preceded by a space (`KEY=value # comment`). - **`export ` prefix**: Standard shell syntax like `export APPLE_KEY_ID=2X9R4HXF34`. - **Single and double quotes**: Single quotes (`'...'`) preserve literal values; double quotes (`"..."`) unescape `\n`, `\r`, `\t`, `\"`, and `\\`. - **Multiline quoted values**: Multiline PEM keys or JSON payloads enclosed in quotes. - **`=` preservation**: Base64 padding (`=`) and URL query strings (`?token=...`) are preserved intact. - **Tilde (`~`) expansion**: Paths starting with `~/` expand to the current user's home directory where path resolution is supported. - **Empty value handling**: Keys with empty or whitespace-only values (e.g., `MATCH_GIT_BRANCH=`) are skipped during `.env` injection and treated as unset when read via `EnvLoader.value(for:)`, so built-in defaults and fallbacks apply across both `.env` files and CI/shell environments. --- ## Environment Variables Reference ### Identifier Resolution Order App identifiers are resolved the same way by every command: **CLI option → `.env` variable → local project detection**. | Identifier | CLI Option | `.env` Variable | Project Detection | |:---|:---|:---|:---| | iOS bundle ID | `-b, --bundle-id` | `APPLE_BUNDLE_ID` | Main target bundle ID from the local Xcode project | | Android package name | `--package-name` | `GOOGLE_PACKAGE_NAME` | `applicationId` / `namespace` from the local Android project | | Firebase App ID | `--firebase-app-id` | `FIREBASE_IOS_APP_ID` / `FIREBASE_ANDROID_APP_ID` (by platform) | — | > `flow ios` and `flow android` skip the generic project detection here because their presets detect identifiers themselves (scheme- and flavor-aware). ### Apple App Store Connect & Developer Portal | Variable | Description | Example / Default | |:---|:---|:---| | `APPLE_KEY_ID` | App Store Connect API Key ID | `2X9R4HXF34` | | `APPLE_ISSUER_ID` | App Store Connect API Issuer UUID | `57246542-96fe-1a63-e053-0824d011072a` | | `APPLE_KEY` | Path to `.p8` file, raw PEM string, or Base64-encoded `.p8` | `./AuthKey_2X9R4HXF34.p8` | | `APPLE_BUNDLE_ID` | Default iOS bundle identifier | `com.example.app` | | `APPLE_TEAM_ID` | Apple Developer Team ID (10-character alphanumeric) | `ABCDE12345` | ### iOS `xcodebuild` Configuration | Variable | Description | Default / Behavior | |:---|:---|:---| | `XCODE_WORKSPACE` | Path to `.xcworkspace` | Auto-discovered in `.` or `ios/` | | `XCODE_PROJECT` | Path to `.xcodeproj` | Auto-discovered in `.` or `ios/` | | `XCODE_SCHEME` | Xcode scheme name to build | Auto-inferred via `xcodebuild -list -json` | | `XCODE_CONFIGURATION` | Build configuration (`Release` or `Debug`) | `Release` | | `XCODEBUILD_FORMATTER` | Pipe formatter for `xcodebuild` output | `xcbeautify --renderer github-actions` | ### Google Play Developer API | Variable | Description | Example / Default | |:---|:---|:---| | `GOOGLE_KEY` | Path to Service Account JSON, raw JSON string, or Base64 JSON | `./service-account.json` | | `GOOGLE_PACKAGE_NAME` | Target Android application package name | `com.example.app` | | `GOOGLE_PLAY_ACCOUNT_ID` | Play Console account ID for `google` user commands: the number in `play.google.com/console/developers/` (not the Google Cloud project, service account, or package name). `--account-id` overrides it. | `1234567890123456789` | ### Store Assets (`apple assets` & `google assets`) | Variable | Description | Default / Behavior | |:---|:---|:---| | `STORE_ASSETS_PATH` | Folder that `assets` and `metadata` `download` write to and `upload` read from by default. Absolute, `~`-prefixed, or relative to the current directory. Store folders go directly inside it: `/apple///` and `/google///` (no project folder, since the path is project-specific). `-o, --output` (download) and `-f, --file` (upload) still take precedence. | Unset or empty: `~/.appitool/assets///` | | `APPLE_REVIEW_DEMO_PASSWORD` | App Review demo account password sent by `apple metadata upload` when it differs from the current value. Never written to or read from metadata files; masked in output. | Unset: password is not changed | ### Android Gradle & Keystore Signing | Variable | Description | Default / Behavior | |:---|:---|:---| | `ANDROID_PROJECT_DIR` | Android root directory containing `gradlew` | `./android` if present, else `.` | | `ANDROID_FLAVOR` | Gradle product flavor (e.g., `production`, `staging`); fallback for `build android --flavor` and `flow android --flavor` | None | | `ANDROID_CONFIGURATION` | Build type (`Release` or `Debug`) | `Release` | | `ANDROID_KEYSTORE_PATH` | Path to local `.keystore` / `.jks` file | None | | `ANDROID_KEYSTORE` | Base64-encoded keystore content (decoded to temporary keystore) | None | | `ANDROID_KEYSTORE_PASSWORD` | Keystore store password | None | | `ANDROID_KEY_ALIAS` | Key alias inside keystore | None | | `ANDROID_KEY_PASSWORD` | Key password | None | ### Firebase (App Distribution & Auth) | Variable | Description | Notes | |:---|:---|:---| | `FIREBASE_IOS_APP_ID` | Firebase App ID for iOS (`1::ios:`) | Used by `check ios`, `flow ios -d adhoc`, and `firebase` commands | | `FIREBASE_ANDROID_APP_ID` | Firebase App ID for Android (`1::android:`) | Used by `check android`, `flow android -d adhoc`, and `firebase` commands | | `FIREBASE_PROJECT_ID` | Firebase / Google Cloud project ID or project number | Falls back to `GOOGLE_PROJECT_ID` or project number parsed from `FIREBASE_*_APP_ID` | | `GOOGLE_PROJECT_ID` | Fallback Google Cloud project ID when `FIREBASE_PROJECT_ID` is unset | Used by `FirebaseProjectOptions` | ### Match Code Signing (`appitool match` & `flow`) | Variable | Description | Default / Behavior | |:---|:---|:---| | `MATCH_GIT_URL` | Git repository URL for certificates/profiles/keystores | Required for Match | | `MATCH_GIT_BRANCH` | Git branch name | `master` | | `MATCH_GIT_TOKEN` | HTTPS Git Personal Access Token or SSH private/deploy key (file path, raw PEM, or Base64) | Falls back to `GITHUB_TOKEN`, then `GH_TOKEN` | | `MATCH_PASSWORD` | Passphrase for AES-256 encryption/decryption | Required for Match | | `MATCH_KEYCHAIN_NAME` | Custom macOS keychain name or path | `appitool` | | `MATCH_KEYCHAIN_PASSWORD` | Password used to create/unlock custom keychain | `appipass` | | `MATCH_READONLY` | In `flow ios` (`MatchOptions`), read-only unless set to `"false"` | `true` (unless `"false"`) | | `MATCH_TYPE` | Default Match profile type for `match ios sync`, `nuke`, and `prune` when `-t, --type` is omitted | `appstore` | ### Webhook Notifications | Variable | Description | Notes | |:---|:---|:---| | `SLACK_URL` | Slack incoming webhook URL | Used by `slack` and `flow` for success/failure attachments | | `SLACK_BOT_TOKEN` | Slack bot token (`xoxb-…`, `chat:write` scope) for `chat.postMessage` | Used by `slack`; takes precedence over `SLACK_URL` unless `--url` is passed | | `SLACK_CHANNEL` | Default channel ID or name for bot token delivery | Used by `slack` with a bot token | | `KOKONO_URL` | KokoNo webhook URL (`https://kokono.me/notify?token=`) | Used by `kokono` and `flow` | | `KOKONO_E2E_PUBLIC_KEY` | Base64 X25519 recipient public key for KokoNo E2E encryption | Optional | ### GitHub Self-Update | Variable | Description | Notes | |:---|:---|:---| | `GITHUB_TOKEN` | Optional GitHub PAT to avoid API rate limits in `self-update` & Match HTTPS PAT fallback | Falls back to `GH_TOKEN` | | `GH_TOKEN` | Secondary fallback token in `self-update` & Match | Checked if `GITHUB_TOKEN` is unset | ### Build Provenance Attestation (`flow --attest`) `flow ios --attest` and `flow android --attest` read these variables. GitHub Actions sets all of them except `APPITOOL_ATTEST_KEY` itself (never put those in `.env`). The OIDC token request variables exist only when the job has `permissions: id-token: write`, and keyless signing needs them. | Variable | Description | Notes | |:---|:---|:---| | `ACTIONS_ID_TOKEN_REQUEST_URL`, `ACTIONS_ID_TOKEN_REQUEST_TOKEN` | Request the job's OIDC token (audience `sigstore`) for the Sigstore signing certificate | Set by GitHub Actions with `id-token: write` | | `GITHUB_SERVER_URL`, `GITHUB_REPOSITORY`, `GITHUB_REF`, `GITHUB_SHA` | The built source (`externalParameters.source`, `resolvedDependencies`) | Set by GitHub Actions | | `GITHUB_WORKFLOW_REF` | The signing workflow (`runDetails.builder.id`) | Set by GitHub Actions | | `GITHUB_RUN_ID`, `GITHUB_RUN_ATTEMPT` | The run (`runDetails.metadata.invocationId`) | Set by GitHub Actions | | `APPITOOL_ATTEST_KEY` | ECDSA P-256 private key for `--attest` (file path, PEM, or Base64); `--attest-key` overrides it. Signs without the OIDC token and without a public log entry | Set it from a GitHub Actions secret; never commit it. Ignored without `--attest` | ### CI Mode & Destructive Command Guard `appitool` resolves CI mode in precedence order: explicit CLI flag (`--ci` / `--no-ci`) → `CI` → CI provider variables. When CI mode is active, destructive commands (`apple delete-*`, `apple prune-*`, `apple devices disable`, `apple invitations cancel`, `apple versions delete`, `apple assets delete`, `google assets delete`, `google users delete`, `google invitations cancel`, `google users revoke`, `firebase apps delete`, `firebase users delete`, `firebase firestore delete`, `match ios nuke`, `match ios prune`) are skipped as a no-op with a warning and exit code `0`. | Variable | Description | Notes | |:---|:---|:---| | `CI` | Generic CI indicator | Any non-empty value except `0`, `false`, `no`, `off` enables CI mode; explicit falsy `CI` suppresses provider fallback | | `GITHUB_ACTIONS`, `GITLAB_CI`, `BITRISE_IO`, `CIRCLECI`, `BUILDKITE`, `JENKINS_URL`, `TF_BUILD`, `TEAMCITY_VERSION`, `TRAVIS`, `CODEMAGIC_BUILD_ID`, `CI_XCODE_CLOUD` | Provider-specific CI indicators (checked when `CI` is unset or blank) | Evaluated with the same truthy/falsy rules (`0`, `false`, `no`, `off`, and empty strings are ignored) | --- ## Local Storage Architecture (`~/.appitool`) `appitool` centralizes build artifacts, Xcode DerivedData, temporary keystores, and exported certificates under `~/.appitool` (`AppitoolPaths`): ```text ~/.appitool/ ├── ios/ │ └── / │ ├── build/ │ │ └── _[_adhoc|_development]/ # Falls back to │ │ ├── .xcarchive │ │ ├── .ipa │ │ └── .app.dSYM.zip │ └── derivedData/ ├── android/ │ ├── / │ │ └── build/ │ │ └── _[_adhoc|_development]/ # Falls back to │ │ ├── _release.aab │ │ └── _release.apk │ ├── keystores/ │ │ └── .keystore │ └── tmp/ ├── certs/ │ └── / ├── assets/ # default store assets root; STORE_ASSETS_PATH replaces assets// (older versions used ~/.appitool/screenshots/) │ └── / │ ├── apple/// # apple assets download / upload: screenshot types (01_.png) and header|search (one image), .appitool-manifest.json for upload --sync │ ├── apple//metadata/ # apple metadata download / upload: .txt (name, subtitle, description, keywords, …) │ ├── apple/metadata/ # app-level: copyright, categories, App Review details, content rights, accessibility URL │ ├── google/// # Used by both download and default bulk upload (01.png, .appitool-manifest.json for upload --sync) │ ├── google//metadata/ # google metadata download / upload: title, short_description, full_description, video │ └── google/metadata/ # app-level: contact_email, contact_phone, contact_website, default_language └── match/ └── / # Temporary Git clone working directory (auto-cleaned) ``` Use [`appitool clean`](https://appitool.appibara.com/commands/clean) to inspect sizes and prune old build artifacts and iOS `derivedData` directories safely (`certs/` is always preserved; `~/.appitool/assets` and the legacy `~/.appitool/screenshots` are only cleaned with `--assets`). --- # Flow Architecture `appitool flow` is an opinionated release orchestration engine inspired by Fastlane lanes. Every flow execution transitions sequentially through a standardized 7-stage lifecycle backed by a shared `FlowContext` and a strict error boundary in `FlowRunner`. ## The 7-Stage Pipeline ```text ┌─────────┐ ┌──────────┐ ┌─────────┐ ┌───────────┐ ┌────────────┐ ┌───────────┐ ┌─────────────┐ │ setup │──▶│ prebuild │──▶│ build │──▶│ postbuild │──▶│ prerelease │──▶│ release │──▶│ postrelease │ └─────────┘ └──────────┘ └─────────┘ └───────────┘ └────────────┘ └───────────┘ └─────────────┘ ``` | # | Stage (`FlowStage`) | Emoji | Display Name | Core Responsibilities | |:---:|:---|:---:|:---|:---| | 1 | `setup` | 🔍 | Setup & Environment | Inspect project (`Xcode` / `Gradle`), resolve bundle ID / package name, sync Match certs/profiles or keystore, fetch latest remote build number. | | 2 | `prebuild` | 🔧 | Pre-Build & Versioning | Compute next build number / `versionCode` (`max(remote, local) + 1` via `BuildNumberPolicy`), snapshot `project.pbxproj`, apply temporary manual code signing to Xcode targets, and normalize literal `Info.plist` `CFBundleVersion` entries to `$(CURRENT_PROJECT_VERSION)` via `XCodeTasks.updateBuildNumber`. | | 3 | `build` | 🔨 | Build Compilation | Run `xcodebuild` (injecting `CURRENT_PROJECT_VERSION=` for `.xcarchive`, `.ipa`, and dSYM, then restoring `project.pbxproj` and any temporary `Info.plist` edits in `defer`) or `./gradlew` (`bundleRelease` / `assembleRelease`) and record artifact paths in `FlowContext`. | | 4 | `postbuild` | 📦 | Post-Build | Verify that the generated `.ipa`, `.aab`, or `.apk` artifact exists on disk, is non-empty, and log its file size; with `--attest`, sign its SLSA build provenance with Sigstore and write `.sigstore.json` (`AttestationPresetHelpers`). | | 5 | `prerelease` | 📝 | Pre-Release | Generate plain-text store release notes via `GenerateReleaseNotesTask` using platform tag prefix (`🍏_` for iOS, `🤖_` for Android) and store character limits (left empty if `HEAD` already sits on a matching tag); supports `--release-notes`, `--notes-from`, and `--notes-locale` overrides and logs the resolved source and preview. | | 6 | `release` | 🚀 | Release & Store Upload | Upload binary to App Store Connect / TestFlight, Google Play Console `internal` track, or Firebase App Distribution. | | 7 | `postrelease` | 📣 | Post-Release & Notifications | Create & push the release Git tag (`🍏__[_adhoc]` / `🤖__[_adhoc]`) via `GitTagTask` and dispatch completion notifications to configured Slack and KokoNo webhooks (previewed / skipped in `--dry-run` mode). | --- ## Built-in Flow Presets Choosing a platform (`ios` / `android`) and distribution (`appstore`, `adhoc`, `development`) automatically selects a `FlowPreset`: | Command Invocation | Preset | Target Destination | |:---|:---|:---| | `flow ios -d appstore` | `IOSInternalPreset` (`iOS Internal`) | App Store Connect / TestFlight | | `flow ios -d adhoc` | `IOSAdHocPreset` (`iOS AdHoc`) | Firebase App Distribution (`internal` group) | | `flow ios -d development` | `IOSDevelopmentPreset` (`iOS Development`) | Firebase App Distribution (`internal` group) | | `flow android -d appstore` | `AndroidInternalPreset` (`Android Internal`) | Google Play Console (`internal` track) | | `flow android -d adhoc` | `AndroidAdHocPreset` (`Android AdHoc`) | Firebase App Distribution (`internal` group) | | `flow android -d development` | `AndroidDevelopmentPreset` (`Android Development`) | Firebase App Distribution (`internal` group) | > Presets share stage implementations and only supply what differs per destination. Sources are grouped by platform under `Sources/appitool/Flow/Presets/`: > `iOS/IOSPresetHelpers.swift` (project detection, Match sync, manual signing + build-number bump, archive/export), > `Android/AndroidPresetHelpers.swift` (project/flavor detection, Gradle build), and > `Shared/FirebasePresetHelpers.swift` (latest Firebase build lookup and upload/distribution, used by the ad-hoc and development presets). ### 1. `IOSInternalPreset` (`flow ios -d appstore`) - **Required Configuration (`requirements`)**: - `APPLE_KEY_ID` - `APPLE_ISSUER_ID` - `APPLE_KEY` - `MATCH_GIT_URL` - `MATCH_PASSWORD` - **Stage Execution**: - `setup`: Detects `.xcworkspace`/`.xcodeproj`, scheme, configuration, main target, bundle ID, and project version. Runs `MatchTask` with `type: .appstore` (forced `readonly` when `--dry-run` is set). Queries App Store Connect (`GetLatestBuildNumberTask`) for the latest TestFlight build number. - `prebuild`: Extracts signing identity (`iPhone Distribution` or `Apple Distribution`) and Team ID from installed certificates. Snapshots `project.pbxproj`, configures manual code signing per target via `XCodeTasks.configureManualSigning`, computes `max(appstore_build_number, project build number) + 1` in `context.buildNumber`, and calls `XCodeTasks.updateBuildNumber` to normalize literal `Info.plist` `CFBundleVersion` values to `$(CURRENT_PROJECT_VERSION)` without editing `project.pbxproj` (permanently when `CURRENT_PROJECT_VERSION` is already defined in `project.pbxproj`, or registered for post-build restore otherwise; skipped in `--dry-run`). - `build`: Prepares macOS keychain (`KeychainManager`), compiles `.xcarchive` (passing `CURRENT_PROJECT_VERSION=`) and exports `.ipa` with `.appStore` export method and manual signing via `XcodeBuildTask`, restoring `project.pbxproj` and any temporary `Info.plist` edits immediately in `defer` (skipped in `--dry-run`). - `postbuild`: Verifies `.ipa` existence and non-zero file size (skipped in `--dry-run`). - `prerelease`: Generates plain-text release notes (max 4,000 chars) from commits since the latest `🍏_*` tag (excluding `*_adhoc` / `*_development`) via `GenerateReleaseNotesTask`. - `release`: Uploads `.ipa` via `UploadToAppStoreTask`, waits for App Store Connect build processing (unless `--no-wait-processing` is passed), and sets TestFlight "What to Test" notes via `setWhatsNew` when `changelog` is populated. - `postrelease`: Creates and pushes Git tag `🍏__` via `GitTagTask` and dispatches Slack/KokoNo notifications (skipped in `--dry-run`). ### 2. `IOSAdHocPreset` (`flow ios -d adhoc`) - **Required Configuration (`requirements`)**: - `MATCH_GIT_URL` - `MATCH_PASSWORD` - `FIREBASE_IOS_APP_ID` - `GOOGLE_KEY` - **Stage Execution**: - `setup`: Inspects iOS project, runs `MatchTask` with `type: .adhoc`, and queries Firebase App Distribution for the latest build number via `FirebasePresetHelpers.fetchLatestBuild` (an app with no releases yet resolves to build `0`; lookup failures stop the flow). - `prebuild`: Snapshots `project.pbxproj`, configures manual signing on Xcode targets, computes `max(firebase_build_number, project build number) + 1` in `context.buildNumber`, and normalizes literal `Info.plist` `CFBundleVersion` values to `$(CURRENT_PROJECT_VERSION)` via `XCodeTasks.updateBuildNumber` (kept permanently when `CURRENT_PROJECT_VERSION` exists in `project.pbxproj`, or registered for post-build restore otherwise; skipped in `--dry-run`). - `build`: Prepares keychain, builds `.xcarchive` (passing `CURRENT_PROJECT_VERSION=`) and exports `.ipa` with `.adHoc` export method, restoring `project.pbxproj` and temporary `Info.plist` edits immediately in `defer` (skipped in `--dry-run`). - `postbuild`: Verifies `.ipa` existence and non-zero file size (skipped in `--dry-run`). - `prerelease`: Generates plain-text release notes (max 4,000 chars) from commits since the latest `🍏_*` tag via `GenerateReleaseNotesTask`. - `release`: Uploads the `.ipa` with generated release notes via the shared `FirebasePresetHelpers.distribute`, which runs `UploadToFirebaseTask` with `ensureGroupsExist` so the `internal` tester group is created on Firebase (`createOrGetGroup`) before upload. - `postrelease`: Creates and pushes Git tag `🍏___adhoc` via `GitTagTask` and dispatches success notification to configured Slack and KokoNo webhooks (skipped in `--dry-run`). ### 2b. `IOSDevelopmentPreset` (`flow ios -d development`) Same stages and requirements as `IOSAdHocPreset`, with development signing: - `setup`: Runs `MatchTask` with `type: .development` (development certificates and profiles). - `prebuild`: Uses a development signing identity (`Apple Development` / `iPhone Developer`, falling back to `Apple Development`). - `build`: Exports the `.ipa` with the `.development` export method. - `release`: Uploads via `FirebasePresetHelpers.distribute`. Development-signed builds install only on devices included in the development provisioning profile. - `postrelease`: Tags `🍏___development`. ### 3. `AndroidInternalPreset` (`flow android -d appstore`) - **Required Configuration (`requirements`)**: - `GOOGLE_KEY` - **Stage Execution**: - `setup`: Extracts `packageName`, `applicationId`, `namespace`, `versionName`, `versionCode`, and flavors via regex (`AndroidTasks.getAndroidIdentifiers`) and Gradle evaluation (`evaluateAppInfoViaGradle`). When `--flavor` / `ANDROID_FLAVOR` is set, the selected flavor's effective `applicationId` (unless `--package-name` is given), `versionName`, and `versionCode` are used, and a warning is logged if the flavor is not found. If `MATCH_GIT_URL` and `MATCH_PASSWORD` are configured, resolves the release keystore via `AndroidPresetHelpers.resolveMatchKeystore` (the flow fails if the package name is unknown or the Match lookup fails, instead of building unsigned). Queries Google Play Console (`internal` track) for the latest `versionCode`. - `prebuild`: Sets `versionCode` to `max(googleplay_version_code, project versionCode) + 1` in `context.buildNumber`. - `build`: Executes Gradle `bundleRelease` (or `bundleRelease` with `--flavor`) producing an `.aab` with the resolved `versionCode` and `versionName` plus Match signing config if present. Both are passed as `-PversionCode`/`-PversionName`; the `versionCode` is also set on every application variant output through a temporary Gradle init script (`androidComponents.onVariants`), so it applies even when `build.gradle(.kts)` hardcodes it. The `versionName` stays as the project defines it unless `--app-version` is passed, which sets it the same way. `--build-number` replaces the automatic increment on both platforms; a value not above the store's latest becomes latest + 1. With `-d appstore`, setup stops the flow when the version was already released (App Store: approved version the same or higher; Google Play: production release with that `versionName`); `--no-version-check` skips this check. - `postbuild`: Verifies `.aab` existence and logs file size. - `prerelease`: Generates plain-text release notes (max 500 chars for Google Play) from commits since the latest `🤖_*` tag (excluding `*_adhoc` / `*_development`) via `GenerateReleaseNotesTask`. - `release`: Uploads `.aab` and generated release notes to Google Play Console `internal` track with `releaseStatus: .completed` via `UploadToGooglePlayConsoleTask`. - `postrelease`: Creates and pushes Git tag `🤖__` via `GitTagTask` and dispatches success notification to Slack and KokoNo webhooks (skipped in `--dry-run`). ### 4. `AndroidAdHocPreset` (`flow android -d adhoc`) - **Required Configuration (`requirements`)**: - `FIREBASE_ANDROID_APP_ID` - `GOOGLE_KEY` - **Stage Execution**: - `setup`: Inspects Android project, resolves the release keystore from Match when configured (failing the flow if the lookup fails), and retrieves the latest Firebase App Distribution build via `FirebasePresetHelpers.fetchLatestBuild` (an app with no releases yet resolves to build `0`; lookup failures stop the flow). - `prebuild`: Sets `versionCode` to `max(firebase_build_number, project versionCode) + 1`. - `build`: Runs Gradle `assembleRelease` (default `.apk`) or `bundleRelease` (if `--format aab` is specified); with `--flavor`, runs `assembleRelease` / `bundleRelease`. - `postbuild`: Verifies artifact file integrity and logs size. - `prerelease`: Generates plain-text release notes (max 4,000 chars) from commits since the latest `🤖_*` tag via `GenerateReleaseNotesTask`. - `release`: Uploads the `.apk`/`.aab` with generated release notes via the shared `FirebasePresetHelpers.distribute` (same as iOS Ad-Hoc), which runs `UploadToFirebaseTask` with `ensureGroupsExist` so the `internal` tester group is created before upload. - `postrelease`: Creates and pushes Git tag `🤖___adhoc` via `GitTagTask` and dispatches success notification to Slack and KokoNo webhooks (skipped in `--dry-run`). ### 5. `AndroidDevelopmentPreset` (`flow android -d development`) Same stages and requirements as `AndroidAdHocPreset`, with a debug build: - `setup`: Does not resolve a Match keystore; the project's Gradle debug signing config signs the build. - `build`: Runs Gradle `assembleDebug` (default `.apk`) or `bundleDebug` (with `--format aab`); with `--flavor`, runs `assembleDebug` / `bundleDebug`. Artifact name: `_[_]debug`. - `release`: Uploads via `FirebasePresetHelpers.distribute`. - `postrelease`: Tags `🤖___development`. --- ## Global Error Boundary & Cleanup `FlowRunner` wraps all stage execution inside a unified error boundary: - **Pre-flight Validation**: `preset.requirements(context:)` runs before any stage executes, throwing `FlowRequirementError` with the full list of missing configuration keys. - **Temporary File & Keystore Cleanup**: `TemporaryFileRestorer` (owned by `FlowContext.fileRestorer`) snapshots `project.pbxproj` before signing mutations and any temporary `Info.plist` edits made when `CURRENT_PROJECT_VERSION` is missing in `project.pbxproj`; iOS `build` restores them in `defer` and `FlowRunner`'s `defer` block (plus `SIGINT`/`SIGTERM` signal handlers) acts as an emergency fallback if a stage exits early. For Android, any temporary keystore decrypted by Match (`context.androidSigningTempUrl`) and empty `~/.appitool/android/keystores` directories are deleted automatically. - **Failure Handling**: If any stage throws: 1. Pipeline execution halts immediately. 2. `FlowRunner` prints a highlighted banner showing the failing stage (`context.currentStage`) and error reason. 3. `NotifyTask().notifyAllConfigured(status: .failure, ...)` dispatches failure alerts to Slack and KokoNo containing `Platform`, `Distribution`, `Failing Stage`, `Elapsed Time`, and `Bundle ID` / `Package Name` (skipped when `--dry-run` is active). - **Success Summary**: Upon completing all configured stages, `FlowRunner` prints total elapsed time and per-stage durations. --- # Code Signing & Match `appitool match` implements Git-backed encrypted storage for Apple signing assets and Android keystores, providing binary and encryption parity with **Fastlane Match**. ## How Match Works 1. **Clone Git Storage (`GitStorage`)**: Clones the target Git repository branch (shallow clone when in `readonly` / `sync` mode) into a temporary directory under `~/.appitool/match/` and cleans it up in `defer`. Authenticates HTTPS URLs via token injection and SSH URLs (`git@...` / `ssh://...`) via `GIT_SSH_COMMAND` using a temporary `0600` key file resolved from `MATCH_GIT_TOKEN` (file path, raw PEM, or Base64), cleaned up on exit. If the requested branch does not yet exist on the remote, `appitool` creates an isolated orphan branch (matching Fastlane Match behavior). 2. **Decrypt Assets (`MatchEncryption`)**: Decrypts certificates, provisioning profiles, and Android keystores in-place using `MATCH_PASSWORD`. 3. **Sync / Prune / Nuke / Add**: - **iOS**: Validates certificates and profiles against Apple Developer Portal (when App Store Connect API credentials are supplied), creates missing/expired assets when writable, imports `.p12` certificates into a dedicated macOS Keychain, and installs `.mobileprovision` / `.provisionprofile` files for Xcode. - **Android**: Resolves `.keystore` (or `.jks` / `.p12`) and `.json` credential metadata, or encrypts and pushes a keystore when adding (`match android sync -k`) or creating one (`match android create`, which generates a PKCS#12 keystore without `keytool` and never replaces an existing one). 4. **Re-encrypt & Push**: Encrypts modified assets using Match V2 (`AES-256-GCM`), commits with `-c commit.gpgsign=false` so global signing configs never prompt interactively, and pushes changes back to the remote Git repository. --- ## Encryption Compatibility (V1 & V2) `MatchEncryption` supports both Fastlane Match encryption formats: | Format | Header Prefix | Algorithm | Key Derivation | Behavior | |:---|:---|:---|:---|:---| | **V2 (Default for writes)** | `match_encrypted_v2__` | `AES-256-GCM` (Base64-encoded, 64-char lines) | PBKDF2-HMAC-SHA256 (10,000 iterations, 8-byte random salt, 24-byte AAD) | Used for all newly encrypted files | | **V1 (Legacy read support)** | `Salted__` | `AES-256-CBC` (Base64-encoded) | OpenSSL `EVP_BytesToKey` (MD5, SHA-256) or PBKDF2-HMAC-SHA256 fallback | Supported seamlessly during decryption | --- ## Git Repository Structure ```text / ├── certs/ │ ├── development/ │ │ ├── .cer │ │ └── .p12 │ ├── distribution/ # Used by both 'appstore' and 'adhoc' │ │ ├── .cer │ │ └── .p12 │ ├── enterprise/ │ └── developer_id/ ├── profiles/ │ ├── development/ │ │ └── Development_[_tvos|_catalyst].mobileprovision │ ├── adhoc/ │ │ └── AdHoc_[_tvos|_catalyst].mobileprovision │ ├── appstore/ │ │ └── AppStore_[_tvos|_catalyst].mobileprovision │ ├── enterprise/ │ │ └── InHouse_.mobileprovision │ └── developer_id/ │ └── DeveloperID_.provisionprofile └── android/ ├── release/ │ ├── .keystore │ └── .json └── debug/ ├── .keystore └── .json ``` ### Wildcard Profile Matching (iOS) When searching for a profile matching ``, `MatchRunner` looks for: 1. Exact match (`_.`) 2. Partial wildcard matches (`com.example.*`, selecting the longest/most specific prefix) 3. Global wildcard match (`*`) --- ## macOS Keychain & Xcode Installation - **Keychain Isolation (`KeychainManager`)**: - Defaults to `appitool` (`~/Library/Keychains/appitool.keychain-db`) with password `appipass`, customizable via `MATCH_KEYCHAIN_NAME` and `MATCH_KEYCHAIN_PASSWORD` (or `--keychain-name` / `--keychain-password`). - Automatically creates the keychain if missing, unlocks it, clears auto-lock timeouts (`set-keychain-settings`), and adds it to the user's keychain search list. - **Provisioning Profile Path (`ProfileInstaller`)**: - Installs profiles into `~/Library/Developer/Xcode/UserData/Provisioning Profiles/.mobileprovision` (or `.provisionprofile` for macOS/Catalyst). - **Fastlane-Compatible Metadata**: - Generates `MatchResult.envVariables` entries (`sigh__`, `_uuid`, `_profile-path`, `_profile-name`, `_team-id`). --- ## Read-Only Mode Semantics Notice the difference between standalone `appitool match ios sync` and `appitool flow`: - **`appitool match ios sync`**: `--readonly` defaults to `false` (can create certificates/profiles on Apple Developer Portal if credentials are provided). Pass `--readonly` for CI read-only sync. - **`appitool flow ios`**: `MatchOptions` defaults `readonly` to `true` unless `MATCH_READONLY=false` is explicitly set in the environment (and `--dry-run` always forces `readonly: true`). --- # Command Overview `appitool` is built with Swift ArgumentParser. Run `appitool --help` (or `-h`) or `appitool --help` at any level to inspect live options, or `appitool --version` to print the installed version. ## Command Structure Store commands follow `appitool `: a plural resource noun, then a single verb, e.g. `appitool apple users list`, `appitool google invitations cancel`, `appitool firebase apps create`. Common verbs are `list`, `create`, `update`, and `delete`; some resources add their own (`prune`, `disable`, `invite`, `cancel`, `grant`, `revoke`, `sync`, `export`). Run `appitool --help` to see a resource's actions. ## Complete Command Tree | Command | Subcommands / resources | Description | |:---|:---|:---| | [`flow`](https://appitool.appibara.com/commands/flow) | `ios`, `android` | Runs the automated 7-stage release orchestration pipeline. | | [`build`](https://appitool.appibara.com/commands/build) | `ios`, `android` | Compiles and packages iOS (`.xcarchive`/`.ipa`) and Android (`.aab`/`.apk`) artifacts directly. | | [`check`](https://appitool.appibara.com/commands/check) | `ios`, `android` | Queries remote store/distribution metadata and latest build numbers. | | [`match`](https://appitool.appibara.com/commands/match) | `ios`, `android` | Syncs, prunes, nukes, or adds Git-encrypted certificates, profiles, and keystores, and creates new Android keystores. | | [`apple`](https://appitool.appibara.com/commands/apple) | `apps`, `versions`, `identifiers`, `capabilities`, `profiles`, `certificates`, `devices`, `users`, `invitations`, `assets`, `metadata`, `categories` | Manages App Store Connect & Developer Portal apps and versions, identifiers, capabilities, profiles, certificates, devices, team users, invitations, store assets (screenshots, product page header, search results), and listing metadata, and lists App Store category IDs. | | [`google`](https://appitool.appibara.com/commands/google) | `apps`, `signing-certs`, `users`, `invitations`, `assets`, `metadata` | Lists accessible apps and signing certificate fingerprints, and manages Google Play Console store visuals and screenshots (`list`, `upload`, `download`, `delete`, `types`, `specs`), store listing text (`list`, `download`, `upload`), and Play Console users, invitations, and per-app access. | | [`firebase`](https://appitool.appibara.com/commands/firebase) | `apps`, `fingerprints`, `releases`, `groups`, `users`, `firestore` | Manages Firebase apps, App Distribution releases/groups, Firebase Auth users, and Cloud Firestore collections/documents. | | [`inspect`](https://appitool.appibara.com/commands/inspect) | — | Inspects local iOS and Android identifiers, versions, build numbers, and flavors (supports `--json`). | | [`clean`](https://appitool.appibara.com/commands/clean) | — | Cleans cached build outputs, Xcode DerivedData, and (with `--assets`) downloaded store assets under `~/.appitool`. | | [`notes`](https://appitool.appibara.com/commands/notes) | — | Generates categorized Markdown release notes from Git conventional commits. | | [`kokono`](https://appitool.appibara.com/commands/kokono) | — | Sends push notifications to KokoNo webhooks (plain or E2E encrypted). | | [`slack`](https://appitool.appibara.com/commands/slack) | — | Sends Slack messages via an incoming webhook or a bot token (`chat.postMessage`: any channel, thread replies). | | [`self-update`](https://appitool.appibara.com/commands/self-update) | — | Checks GitHub Releases and updates the `appitool` binary with SHA256 and build provenance verification (sigstore-swift, cross-checked with `gh` when installed). | | [`attestation`](https://appitool.appibara.com/commands/attestation) | `verify`, `keys create` | `verify` checks any file's GitHub artifact attestation with sigstore-swift (`--repo` / `--signer-workflow` / `--predicate-type` default to appitool's release attestations, `--build-type` / `-b` / `--package-name` / `-d` check what the SLSA provenance says was built, and `--key` verifies key-signed attestations). `keys create` makes an ECDSA P-256 key pair for `flow --attest --attest-key` (private key) and `attestation verify --key` (public key), without OpenSSL. | | [`skills`](https://appitool.appibara.com/commands/skills) | `install` | Installs the appitool agent skill into `.agents/skills/` (Codex, Cursor, ...) and links it into `.claude/skills/` (Claude Code). | --- ## Distribution Modes (`BuildCommand.Distribution`) Commands that accept `-d, --distribution` (`flow`, `build`, `check`) accept the following distribution values (case-insensitive): | Value | Accepted Aliases | Typical Target | |:---|:---|:---| | `appstore` | `appstore`, `app-store` | Apple App Store / TestFlight or Google Play Console | | `adhoc` | `adhoc`, `ad-hoc` | Firebase App Distribution (Ad-Hoc IPA / APK) | | `development` | `development`, `dev` | Local development builds | --- ## Shared Option Groups Several commands reuse standardized `OptionGroup` structs defined in `CredentialsOptions.swift`. Every option falls back to `.env` / environment variables when omitted. ### `AppleCredentialsOptions` Used by `flow ios`, `build ios`, `check ios`, `match ios`, and all `apple` commands. | Flag | `.env` Fallback | Description | |:---|:---|:---| | `--apple-key-id ` | `APPLE_KEY_ID` | App Store Connect API Key ID | | `--apple-issuer-id ` | `APPLE_ISSUER_ID` | App Store Connect API Issuer ID | | `--apple-key ` | `APPLE_KEY` | `.p8` file path, raw PEM content, or Base64 string | ### `GoogleCredentialsOptions` Used by `flow ios`, `flow android`, `check ios`, `check android`, `GooglePlayAppOptions`, and `FirebaseProjectOptions`. | Flag | `.env` Fallback | Description | |:---|:---|:---| | `-g, --google-key ` | `GOOGLE_KEY` | Service Account JSON path, raw JSON string, or Base64 string | ### `GooglePlayAppOptions` Includes `GoogleCredentialsOptions` and resolves the Android application package name. Used by `google assets `. | Flag | `.env` Fallback | Description | |:---|:---|:---| | `-g, --google-key ` | `GOOGLE_KEY` | Inherited from `GoogleCredentialsOptions` | | `--package-name ` | `GOOGLE_PACKAGE_NAME` or local Android project | Target Android application package name | ### `FirebaseProjectOptions` Used by `firebase apps `, `fingerprints sync`, `groups `, `users `, and `firestore ` (note: `firestore` falls back to the `project_id` in `GOOGLE_KEY` rather than parsing `FIREBASE_*_APP_ID`). | Flag | `.env` Fallback | Description | |:---|:---|:---| | `-g, --google-key ` | `GOOGLE_KEY` | Inherited from `GoogleCredentialsOptions` | | `--project ` | `FIREBASE_PROJECT_ID`, `GOOGLE_PROJECT_ID`, or parsed from `FIREBASE_*_APP_ID` | Firebase / Google Cloud project ID or project number | ### `FirebaseCredentialsOptions` Includes `FirebaseProjectOptions` and adds app-level flags. Used by `firebase releases `. | Flag | `.env` Fallback | Description | |:---|:---|:---| | `--firebase-app-id ` | `FIREBASE_IOS_APP_ID` / `FIREBASE_ANDROID_APP_ID` | Target Firebase App ID | | `-p, --platform ` | — | Target platform for App ID resolution (`ios` or `android`) | | `-g, --google-key ` | `GOOGLE_KEY` | Inherited from `FirebaseProjectOptions` | | `--project ` | `FIREBASE_PROJECT_ID` | Inherited from `FirebaseProjectOptions` | ### `MatchStorageOptions` Used by `match android`, `flow android`, and `build android` (and embedded in `MatchOptions`). | Flag | `.env` Fallback / Default | Description | |:---|:---|:---| | `--match-git-url ` | `MATCH_GIT_URL` | Match Git repository URL | | `--match-git-branch ` | `MATCH_GIT_BRANCH` (default: `master`) | Git branch name | | `--match-git-token ` | `MATCH_GIT_TOKEN`, `GITHUB_TOKEN`, `GH_TOKEN` | Git HTTPS PAT or SSH private/deploy key (file path, PEM, or Base64) | | `--match-password ` | `MATCH_PASSWORD` | AES decryption/encryption passphrase | ### `MatchOptions` Includes `MatchStorageOptions` and adds Apple/iOS signing options. Used by `match ios sync` and `flow ios` (`match ios nuke` and `match ios prune` use only `MatchStorageOptions`). | Flag | `.env` Fallback / Default | Description | |:---|:---|:---| | `--match-git-url ` | `MATCH_GIT_URL` | Inherited from `MatchStorageOptions` | | `--match-git-branch ` | `MATCH_GIT_BRANCH` (default: `master`) | Inherited from `MatchStorageOptions` | | `--match-git-token ` | `MATCH_GIT_TOKEN`, `GITHUB_TOKEN`, `GH_TOKEN` | Inherited from `MatchStorageOptions` | | `--match-password ` | `MATCH_PASSWORD` | Inherited from `MatchStorageOptions` | | `--keychain-name ` | `MATCH_KEYCHAIN_NAME` (default: `appitool`) | Custom macOS keychain name or path | | `--keychain-password ` | `MATCH_KEYCHAIN_PASSWORD` (default: `appipass`) | Keychain unlock password | | `--team-id ` | `APPLE_TEAM_ID` | Apple Developer Team ID | | `--readonly` | `MATCH_READONLY != "false"` in `flow ios` (defaults to `true`); `false` in `match ios sync` | Read-only mode (do not create new certs/profiles) | ### `NotificationOptions` Used by `flow ios` and `flow android`. | Flag | `.env` Fallback | Description | |:---|:---|:---| | `--slack-url ` | `SLACK_URL` | Slack incoming webhook URL | | `--kokono-url ` | `KOKONO_URL` | KokoNo notification webhook URL | | `--kokono-public-key ` | `KOKONO_E2E_PUBLIC_KEY` (ignored if `--kokono-url` flag is explicitly passed) | KokoNo E2E encryption public key | ### `GlobalCIOptions` Available globally on `appitool` (can be placed before or after subcommands, as well as directly on guarded destructive subcommands and `match ios sync`). Auto-detects CI environment variables (`CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BITRISE_IO`, `CIRCLECI`, `BUILDKITE`, `JENKINS_URL`, `TF_BUILD`, `TEAMCITY_VERSION`, `TRAVIS`, `CODEMAGIC_BUILD_ID`, `CI_XCODE_CLOUD`) when omitted. In CI mode, destructive commands (`apple identifiers delete`, `apple profiles delete`, `apple profiles prune`, `apple certificates delete`, `apple certificates prune`, `apple devices disable`, `apple users delete`, `apple invitations cancel`, `apple versions delete`, `apple assets delete`, `google assets delete`, `google users delete`, `google invitations cancel`, `google users revoke`, `firebase apps delete`, `firebase users delete`, `firebase firestore delete`, `match ios nuke`, and `match ios prune`) are skipped as a no-op with a warning (exit code `0`). | Flag | Default / Env Fallback | Description | |:---|:---|:---| | `--ci` / `--no-ci` | `CI` and provider env vars (`false` if unset) | Explicitly enable or disable CI mode, overriding environment detection | ### `ReleaseNotesOptions` Used by `flow ios` and `flow android`. | Flag | Default | Description | |:---|:---|:---| | `--release-notes ` | — | Custom release notes text (bypasses Git commit generation) | | `--notes-from ` | — | Starting Git tag or commit reference for release notes generation (overrides auto-tag detection) | | `--notes-locale ` | `en-US` | Locale/language code for store release notes (e.g. `en-US`, `tr-TR`) | --- # `appitool flow` Executes the automated 7-stage release orchestration pipeline (`setup` → `prebuild` → `build` → `postbuild` → `prerelease` → `release` → `postrelease`) with centralized error handling and webhook alerts. ## Synopsis ```bash appitool flow ios [options] appitool flow android [options] ``` See [Flow Architecture](https://appitool.appibara.com/guide/flow-architecture) for full stage-by-stage details and preset behaviors. --- ## `appitool flow ios` Executes the automated release flow for iOS. - When `-d appstore` (default) is used, runs **`IOSInternalPreset`** (App Store Connect / TestFlight upload). - When `-d adhoc` is used, runs **`IOSAdHocPreset`** (ad-hoc signed IPA, Firebase App Distribution upload to `internal` tester group). - When `-d development` is used, runs **`IOSDevelopmentPreset`** (development-signed IPA via Match `development` profiles and the `development` export method, Firebase App Distribution upload to `internal` tester group). Installs only on devices included in the development provisioning profile. ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `appstore` | Distribution method: `adhoc`, `development`, or `appstore`. | | `--dry-run` | `false` | Simulate pipeline execution without modifying Xcode projects, running builds, or uploading binaries. Forces Match `readonly` and skips notifications. | | `-b, --bundle-id ` | `APPLE_BUNDLE_ID` | Target iOS bundle identifier. Auto-detected from Xcode project if omitted. | | `-s, --scheme ` | `XCODE_SCHEME` | Xcode scheme to build. Auto-inferred if omitted. | | `-c, --configuration ` | `XCODE_CONFIGURATION` | Build configuration (`Debug`, `Release`). | | `--firebase-app-id ` | `FIREBASE_IOS_APP_ID` | Firebase App ID for iOS (used for Ad-Hoc / Firebase distribution). | | `--app-version ` | project `MARKETING_VERSION` | Marketing version (`CFBundleShortVersionString`) to build, e.g. `1.2.0`: one to three period-separated integers. Passed to `xcodebuild archive` as `MARKETING_VERSION=`, so `Info.plist` must use `$(MARKETING_VERSION)` (the Xcode default). The project file is not changed. | | `--build-number ` | `max(project, store) + 1` | Build number (`CFBundleVersion`) to build, e.g. `42` or `1.0.42`. Skips the automatic increment. When it is not above the latest store build number, the flow logs it and uses latest + 1 instead (integer build numbers only). | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or stream (`--no-silent`) `xcodebuild` and Match stdout logs. | | `--wait-processing` / `--no-wait-processing` | `true` (`--wait-processing`) | Wait for App Store Connect build processing to apply TestFlight release notes (use `--no-wait-processing` to return immediately after upload even when release notes were generated). | | `--version-check` / `--no-version-check` | `true` (`--version-check`) | With `-d appstore`, stop before building when the version was already released (see [Released version check](#released-version-check-d-appstore)). `--no-version-check` skips it. | | `--attest` | `false` | Sign SLSA build provenance for the `.ipa` with Sigstore and write `.sigstore.json` (see [Build provenance](#build-provenance-attest)). GitHub Actions only. | | `--attest-key ` | `APPITOOL_ATTEST_KEY` | With `--attest`, sign with this ECDSA P-256 private key (file path, Base64, or inline PEM as `--attest-key=`) instead of the GitHub Actions identity; nothing is logged publicly. | Plus shared option groups: - [`AppleCredentialsOptions`](https://appitool.appibara.com/commands/overview#applecredentialsoptions) (`--apple-key-id`, `--apple-issuer-id`, `--apple-key`) - [`GoogleCredentialsOptions`](https://appitool.appibara.com/commands/overview#googlecredentialsoptions) (`-g, --google-key`) - [`MatchOptions`](https://appitool.appibara.com/commands/overview#matchoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`, `--keychain-name`, `--keychain-password`, `--team-id`, `--readonly`) - [`NotificationOptions`](https://appitool.appibara.com/commands/overview#notificationoptions) (`--slack-url`, `--kokono-url`, `--kokono-public-key`) - [`ReleaseNotesOptions`](https://appitool.appibara.com/commands/overview#releasenotesoptions) (`--release-notes`, `--notes-from`, `--notes-locale`) ### Released version check (`-d appstore`) Before building, the App Store flow reads the app's App Store versions. If the marketing version (the project's, or `--app-version`) was already approved — `ACCEPTED`, `PENDING_DEVELOPER_RELEASE`, `PENDING_APPLE_RELEASE`, `PROCESSING_FOR_DISTRIBUTION`, `READY_FOR_DISTRIBUTION`, `REPLACED_WITH_NEW_VERSION` (or the older `READY_FOR_SALE`-style states) — or is lower than an approved version, the flow stops with an error: App Store Connect accepts no new builds for that version. `-d adhoc` and `-d development` are not checked, and `--no-version-check` skips the check. ### Examples ```bash # Release to TestFlight / App Store Connect appitool flow ios -d appstore -b com.example.app # Distribute Ad-Hoc IPA via Firebase App Distribution with live build logs appitool flow ios -d adhoc --no-silent # Validate configuration and dry-run build increment appitool flow ios -d appstore --dry-run # Build an explicit version and build number appitool flow ios -d appstore --app-version 1.2.0 --build-number 42 ``` --- ## `appitool flow android` Executes the automated release flow for Android. - When `-d appstore` (default) is used, runs **`AndroidInternalPreset`** (Google Play Console `internal` track). - When `-d adhoc` is used, runs **`AndroidAdHocPreset`** (`release` build signed with the Match/release keystore, Firebase App Distribution upload to `internal` tester group). - When `-d development` is used, runs **`AndroidDevelopmentPreset`** (`debug` build signed by the project's Gradle debug signing config — no Match keystore — Firebase App Distribution upload to `internal` tester group). ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `appstore` | Distribution method: `adhoc`, `development`, or `appstore`. | | `--dry-run` | `false` | Validate configuration, resolve Match keystore, inspect remote `versionCode`, and simulate upload without building or mutating state. | | `--package-name ` | `GOOGLE_PACKAGE_NAME` | Target Android package name. Auto-detected from Gradle if omitted. | | `--format ` | `aab` for `appstore`; `apk` for `adhoc`/`development` | Packaging format (`aab` or `apk`). `-d appstore` requires `aab` (Google Play rejects APKs); `--format apk` with `appstore` fails validation. | | `--flavor ` | `ANDROID_FLAVOR` | Gradle product flavor (e.g., `production`, `staging`). Builds `bundleRelease` / `assembleRelease`, resolves flavor-specific `applicationId` (when `--package-name` is omitted), `versionName`, and `versionCode`, and names the artifact `__release`. | | `--firebase-app-id ` | `FIREBASE_ANDROID_APP_ID` | Firebase App ID for Android (used for Ad-Hoc / Firebase distribution). | | `--app-version ` | project `versionName` | `versionName` to build, e.g. `1.2.0`. Set on every variant output, replacing flavor or build type `versionNameSuffix`. Without it the project's `versionName` is kept as is. | | `--build-number ` | `max(project, store) + 1` | `versionCode` to build: an integer from `1` to `2100000000`. Skips the automatic increment. When it is not above the latest store `versionCode`, the flow logs it and uses latest + 1 instead. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or show (`--no-silent`) Gradle and Match output. | | `--version-check` / `--no-version-check` | `true` (`--version-check`) | With `-d appstore`, stop before building when the `versionName` was already released on production (see [Released versionName check](#released-versionname-check-d-appstore)). `--no-version-check` skips it. | | `--attest` | `false` | Sign SLSA build provenance for the `.aab`/`.apk` with Sigstore and write `.sigstore.json` (see [Build provenance](#build-provenance-attest)). GitHub Actions only. | | `--attest-key ` | `APPITOOL_ATTEST_KEY` | With `--attest`, sign with this ECDSA P-256 private key (file path, Base64, or inline PEM as `--attest-key=`) instead of the GitHub Actions identity; nothing is logged publicly. | Plus shared option groups: - [`GoogleCredentialsOptions`](https://appitool.appibara.com/commands/overview#googlecredentialsoptions) (`-g, --google-key`) - [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`) - [`NotificationOptions`](https://appitool.appibara.com/commands/overview#notificationoptions) (`--slack-url`, `--kokono-url`, `--kokono-public-key`) - [`ReleaseNotesOptions`](https://appitool.appibara.com/commands/overview#releasenotesoptions) (`--release-notes`, `--notes-from`, `--notes-locale`) ### Released versionName check (`-d appstore`) Before building, the Google Play flow reads the app's tracks. If a **production** release with status `completed`, `inProgress`, or `halted` is named after the `versionName` (the project's, or `--app-version`) — as `1.2.0`, or Play Console's default `60 (1.2.0)` — the flow stops with an error. Play itself accepts a reused `versionName`; this check prevents shipping a new build under one already live. Internal and other testing tracks are not checked, and when the tracks cannot be read the flow logs a warning and continues. `-d adhoc` and `-d development` are not checked, and `--no-version-check` skips the check. ### Examples ```bash # Build AAB and upload to Google Play Console internal track appitool flow android -d appstore --package-name com.example.app # Build APK and distribute to Firebase App Distribution appitool flow android -d adhoc --no-silent # Build the production flavor AAB and upload to Google Play Console internal track appitool flow android -d appstore --flavor production # Dry-run Android Ad-Hoc flow appitool flow android -d adhoc --dry-run # Build an explicit versionName and versionCode appitool flow android -d appstore --app-version 1.2.0 --build-number 60 ``` --- ## Build provenance (`--attest`) With `--attest`, the `postbuild` stage signs an [SLSA provenance](https://slsa.dev/spec/v1.0/provenance) statement for the verified artifact with [Sigstore](https://www.sigstore.dev) (via [sigstore-swift](https://github.com/appibara-ltd/sigstore-swift)) and writes the bundle next to it as `.sigstore.json`. The statement follows the [appitool iOS build type](https://appitool.appibara.com/buildtypes/ios/v1) or [Android build type](https://appitool.appibara.com/buildtypes/android/v1): the artifact's sha256 (plus the `.dSYM.zip` on iOS), the flow's parameters, the source repository and commit, the appitool version, and the workflow run. - **Where it runs:** GitHub Actions only; the statement records the workflow run. Keyless signing needs `permissions: id-token: write`: appitool requests the job's OIDC token (audience `sigstore`) and fails before the flow starts if it cannot. - **How it signs (keyless, the default):** an ephemeral key, a short-lived certificate from public-good Fulcio for the workflow's identity, an entry in public-good Rekor, and an RFC 3161 timestamp, using the services in Sigstore's public signing config. The bundle is verified against Sigstore's trusted root before it is written. - **Privacy:** the Rekor log is public and permanent. It records the certificate, which names the repository, workflow, ref and commit, and the artifact digests. This happens for private repositories too: for those, sign with a private key instead. - **Dry run:** `--dry-run` only logs what would be signed. ### Signing with a private key (`--attest-key`) With `--attest-key` (or `APPITOOL_ATTEST_KEY`), `--attest` signs with your ECDSA P-256 private key instead: no Fulcio certificate and no Rekor entry, so nothing about the build is published. The signature gets an RFC 3161 timestamp from Sigstore's public timestamp authority, which only sees a hash of the signature, so verifiers can tell when it was signed. The OIDC token (`id-token: write`) is not needed. The trade-off: the attestation proves that the holder of the key signed it, not that a particular repository's workflow did, and anyone who can read the key or change the workflow can sign. Keep the key in a GitHub Actions secret and share only the public key with verifiers. ```bash # Create attest-key.pem (private; keep it secret) and attest-key.pub.pem appitool attestation keys create ``` See [`attestation keys create`](https://appitool.appibara.com/commands/attestation). Keys made with OpenSSL work too (`openssl ecparam -name prime256v1 -genkey -noout | openssl pkcs8 -topk8 -nocrypt -out attest-key.pem`). ```yaml steps: - run: appitool flow ios -d adhoc --attest env: APPITOOL_ATTEST_KEY: ${{ secrets.APPITOOL_ATTEST_KEY }} ``` Verify with the public key: ```bash appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --key attest-key.pub.pem -b com.acme.myapp -d adhoc ``` ```yaml permissions: contents: write # appitool pushes the release tag id-token: write # --attest: OIDC token for Sigstore steps: - run: appitool flow ios -d adhoc --attest ``` Check the result with [`appitool attestation verify`](https://appitool.appibara.com/commands/attestation#appitool-attestation-verify): ```bash appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --repo acme/myapp \ --signer-workflow acme/myapp/.github/workflows/release.yml -b com.acme.myapp -d adhoc ``` --- # `appitool build` Compiles and packages platform binaries directly without running the full 7-stage `flow` pipeline. ## Synopsis ```bash appitool build ios [options] appitool build android [options] ``` --- ## `appitool build ios` Builds and packages an iOS application using `xcodebuild` (comparable to Fastlane `build_app` / `gym`). Artifacts are written under `~/.appitool/ios//build/_[_adhoc|_development]/` (falling back to `` when version or build number cannot be resolved) with DerivedData isolated in `~/.appitool/ios//derivedData/`. ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `appstore` | Distribution method: `adhoc`, `development`, or `appstore`. Mapped to `app-store-connect`, `release-testing`, or `debugging` export methods. | | `--workspace-path ` | `XCODE_WORKSPACE` or auto-detected | Path to `.xcworkspace`. | | `--project ` | `XCODE_PROJECT` or auto-detected | Path to `.xcodeproj`. | | `-s, --scheme ` | `XCODE_SCHEME` or inferred | Xcode scheme to build (inferred via `xcodebuild -list -json`). | | `-c, --configuration ` | `XCODE_CONFIGURATION` or `Release` | Build configuration (`Debug`, `Release`). | | `--team-id ` | `APPLE_TEAM_ID` | Apple Developer Team ID. | | `--codesigning-identity ` | — | Code signing identity override (e.g., `"Apple Distribution"`, `"Apple Development"`). | | `--clean` | `false` | Clean build folder before building. | | `--skip-build-archive` | `false` | Skip compiling `.xcarchive` and export an IPA from the latest `.xcarchive` found under `~/.appitool/ios//build/`. | | `--skip-package-ipa` | `false` | Only compile `.xcarchive` and skip IPA packaging. | | `--allow-provisioning-updates` | `false` | Allow `xcodebuild` to communicate with Apple Developer Portal for provisioning updates (passes `-authenticationKeyPath`, `-authenticationKeyID`, `-authenticationKeyIssuerID` automatically if `APPLE_KEY` is a file path). | | `--manage-build-number` | `false` | Allow App Store Connect to automatically manage/increment version and build numbers during export. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or stream (`--no-silent`) `xcodebuild` stdout logs. | | `--xcodebuild-formatter ` | `XCODEBUILD_FORMATTER` or `xcbeautify --renderer github-actions` | Formatter command piped from `xcodebuild` output. | Plus [`AppleCredentialsOptions`](https://appitool.appibara.com/commands/overview#applecredentialsoptions) (`--apple-key-id`, `--apple-issuer-id`, `--apple-key`). ### Examples ```bash # Build App Store IPA (auto-discover workspace & scheme) appitool build ios -d appstore # Build Ad-Hoc IPA with automatic provisioning updates and clean build appitool build ios -d adhoc --clean --allow-provisioning-updates # Re-export IPA from the most recent existing .xcarchive appitool build ios -d adhoc --skip-build-archive ``` --- ## `appitool build android` Builds an Android App Bundle (`.aab`) or APK (`.apk`) using Gradle (`./gradlew`). Artifacts are written under `~/.appitool/android//build/_[_adhoc|_development]/` (falling back to `` when version or build number cannot be resolved) named `_.`. ### Signing Resolution Order `build android` resolves signing credentials in the following order: 1. Base64 keystore via `--keystore-base64` / `ANDROID_KEYSTORE` (decoded temporarily into `~/.appitool/android/keystores/.keystore` and removed automatically after build). 2. Local keystore file via `--keystore-path` / `ANDROID_KEYSTORE_PATH`. 3. Match Git repository if `--match` is passed (or if `MATCH_GIT_URL` and `MATCH_PASSWORD` are set when no local keystore path was provided). If the Match lookup is attempted and fails — or `--match` is passed without Match storage configured — the build stops with an error instead of producing an unsigned artifact. ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `appstore` | Distribution method: `adhoc`, `development`, or `appstore`. | | `--package-name ` | `GOOGLE_PACKAGE_NAME` or Gradle-resolved | Target Android package name. | | `--flavor ` | `ANDROID_FLAVOR` | Gradle product flavor (e.g., `production`, `staging`). | | `-c, --configuration ` | `ANDROID_CONFIGURATION` or `Release` | Build configuration/type (`Release`, `Debug`). | | `--format ` | `aab` for `appstore`; `apk` for `adhoc`/`development` | Packaging format (`aab` or `apk`). | | `--clean` | `false` | Run Gradle `clean` before building. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or stream (`--no-silent`) Gradle stdout logs. | | `--project-dir ` | `ANDROID_PROJECT_DIR`, `./android`, or `.` | Android root directory containing `gradlew`. | | `--keystore-path ` | `ANDROID_KEYSTORE_PATH` | Path to local keystore file. | | `--keystore-base64 ` | `ANDROID_KEYSTORE` | Base64-encoded keystore content. | | `--keystore-password ` | `ANDROID_KEYSTORE_PASSWORD` | Keystore store password. | | `--key-alias ` | `ANDROID_KEY_ALIAS` | Key alias inside keystore. | | `--key-password ` | `ANDROID_KEY_PASSWORD` | Key password. | | `--gradle-opts ` | — | Custom JVM options passed via `GRADLE_OPTS` (automatically appends `-Dorg.gradle.daemon=false` if omitted). | | `--match` | `false` | Fetch signing keystore from Match Git repository. | Plus [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions). ### Examples ```bash # Build signed release AAB for Google Play using Match keystore appitool build android -d appstore --match # Build staging flavor APK cleanly with custom JVM heap appitool build android -d adhoc --flavor staging --format apk --clean --gradle-opts "-Xmx4g" ``` --- # `appitool check` Verifies store credentials, API connectivity, application registration, and retrieves the latest remote build version and build number. ## Synopsis ```bash appitool check ios [options] appitool check android [options] ``` --- ## `appitool check ios` Checks iOS application metadata and latest build information from Firebase App Distribution (`adhoc`, default) or App Store Connect (`appstore`). ### Behavior by Distribution - **`adhoc` (default)**: Requires `FIREBASE_IOS_APP_ID` (or `--firebase-app-id`) and `GOOGLE_KEY` (or `-g, --google-key`). Fetches Firebase iOS App info (`appId`, `bundleId`, `displayName`, `projectId`, `appStoreId`, `teamId`, `state`) and the latest Firebase release version/build number. - **`appstore`**: Requires App Store Connect credentials (`APPLE_KEY`, `APPLE_KEY_ID`, `APPLE_ISSUER_ID`) and a bundle identifier (flag or auto-detected from Xcode project). Retrieves the latest TestFlight/App Store build version and build number. - **`development`**: Prints a notice that development distribution has no remote store information. ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `adhoc` | Distribution method: `adhoc`, `development`, or `appstore`. | | `-b, --bundle-id ` | `APPLE_BUNDLE_ID` or auto-detected from Xcode project | Target iOS bundle identifier. | | `--firebase-app-id ` | `FIREBASE_IOS_APP_ID` | Firebase App ID for iOS (used when `-d adhoc`). | Plus [`AppleCredentialsOptions`](https://appitool.appibara.com/commands/overview#applecredentialsoptions) (`--apple-key-id`, `--apple-issuer-id`, `--apple-key`) and [`GoogleCredentialsOptions`](https://appitool.appibara.com/commands/overview#googlecredentialsoptions) (`-g, --google-key`). ### Examples ```bash # Check latest Firebase App Distribution iOS app info & build appitool check ios -d adhoc # Check latest App Store Connect / TestFlight build for bundle ID appitool check ios -d appstore -b com.example.app ``` --- ## `appitool check android` Checks Android application metadata and latest build information from Firebase App Distribution (`adhoc`, default) or Google Play Console (`appstore`). ### Behavior by Distribution - **`adhoc` (default)**: Requires `FIREBASE_ANDROID_APP_ID` (or `--firebase-app-id`) and `GOOGLE_KEY` (or `-g, --google-key`). Displays Firebase Android App info (`appId`, `packageName`, `displayName`, `projectId`, `state`) and latest build info. - **`appstore`**: Requires `GOOGLE_KEY` (or `-g, --google-key`) and a package name (flag or auto-detected from Android project). Queries Google Play Console for the latest version and build number (`versionCode`). - **`development`**: Prints a notice that development distribution has no remote store information. ### Options | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-d, --distribution ` | `adhoc` | Distribution method: `adhoc`, `development`, or `appstore`. | | `--package-name ` | `GOOGLE_PACKAGE_NAME` or auto-detected from Android project | Target Android package name. | | `--firebase-app-id ` | `FIREBASE_ANDROID_APP_ID` | Firebase App ID for Android (used when `-d adhoc`). | Plus [`GoogleCredentialsOptions`](https://appitool.appibara.com/commands/overview#googlecredentialsoptions) (`-g, --google-key`). ### Examples ```bash # Check Firebase App Distribution Android app info & latest release appitool check android -d adhoc # Check latest build versionCode on Google Play Console appitool check android -d appstore --package-name com.example.app ``` --- # `appitool match` Synchronizes, prunes, nukes, or adds encrypted code signing certificates, provisioning profiles, and Android keystores stored in a Git repository, and creates new Android keystores. Fully compatible with Fastlane Match V1 (`AES-256-CBC`) and V2 (`AES-256-GCM`) encryption. ## Synopsis ```bash appitool match ios [sync] [options] appitool match ios nuke [options] appitool match ios prune [options] appitool match android [sync] [options] appitool match android create [options] ``` > `match` has no default platform: always pass `ios` or `android`. `sync` is the `defaultSubcommand` of `match ios` and `match android`, so `appitool match ios -t adhoc` runs `appitool match ios sync -t adhoc` and `appitool match android -k release.keystore` runs `appitool match android sync -k release.keystore`. Actions (`sync`, `nuke`, `prune`, `create`) are subcommands; distribution types are always passed with `-t, --type`. --- ## `appitool match ios` Groups the Apple code signing actions. Each action is its own subcommand with its own options. | Subcommand | Destructive | Description | |:---|:---|:---| | `sync` *(default)* | No | Syncs certificates and profiles from Git storage, creating missing or expired ones when writable. | | `nuke` | Yes | Revokes certificates and deletes provisioning profiles of one distribution type on Apple Developer Portal and in Git storage. | | `prune` | Yes | Removes certificates and profiles that are revoked on Apple Developer Portal or expired from Git storage. | ### Shared Options (all `match ios` subcommands) | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-p, --platform ` | `ios` | Target Apple platform: `ios`, `macos`, `tvos`, `catalyst`. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or show (`--no-silent`) verbose logging. | Plus [`AppleCredentialsOptions`](https://appitool.appibara.com/commands/overview#applecredentialsoptions) (`--apple-key-id`, `--apple-issuer-id`, `--apple-key`) and [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions) (`--ci` / `--no-ci`). --- ### `appitool match ios sync` | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-t, --type ` | `MATCH_TYPE` or `appstore` | Distribution type: `appstore`, `development`, `adhoc`, `enterprise`, `developer_id`. | | `--identifiers ` | Auto-discovered from local Xcode project | Comma-separated bundle identifiers to sync profiles for. | | `--force` | `false` | Force renewal of provisioning profiles even if still valid. | | `--shallow-clone` / `--no-shallow-clone` | `true` for `--readonly`; `false` otherwise | Perform shallow Git clone (`--depth 1`). | | `--team-name ` | — | Apple Developer Team Name (used as certificate CN when generating a new certificate). | Plus [`MatchOptions`](https://appitool.appibara.com/commands/overview#matchoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`, `--keychain-name`, `--keychain-password`, `--team-id`, `--readonly`; `--readonly` defaults to `false` in `match ios sync`). `sync` is not destructive, so it runs normally in CI mode. --- ### `appitool match ios nuke` | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-t, --type ` | `MATCH_TYPE` or `appstore` | Distribution type to nuke: `appstore`, `development`, `adhoc`, `enterprise`, `developer_id`. | Plus [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`). Requires App Store Connect API credentials. Skipped as a no-op (exit code `0`) in CI mode unless `--no-ci` is passed. --- ### `appitool match ios prune` | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `-t, --type ` | `MATCH_TYPE` or `appstore` | Distribution type to prune: `appstore`, `development`, `adhoc`, `enterprise`, `developer_id`. | | `--all` | `false` | Prune across all distribution types (cannot be combined with `-t, --type`). | Plus [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`). Requires App Store Connect API credentials. Skipped as a no-op (exit code `0`) in CI mode unless `--no-ci` is passed. --- ### Examples ```bash # Sync App Store certificates and profiles (creates missing if writable) appitool match ios -t appstore # Read-only CI sync for Ad-Hoc profiles across specific bundle IDs appitool match ios sync -t adhoc --readonly --identifiers "com.example.app,com.example.app.widget" # Prune revoked/expired assets across all profile types from Git storage appitool match ios prune --all # Nuke development certificates and profiles on portal and Git repo appitool match ios nuke -t development ``` --- ## `appitool match android` Groups the Android keystore actions: `sync` (default) and `create`. --- ## `appitool match android sync` Syncs an encrypted Android keystore (`.keystore`, `.jks`, `.p12`) from Git storage or encrypts and adds a local keystore + metadata JSON into Git storage. ### Modes - **Sync Mode (default)**: Clones and decrypts `android//.` and `.json`, copying the keystore into `~/.appitool/android/keystores/.keystore`. - **Add Mode (`-k, --keystore`)**: Encrypts the local keystore (and optional credential metadata JSON when `--alias`, `--keystore-password`, and `--key-password` are provided) using Match V2 (`AES-256-GCM`) and pushes it to the Git repository. ### Options & Flags | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `--package-name ` | `GOOGLE_PACKAGE_NAME` or Gradle-resolved | Target Android application package name. | | `-c, --configuration ` | `release` | Build type (`release` or `debug`). | | `-k, --keystore ` | — | Path to local keystore file to encrypt and add to Match Git storage (omit to sync). | | `--alias ` | `ANDROID_KEY_ALIAS` | Key alias inside keystore. | | `--keystore-password ` | `ANDROID_KEYSTORE_PASSWORD` | Keystore password. | | `--key-password ` | `ANDROID_KEY_PASSWORD` | Key password. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or show (`--no-silent`) verbose output. | Plus [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`). ### Examples ```bash # Add and encrypt a local release keystore with credentials metadata appitool match android \ --package-name com.example.app \ -k ./android/app/release.keystore \ --alias upload \ --keystore-password "store_secret" \ --key-password "key_secret" # Sync release keystore from Match Git repository appitool match android --package-name com.example.app -c release ``` --- ## `appitool match android create` Creates a new signing keystore and adds it to Match Git storage, without `keytool` or a JDK. The keystore is a PKCS#12 file in the same layout `keytool -genkeypair -storetype PKCS12` writes, so Gradle, `keytool`, and Google Play read it like any other keystore: - an RSA key (2048 bits by default) and a self-signed SHA-256 certificate with a Subject Key Identifier, - the key encrypted with PBES2 (PBKDF2-HMAC-SHA256, AES-256-CBC), the certificate encrypted the same way, - an HMAC-SHA256 integrity check. With PKCS#12 the key password is the keystore password, so there is no `--key-password`. The keystore and its metadata JSON (alias and password) are encrypted and pushed exactly like `sync -k`, and the keystore is also copied to `~/.appitool/android/keystores/.keystore`. `match android sync`, `build android`, and `flow android` then use it with no extra options. A keystore that already exists in Match for the same package and build type is never replaced: replacing a release key breaks app updates. To replace one on purpose, add it with `match android sync -k `. ### Options & Flags | Option / Flag | Default / `.env` Fallback | Description | |:---|:---|:---| | `--package-name ` | `GOOGLE_PACKAGE_NAME` or Gradle-resolved | Target Android application package name. | | `-c, --configuration ` | `release` | Build type (`release` or `debug`). | | `--alias ` | `ANDROID_KEY_ALIAS`, then `upload` | Key alias inside the keystore. | | `--keystore-password ` | `ANDROID_KEYSTORE_PASSWORD`, then a random 32-character password | Keystore password, also the key password. At least 6 characters. A generated password is stored only in the encrypted Match metadata and is never printed. | | `--common-name ` | package name | Certificate common name (CN). | | `--organizational-unit ` | — | Certificate organizational unit (OU). | | `--organization ` | — | Certificate organization (O). | | `--locality ` | — | Certificate locality or city (L). | | `--state ` | — | Certificate state or province (ST). | | `--country ` | — | Certificate two-letter country code (C), e.g. `TR`. | | `--validity-days ` | `10000` | Certificate validity (about 27 years). Google Play requires upload keys to be valid until at least October 22, 2033. | | `--key-size ` | `2048` | RSA key size: `2048`, `3072`, or `4096`. | | `-o, --output ` | — | Also write the keystore to this path. Never overwrites an existing file. | | `--silent` / `--no-silent` | `true` (`--silent`) | Suppress (`--silent`) or show (`--no-silent`) verbose output. | Plus [`MatchStorageOptions`](https://appitool.appibara.com/commands/overview#matchstorageoptions) (`--match-git-url`, `--match-git-branch`, `--match-git-token`, `--match-password`). ### Examples ```bash # Create the release upload key with a generated password appitool match android create --package-name com.example.app \ --organization "Example Ltd" --country TR # Create it with your own password and keep a local copy appitool match android create --package-name com.example.app \ --keystore-password "store_secret" -o ./release.keystore # Check it with keytool (optional) keytool -list -v -keystore ./release.keystore -alias upload ``` --- # `appitool apple` Direct management of Apple App Store Connect and Apple Developer Portal resources via the App Store Connect OpenAPI client. All `apple` subcommands accept [`AppleCredentialsOptions`](https://appitool.appibara.com/commands/overview#applecredentialsoptions) (`--apple-key-id`, `--apple-issuer-id`, `--apple-key`), falling back to `APPLE_KEY_ID`, `APPLE_ISSUER_ID`, and `APPLE_KEY` in `.env` / environment variables. > [!NOTE] > **CI Guard:** Destructive subcommands (`identifiers delete`, `profiles delete`, `profiles prune`, `certificates delete`, `certificates prune`, `devices disable`, `users delete`, `invitations cancel`, `versions delete`, and `assets delete`) accept [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions) (`--ci` / `--no-ci`) and are skipped as a no-op (exit code `0`) when running in CI mode. Pass `--no-ci` to force execution in CI. ## Synopsis ```bash appitool apple [options] ``` ## Subcommands Summary | Category | Subcommands | |:---|:---| | **Apps** | `apps list` | | **Versions** | `versions create`, `versions delete` | | **App / Bundle Identifiers** | `identifiers list`, `identifiers create`, `identifiers delete`, `capabilities list` | | **Provisioning Profiles** | `profiles list`, `profiles create`, `profiles delete`, `profiles prune` | | **Certificates** | `certificates list`, `certificates create`, `certificates delete`, `certificates prune` | | **Devices** | `devices list`, `devices create`, `devices disable` | | **Users** | `users list`, `users invite`, `users update`, `users delete` | | **Invitations** | `invitations list`, `invitations cancel` | | **Assets** (screenshots, product page header, search results) | `assets list`, `assets upload`, `assets download`, `assets delete`, `assets types`, `assets specs` | | **Metadata** (name, subtitle, description, keywords, promotional text, what's new, URLs) | `metadata list`, `metadata download`, `metadata upload` | | **Categories** (App Store category IDs for metadata) | `categories list` | --- ## Apps ### `appitool apple apps list` Lists applications registered in App Store Connect (name, bundle ID, App ID, SKU, primary locale). | Option | Description | |:---|:---| | `-b, --bundle-id ` | Filter by bundle identifier (e.g. `com.example.app`). | | `-n, --name ` | Filter by application name. | | `-l, --limit ` | Maximum number of items to return (omit to fetch all). | ```bash appitool apple apps list appitool apple apps list -b com.example.app ``` ### `appitool apple versions create` Creates a new App Store version (`POST /v1/appStoreVersions`). App Store Connect copies the previous version's texts and screenshots into it, and an editable app info becomes available, so [`apple metadata`](#metadata-appitool-apple-metadata) and [`apple assets`](#assets-appitool-apple-assets) can edit it right away. **Version string:** - **`--app-version` given:** that version is created as-is. App Store Connect validates it; if it rejects the request, the command exits with Apple's error message plus a likely cause (e.g. HTTP 409: another version is still editable or the version already exists; 400/422: invalid or not higher than the latest version; 401/403: API key role). The Xcode project is not changed. - **`--app-version` omitted:** 1. If a version is already editable for the platform (App Store Connect allows only one), the command stops and names it — nothing is changed. 2. The Xcode project's `MARKETING_VERSION` is used when it is higher than every existing App Store version (or when the app has no versions yet). 3. Otherwise (project version lower or equal, or no project found), the latest App Store version's patch number is bumped (`1.0.8` → `1.0.9`). When a project was found, its `MARKETING_VERSION` is set to the new version **after** App Store Connect accepted it (all distributable targets; literal `CFBundleShortVersionString` values in `Info.plist` are pointed at `$(MARKETING_VERSION)`; `.xcconfig` files are not changed). | Option / Flag | Default | Description | |:---|:---|:---| | `--app-version ` | Xcode project / bumped latest (see above) | Version string to create. | | `-b, --bundle-id ` / `--app-id ` | `APPLE_BUNDLE_ID` / Xcode project | Target app. | | `-p, --platform ` | `ios` | `ios`, `macos`, `tvos`, `visionos`. | | `--release-type ` | App Store Connect default | `manual`, `after-approval`, or `scheduled`. | | `--release-date ` | — | Earliest release date; required for and only allowed with `--release-type scheduled`. | | `--copyright ` | — | Copyright text. | | `--project ` / `--workspace-path ` | `XCODE_PROJECT` / `XCODE_WORKSPACE` / auto-detected | Xcode project used for the default version and the `MARKETING_VERSION` update. | | `--dry-run` | `false` | Show the version that would be created (and whether the project would be updated) without changing anything. | ```bash # Use the Xcode project version, or bump the latest App Store version appitool apple versions create --dry-run appitool apple versions create # Create an explicit version that is released automatically after approval appitool apple versions create --app-version 2.0.0 --release-type after-approval ``` ### `appitool apple versions delete` Deletes an App Store version that is still being prepared (`DELETE /v1/appStoreVersions/{id}`), including its localized texts, screenshots, and App Review details. Asset Library images stay in the library, and a `MARKETING_VERSION` bumped by `versions create` is not reverted. Destructive: skipped in CI mode unless `--no-ci` is passed. - Without `--app-version`, the platform's editable version is deleted; if there is none, nothing happens. - With `--app-version`, that version must exist and be editable; live, in-review, or released versions are refused before calling App Store Connect. - App Store Connect makes the final decision (it generally only removes versions that were never submitted for review); its error is shown with a likely cause. | Option / Flag | Default | Description | |:---|:---|:---| | `--app-version ` | Current editable version | Version to delete. | | `-b, --bundle-id ` / `--app-id ` | `APPLE_BUNDLE_ID` / Xcode project | Target app. | | `-p, --platform ` | `ios` | `ios`, `macos`, `tvos`, `visionos`. | | `--dry-run` | `false` | Show which version would be deleted. | | `--ci` / `--no-ci` | auto | CI guard (see [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions)). | ```bash appitool apple versions delete --dry-run appitool apple versions delete --app-version 1.0.9 ``` --- ## Bundle Identifiers & Capabilities ### `appitool apple identifiers list` Lists App/Bundle Identifiers registered on Apple Developer Portal. | Option | Description | |:---|:---| | `-b, --bundle-id ` | Filter by bundle identifier. | | `-l, --limit ` | Maximum number of items to return. | ```bash appitool apple identifiers list ``` ### `appitool apple identifiers create` Registers a new App/Bundle Identifier with optional capabilities on Apple Developer Portal. | Option | Default | Description | |:---|:---|:---| | `-b, --bundle-id ` | — | App/Bundle identifier (e.g. `com.example.app`). | | `-n, --name ` | Bundle ID | Description or name of the App Identifier. | | `-p, --platform ` | `universal` | Platform: `universal`, `ios`, or `macos`. | | `--capabilities ` | — | Comma-separated capability keys (e.g. `push-notifications,in-app-purchase`). | ```bash appitool apple identifiers create \ -b com.example.app \ -n "Example App" \ --capabilities "push-notifications,sign-in-with-apple,associated-domains" ``` ### `appitool apple identifiers delete` Deletes an App/Bundle Identifier from Apple Developer Portal. Any provisioning profiles tied to the identifier are invalidated by Apple. Bundle IDs actively linked to an App Store Connect App record cannot be deleted. | Option | Description | |:---|:---| | `-b, --bundle-id ` | App/Bundle identifier to delete (required). | ```bash appitool apple identifiers delete -b com.example.app ``` ### `appitool apple capabilities list` - When called **without `-b`**: Lists all 28 supported capability keys and their App Store Connect enum names (no credentials required). - When called **with `-b, --bundle-id `**: Queries Apple Developer Portal and lists capabilities enabled for that Bundle ID. ```bash # List all supported capability keys appitool apple capabilities list # Inspect capabilities enabled for an existing App ID appitool apple capabilities list -b com.example.app ``` #### Supported Capability Keys | Category | CLI Key (Aliases) | API Enum | Description | |:---|:---|:---|:---| | **Push & Communication** | `push-notifications` (`push`) | `PUSH_NOTIFICATIONS` | APNs remote push notifications | | | `inter-app-audio` | `INTER_APP_AUDIO` | Real-time audio streaming with host apps | | | `coremedia-hls-low-latency` | `COREMEDIA_HLS_LOW_LATENCY` | Low-Latency HTTP Live Streaming (HLS) | | **Authentication & Security** | `sign-in-with-apple` (`apple-sign-in`, `apple-id-auth`) | `APPLE_ID_AUTH` | Sign in with Apple authentication | | | `data-protection` | `DATA_PROTECTION` | Hardware-based file-level encryption | | | `autofill-credential-provider` | `AUTOFILL_CREDENTIAL_PROVIDER` | AutoFill password manager extensions | | **App Integration & Domains** | `associated-domains` | `ASSOCIATED_DOMAINS` | Universal Links, App Clips, Web Credentials | | | `app-groups` | `APP_GROUPS` | Shared container access for App Extensions & Widgets | | | `icloud` | `ICLOUD` | CloudKit database and iCloud document storage | | | `game-center` | `GAME_CENTER` | Game Center leaderboards, achievements & multiplayer | | | `in-app-purchase` (`iap`) | `IN_APP_PURCHASE` | In-App Purchases & StoreKit | | **Payments & Wallet** | `apple-pay` | `APPLE_PAY` | Apple Pay in-app payment processing | | | `wallet` (`passbook`) | `WALLET` | Passes, tickets, and boarding passes in Apple Wallet | | **Hardware & Networking** | `nfc-tag-reading` (`nfc`) | `NFC_TAG_READING` | Near Field Communication (NFC) tag reading | | | `access-wifi-information` (`wifi-info`) | `ACCESS_WIFI_INFORMATION` | Access current Wi-Fi network SSID/BSSID | | | `hot-spot` | `HOT_SPOT` | Wi-Fi HotSpot network configuration | | | `personal-vpn` | `PERSONAL_VPN` | Personal VPN tunnels and connections | | | `network-extensions` | `NETWORK_EXTENSIONS` | Custom network tunnels, DNS proxies, content filters | | | `network-custom-protocol` | `NETWORK_CUSTOM_PROTOCOL` | Custom network protocol extensions | | | `multipath` | `MULTIPATH` | Multipath TCP for concurrent Wi-Fi and Cellular data | | | `wireless-accessory-configuration` | `WIRELESS_ACCESSORY_CONFIGURATION` | MFi accessory Wi-Fi configuration | | **Health & Home** | `healthkit` | `HEALTHKIT` | HealthKit health and fitness records | | | `homekit` | `HOMEKIT` | HomeKit smart home automation & accessories | | **Siri & Maps & System** | `sirikit` | `SIRIKIT` | SiriKit voice shortcuts and intents | | | `maps` | `MAPS` | MapKit turn-by-turn routing and directions | | | `classkit` | `CLASSKIT` | ClassKit student progress & educational activities | | | `system-extension-install` | `SYSTEM_EXTENSION_INSTALL` | macOS system extensions & driver extensions | | | `user-management` | `USER_MANAGEMENT` | Multi-user management on Shared iPad | --- ## Provisioning Profiles ### `appitool apple profiles list` Lists provisioning profiles on Apple Developer Portal (name, Portal ID, UUID, type, state, expiration date). | Option | Description | |:---|:---| | `-n, --name ` | Filter by provisioning profile name. | | `-l, --limit ` | Maximum number of items to return. | ### `appitool apple profiles create` Creates and optionally downloads a provisioning profile on Apple Developer Portal. | Option | Default | Description | |:---|:---|:---| | `-b, --bundle-id ` | **Required** | Application Bundle Identifier. | | `-n, --name ` | `match ` | Provisioning profile name. | | `-t, --type ` | `appstore` | Profile type: `appstore`, `development`, `adhoc`, `enterprise`, `developer_id`. | | `-p, --platform ` | `ios` | Target platform: `ios`, `macos`, `tvos`, `catalyst`. | | `--certificate-id ` | First active matching cert | Certificate Portal ID to embed in the profile. | | `--device-ids ` | All enabled matching devices | Comma-separated device Portal IDs for `development`/`adhoc` profiles. | | `-o, --output ` | — | File path to save the generated `.mobileprovision` / `.provisionprofile`. | ```bash appitool apple profiles create -b com.example.app -t adhoc -o ./AdHoc_com.example.app.mobileprovision ``` ### `appitool apple profiles delete` Deletes a single provisioning profile by name, UUID, or Portal ID. | Option | Description | |:---|:---| | `-n, --name ` | Provisioning profile name. | | `--uuid ` | Provisioning profile UUID. | | `--portal-id ` | Provisioning profile Portal ID. | ### `appitool apple profiles prune` Deletes all `INVALID` (and optionally expired) provisioning profiles from Apple Developer Portal. | Flag | Default | Description | |:---|:---|:---| | `--dry-run` | `false` | Preview candidate profiles without deleting them. | | `--include-expired` | `false` | Also prune expired profiles in addition to `INVALID` profiles. | ```bash appitool apple profiles prune --include-expired --dry-run ``` --- ## Signing Certificates ### `appitool apple certificates list` Lists certificates registered on Apple Developer Portal with status (`ACTIVE` / `EXPIRED`), type, serial number, and expiration date. | Option | Description | |:---|:---| | `-t, --type ` | Filter by certificate type (`distribution`, `development`, `developer-id`, `ios-distribution`, `ios-development`, `mac-distribution`, `mac-development`). | | `-l, --limit ` | Maximum number of items to return. | ### `appitool apple certificates create` Generates an RSA 2048-bit private key and CSR locally, submits it to Apple Developer Portal, and saves the `.cer` and private `.key` (plus optional `.p12` and Keychain import). > [!WARNING] > Keep the generated private key safe—Apple does not store private keys and they cannot be re-downloaded. | Option / Flag | Default | Description | |:---|:---|:---| | `-t, --type ` | `distribution` | Certificate type: `development`, `distribution`, `developer-id`, `ios-development`, `ios-distribution`, `mac-development`, `mac-distribution`, `mac-installer`. | | `-n, --name ` | Auto-generated | Common Name (CN) for the CSR subject. | | `-o, --output ` | `~/.appitool/certs/{type}/` | Output directory for `.cer`, `.key`, and `.p12`. | | `--p12` | `false` | Export a `.p12` (PKCS#12) archive containing certificate and private key. | | `--p12-password ` | `appitool` | Password for the exported `.p12` archive. | | `--save-to-keychain` | `false` | Import certificate and private key into the `appitool` Keychain and delete `.p12` once verified. | ```bash appitool apple certificates create -t distribution --p12 --save-to-keychain ``` ### `appitool apple certificates delete` Revokes/deletes a certificate from Apple Developer Portal by Portal ID, name, or serial number. | Option | Description | |:---|:---| | `--portal-id ` | Certificate Portal ID. | | `-n, --name ` | Certificate name. | | `--serial-number ` | Certificate serial number. | ### `appitool apple certificates prune` Deletes/revokes all expired certificates from Apple Developer Portal. | Option / Flag | Default | Description | |:---|:---|:---| | `--dry-run` | `false` | Preview expired certificates without revoking them. | | `-t, --type ` | — | Filter pruning by certificate type (e.g. `distribution`, `development`). | --- ## Devices ### `appitool apple devices list` Lists registered devices on Apple Developer Portal. | Option | Description | |:---|:---| | `-p, --platform ` | Filter by platform (`ios`, `macos`, `universal`). | | `--status ` | Filter by status (`enabled`, `disabled`). | | `-n, --name ` | Case-insensitive substring filter on device name. | | `-l, --limit ` | Maximum number of items to return. | ### `appitool apple devices create` Registers a new test device on Apple Developer Portal. | Option | Default | Description | |:---|:---|:---| | `-n, --name ` | **Required** | Device display name (e.g. `"QA iPhone 16"`). | | `--udid ` | **Required** | Device Unique Device Identifier (UDID). | | `-p, --platform ` | `ios` | Platform: `ios`, `macos`, `universal`. | ```bash appitool apple devices create -n "QA iPhone" --udid 00008130-001234567890001E ``` ### `appitool apple devices disable` Disables a registered device by UDID on Apple Developer Portal so it is excluded from new provisioning profiles. | Option | Description | |:---|:---| | `--udid ` | Device UDID to disable (**Required**). | ```bash appitool apple devices disable --udid 00008130-001234567890001E ``` --- ## Users & Invitations > [!NOTE] > Managing App Store Connect team users and invitations requires an API key with the **Admin** role. The `ACCOUNT_HOLDER` role cannot be assigned or modified via the API. > > **Supported Role Keys (comma-separated):** `admin`, `app-manager`, `developer`, `finance`, `sales`, `marketing`, `customer-support` (alias: `support`), `access-to-reports` (alias: `reports`), `create-apps`, `cloud-managed-developer-id`, `cloud-managed-app-distribution`, `generate-individual-keys`. ### `appitool apple users list` Lists active team users in App Store Connect. | Option | Description | |:---|:---| | `--username ` | Filter by username (Apple ID email). | | `-r, --roles ` | Filter by comma-separated roles (e.g. `admin,developer`). | | `-l, --limit ` | Maximum number of items to return (omit to fetch all). | ```bash appitool apple users list appitool apple users list -r admin,developer ``` ### `appitool apple users invite` Sends an email invitation to add a new user to your App Store Connect team. | Option / Flag | Default | Description | |:---|:---|:---| | `-e, --email ` | **Required** | Invitee email address. | | `--first-name ` | **Required** | Invitee first name. | | `--last-name ` | **Required** | Invitee last name. | | `-r, --roles ` | **Required** | Comma-separated roles to assign (e.g. `developer,app-manager`). | | `--visible-apps ` | — | Comma-separated App Store Connect App IDs or bundle IDs to grant access. | | `--all-apps-visible` / `--no-all-apps-visible` | `true` (or `false` if `--visible-apps` is set) | Grant visibility to all apps. | | `--provisioning-allowed` / `--no-provisioning-allowed` | Role default | Allow access to certificates, identifiers, and profiles. | ```bash appitool apple users invite \ -e dev@example.com \ --first-name Jane \ --last-name Doe \ -r developer \ --visible-apps com.example.app \ --provisioning-allowed ``` ### `appitool apple users update` Updates an active team user's roles, app visibility, or provisioning access (identify user with `--id` or `--username`). | Option / Flag | Description | |:---|:---| | `--id ` | User resource ID in App Store Connect. | | `--username ` | User username (Apple ID email). | | `-r, --roles ` | Comma-separated roles to assign. | | `--visible-apps ` | Comma-separated App Store Connect App IDs or bundle IDs for visible apps. | | `--all-apps-visible` / `--no-all-apps-visible` | Grant or restrict visibility to all apps. | | `--provisioning-allowed` / `--no-provisioning-allowed` | Allow or disallow access to certificates, identifiers, and profiles. | ```bash appitool apple users update --username dev@example.com -r app-manager --all-apps-visible ``` ### `appitool apple users delete` Removes an active team user from App Store Connect (identify user with `--id` or `--username`). | Option | Description | |:---|:---| | `--id ` | User resource ID to remove. | | `--username ` | User username (Apple ID email) to remove. | ```bash appitool apple users delete --username dev@example.com ``` ### `appitool apple invitations list` Lists pending team user invitations in App Store Connect. | Option | Description | |:---|:---| | `-e, --email ` | Filter by invitee email address. | | `-r, --roles ` | Filter by comma-separated roles. | | `-l, --limit ` | Maximum number of items to return (omit to fetch all). | ```bash appitool apple invitations list ``` ### `appitool apple invitations cancel` Cancels a pending user invitation in App Store Connect (identify invitation with `--id` or `-e, --email`). | Option | Description | |:---|:---| | `--id ` | Invitation resource ID to cancel. | | `-e, --email ` | Invitee email address whose pending invitation should be canceled. | ```bash appitool apple invitations cancel -e dev@example.com ``` --- ## Assets (`appitool apple assets`) Manages the App Store product page images of a version, per localization: | Kind | `-t, --type` values | API | |:---|:---|:---| | Screenshots | screenshot device slots (`iphone-67`, `ipad-pro-129`, `iphone-duo`, … — see `assets types`) | `APP_SCREENSHOT` / `IMESSAGE_APP_SCREENSHOT` placements with the slot's placement group (e.g. `IPHONE_DYNAMIC_ISLAND_LARGE_PROFILE`) | | Product page header (iOS 27+) | `header` | `PRODUCT_PAGE_HEADER_ASSET` placement | | Search results (iOS 27+) | `search` | `APP_STORE_SEARCH_RESULTS_ASSET` placement | All types use the App Store Connect **Asset Library** (API 4.6.1): an image is uploaded into the app's Asset Library (reserve → chunked upload → commit, then processing) and then *placed* on a version localization. Removing a placement keeps the image in the Asset Library. Screenshot slots hold up to 10 images in display order (reordered with placement ordering requests); `header` / `search` hold exactly one image, and placing a new one replaces the current one. Screenshots need an editable version; header/search can also be changed on a live version. Videos are not supported yet. Everything lives in one local tree: `~/.appitool/assets//apple///`, where `` is a screenshot slot key (up to 10 images) or `header` / `search` (exactly one image). When [`STORE_ASSETS_PATH`](https://appitool.appibara.com/guide/configuration#store-assets-apple-assets-google-assets) is set, the tree is `/apple///` instead (default paths below then refer to that folder). All `assets` subcommands (except `types` and `specs`) accept shared app-resolution options: | Option | Default / `.env` Fallback | Description | |:---|:---|:---| | `-b, --bundle-id ` | `APPLE_BUNDLE_ID` or auto-detected from Xcode project | Target application bundle identifier | | `--app-id ` | — | Numeric App Store Connect App ID (takes precedence over `--bundle-id`) | | `-p, --platform ` | `ios` | Target platform (`ios`, `macos`, `tvos`, `visionos`) | | `--app-version ` | Auto-selects editable version (or latest for `list`) | Explicit App Store version string (e.g. `1.2.0`) | ### `appitool apple assets list` Lists screenshots per device slot (in display order) and header / search results placements on the resolved App Store version, with placement IDs, dimensions, and states. Screenshots in device slots appitool does not know yet are reported with their placement group. | Option | Description | |:---|:---| | `--locale ` | Filter by App Store locale (e.g. `en-US`, `tr`). Omit to list all localizations. | | `-t, --type ` | Filter by screenshot slot (e.g. `iphone-67`, `ipad-pro-129`, `iphone-duo`), `header`, or `search`. | | `--asset-library` | Instead of the regular view, list every Asset Library placement on each localization (all placement types, including screenshot placements, with their placement group). | ```bash appitool apple assets list -b com.example.app appitool apple assets list -b com.example.app --app-version 1.2.0 --locale en-US -t iphone-67 ``` ### `appitool apple assets upload` Uploads screenshots (to an editable App Store version, e.g. `PREPARE_FOR_SUBMISSION`; new screenshots are added at the end of their slot, and slots that would exceed 10 images are rejected before any change) and header / search results images either from explicit flat image paths (`--locale` and `-t` required) or symmetrically from a `//` directory tree defaulting to `~/.appitool/assets//apple/` (`--locale` and `-t` optional filters). Each `header` / `search` folder must contain exactly one image; it replaces that localization's current placement (a new placement is created first and the old one removed; if App Store Connect rejects a second placement, the old one is removed first). A file used for several localizations is uploaded to the Asset Library once. | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `--locale ` | — | App Store localization locale (e.g. `en-US`, `tr`). Required for flat files; optional filter for `//` trees. | | `-t, --type ` | — | Screenshot slot (e.g. `iphone-67`, `ipad-pro-129`, `APP_IPHONE_67`, `iphone-duo`), `header`, or `search`. Required for flat files; optional filter for directory trees. | | `--replace` | `false` | Remove the existing screenshots of each target slot before uploading. For `//` trees, also writes each folder's sync manifest. Header/search slots are always replaced. | | `--sync` | `false` | Mirror `//` folders using `.appitool-manifest.json` (see [Asset sync](#asset-sync)). Cannot be combined with `--replace`; requires a directory tree, not explicit files or a flat folder. | | `--all-locales` | `false` | Place one explicit `header` or `search` file on every localization of the version (requires a file and `-t header` / `-t search`; cannot be combined with `--locale` or `--sync`). | | `--wait-processing` / `--no-wait-processing` | `true` (`--wait-processing`) | Wait for App Store Connect to process each uploaded image. | | `--dry-run` | `false` | Validate files and preview upload targets without contacting App Store Connect. With `--sync`, reads App Store Connect (no changes) and prints the sync plan. | | `-f, --file ` | `$STORE_ASSETS_PATH/apple/` or `~/.appitool/assets//apple/` | PNG/JPEG file, flat directory, or `//` directory tree. Repeatable. | ```bash # Bulk-upload all locales and types from ~/.appitool/assets//apple/ appitool apple assets upload --replace # Bulk-upload only en-US slots from the default per-project directory appitool apple assets upload --locale en-US --replace # Upload flat directory images for a single locale and display type appitool apple assets upload \ -b com.example.app \ --locale en-US \ -t iphone-67 \ --replace \ -f ./screenshots/ios/en-US/iphone-67/ # Preview, then apply, only the local changes since the last download/sync appitool apple assets upload --sync --dry-run appitool apple assets upload --sync # Use one header image for every localization appitool apple assets upload --all-locales -t header -f ./header.png # Set the en-US search results image appitool apple assets upload --locale en-US -t search -f ./search.png ``` #### Asset sync `download`, `upload --replace` (directory trees), and `upload --sync` write a `.appitool-manifest.json` into each `//` folder. For screenshot folders it records the slot identity (`//`) and, for every file, the matching placement ID and the SHA-256 of the local file. For `header` / `search` folders it records the placed Asset Library image ID and the file's SHA-256. `header` / `search` folders under `--sync`: unchanged file whose image is still placed → nothing is sent; changed file (or a different image placed) → upload and place; no manifest and nothing placed → upload and place; no manifest but an image is placed → error (run `download` first, or upload without `--sync` to replace it). Header/search slots are planned before any screenshot change. Screenshot folders: `upload --sync` plans every slot before changing anything; any planning error aborts the run without remote changes. Per slot: | Local state | Action | |:---|:---| | File in manifest, checksum unchanged | Keep (no upload). | | File in manifest, checksum changed | Replace: upload and place the new file, then remove the old placement (removes first when the slot already has 10 screenshots). | | File renamed but content unchanged | Keep (matched by checksum). | | File not in manifest | Add. | | Manifest entry whose file was removed | Remove the placement from App Store Connect. | | Screenshot on App Store Connect not in the manifest | Left untouched (warning) and placed after the managed screenshots. | After uploads, the slot order is set to the local file-name order (`01_…`, `02_…`) with a placement ordering request, and the manifest is rewritten. | Manifest | Remote slot | Result | |:---|:---|:---| | Missing | Empty | Bootstrap: upload all files in file-name order, write the manifest. | | Missing | Has screenshots | Error: run `download` first or use `--replace`. | | For a different slot or version | — | Error: run `download` again or delete the manifest and use `--replace`. | Slots that would exceed App Store Connect's limit of 10 screenshots → error before any change. A `//` folder with no images is skipped, so emptying a folder does not clear its slot; use `apple assets delete` for that. ### `appitool apple assets download` Downloads screenshots from App Store Connect (`imageAsset.templateUrl` at full resolution) into `///01_.`, and placed header / search results images into `///.`. By default, files are stored per project under `~/.appitool/assets//apple/`. Existing leading order prefixes (`01_...`) are stripped before applying the current store order prefix so round-tripping download → upload → download does not double-prefix filenames. Downloaded files are the images served by Apple's CDN, which can be smaller than the originally uploaded files (same dimensions, different encoding). Each slot folder also gets a `.appitool-manifest.json` for [`upload --sync`](#asset-sync). Screenshots in device slots appitool does not know yet are skipped with a warning. Images written by a previous download whose screenshots no longer exist on App Store Connect are removed; other local images are kept and reported (`upload --sync` would add them). | Option / Flag | Default | Description | |:---|:---|:---| | `--locale ` | — | Filter by App Store locale (e.g. `en-US`, `tr`). Omit to download all locales. | | `-t, --type ` | — | Filter by screenshot slot (e.g. `iphone-67`, `ipad-pro-129`, `iphone-duo`), `header`, or `search`. | | `-o, --output ` | `~/.appitool/assets//apple/` | Custom destination root directory. | | `--dry-run` | `false` | Preview target local paths and CDN URLs without downloading files. | ```bash # Download all locales and display types for the project to ~/.appitool/assets//apple/ appitool apple assets download # Download only en-US iPhone 6.7" screenshots into a custom folder appitool apple assets download -b com.example.app --locale en-US -t iphone-67 -o ./downloads/ios ``` ### `appitool apple assets delete` Removes one placement by ID, or all assets for `--locale` (and optional `--type`). Removing a placement takes the image off the localization; the image stays in the Asset Library. Screenshots require an editable version; with `-t header` / `-t search` a live version can be used. Guarded in CI mode. | Option / Flag | Default | Description | |:---|:---|:---| | `--id ` | — | Placement ID to remove, as shown by `assets list` (mutually exclusive with `--all`). | | `--locale ` | — | App Store localization locale when deleting with `--all`. | | `-t, --type ` | — | Optional filter when deleting with `--all`: a screenshot slot (e.g. `iphone-67`, `iphone-duo`), `header`, or `search`. Omit to remove all types (screenshots, header, and search). | | `--all` | `false` | Remove all assets matching `--locale` (and optional `--type`). | | `--dry-run` | `false` | Preview matching assets without removing them. | ```bash appitool apple assets delete --id "" appitool apple assets delete -b com.example.app --locale en-US -t iphone-67 --all --dry-run ``` ### `appitool apple assets types` Lists all supported screenshot slots (the 33 App Store Connect screenshot display types plus `iphone-duo` and `imessage-iphone-duo`) with their CLI aliases and Asset Library placement groups, plus `header` and `search` (no credentials required). ```bash appitool apple assets types ``` ### `appitool apple assets specs` Shows Apple's current image specs live from `appAssetLibraryRefData` (needs only Apple credentials): - **header / search:** requirement status (optional), size or size range, aspect ratio, formats, maximum file size, alpha, universal assets. - **screenshot:** one entry per device slot with its `-t` key, display class (e.g. `IPHONE_DYNAMIC_ISLAND_LARGE_DISPLAY`), platform, placement group, requirement status (from Apple's submission guidelines), screen dimensions, maximum count per version, and the accepted sizes, formats, maximum file size, and alpha rules. | Option | Description | |:---|:---| | `-t, --type ` | `screenshot`, `header`, `search`, or one screenshot slot (e.g. `iphone-67`, `iphone-duo`). Omit to show all. | ```bash appitool apple assets specs appitool apple assets specs -t header ``` --- ## Metadata (`appitool apple metadata`) Manages App Store listing text as one plain-text file per field: `//metadata/.txt`, where `` is `$STORE_ASSETS_PATH/apple/` or `~/.appitool/assets//apple/` (the same folder as `apple assets`; image commands ignore `metadata/` folders). There is one current set of files per locale (no per-version folders); git history keeps earlier texts. | File | Field | Limit | Lives on | |:---|:---|:---|:---| | `name.txt` | Name | 30 | App info localization | | `subtitle.txt` | Subtitle | 30 | App info localization | | `privacy_policy_url.txt` | Privacy Policy URL | — | App info localization | | `privacy_choices_url.txt` | Privacy Choices URL | — | App info localization | | `description.txt` | Description | 4000 | Version localization | | `keywords.txt` | Keywords (comma-separated) | 100 | Version localization | | `promotional_text.txt` | Promotional Text | 170 | Version localization | | `whats_new.txt` | What's New | 4000 | Version localization | | `marketing_url.txt` | Marketing URL | — | Version localization | | `support_url.txt` | Support URL | — | Version localization | **App-level fields** (one value for all languages) live in `/metadata/.txt`: | File | Field | Lives on | Editable when | |:---|:---|:---|:---| | `copyright.txt` | Copyright | Version | Version editable | | `primary_category.txt`, `primary_subcategory_one.txt`, `primary_subcategory_two.txt`, `secondary_category.txt`, `secondary_subcategory_one.txt`, `secondary_subcategory_two.txt` | Categories (App Store category IDs such as `PRODUCTIVITY`, `GAMES_ACTION`; validated against `appCategories` for the platform; list them with [`apple categories list`](#appitool-apple-categories-list)) | App info | App info editable | | `review_contact_first_name.txt`, `review_contact_last_name.txt`, `review_contact_phone.txt`, `review_contact_email.txt` | App Review contact | Version (App Review details) | Version editable | | `review_notes.txt` | App Review notes (max 4000) | Version (App Review details) | Version editable | | `review_demo_account_required.txt` | `true` / `false` | Version (App Review details) | Version editable | | `review_demo_account_name.txt` | Demo account user name | Version (App Review details) | Version editable | | `content_rights_declaration.txt` | `DOES_NOT_USE_THIRD_PARTY_CONTENT` or `USES_THIRD_PARTY_CONTENT` | App | Any time | | `accessibility_url.txt` | Accessibility URL | App | Any time | The demo account password is a secret: it is never written to or read from files. Set `APPLE_REVIEW_DEMO_PASSWORD` (e.g. in `.env`) to upload it; it is sent only when it differs from the current value and is masked in all output. App Review details are created when the version has none yet. **Which version and app info:** the version is resolved like `assets` (editable version preferred, `--app-version` to pick one, otherwise the latest). The app info is the editable one while a new version is being prepared, otherwise the live one. Every command prints the version and app info state it reads from or writes to. Name, subtitle, and privacy changes need an editable app info and go live with the next version; version fields need an editable version, except `promotional_text`, which can also change on a live version. All subcommands accept the shared app options (`-b, --bundle-id`, `--app-id`, `-p, --platform`, `--app-version`). ### `appitool apple metadata list` Shows the app-level fields (`[app]`, password masked) and every field per localization with its character count and limit (long texts are shortened). | Option | Description | |:---|:---| | `--locale ` | Show only this locale (app-level fields are skipped). | ### `appitool apple metadata download` Writes each non-empty field to `/metadata/.txt` and app-level fields to `metadata/.txt` (with a trailing newline; the demo account password is never written). Existing files are overwritten. | Option / Flag | Default | Description | |:---|:---|:---| | `--locale ` | — | Download only this locale (app-level fields are skipped). | | `-o, --output ` | `$STORE_ASSETS_PATH/apple/` or `~/.appitool/assets//apple/` | Metadata root directory. | | `--dry-run` | `false` | Preview files without writing them. | ### `appitool apple metadata upload` Reads `/metadata/*.txt` and `metadata/*.txt`, compares each file with the store value (surrounding whitespace ignored, `\r\n` treated as `\n`), and sends only fields that differ. Missing and empty files are ignored, so a blank file never clears a store field. Everything is planned first: length limits, value checks (categories, content rights, `true`/`false`; changed `privacy_policy_url`, `privacy_choices_url`, `marketing_url`, `support_url`, and `accessibility_url` must be `http(s)` URLs and a changed `review_contact_email` an email address, while unchanged values are not checked), and editability are checked before any change, and any error aborts the run. Local locales that are not localizations of the app/version are skipped with a warning (add the language in App Store Connect first). | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `--locale ` | — | Upload only this locale (app-level fields are skipped). | | `--dry-run` | `false` | Print the per-field changes without sending them. | | `-f, --file ` | `$STORE_ASSETS_PATH/apple/` or `~/.appitool/assets//apple/` | Metadata root containing `/metadata/` folders. | ```bash appitool apple metadata download # edit ~/.appitool/assets//apple/en-US/metadata/whats_new.txt appitool apple metadata upload --dry-run appitool apple metadata upload ``` ### `appitool apple categories list` Lists the App Store category IDs for a platform (`GET /v1/appCategories`), each top-level category followed by its subcategory IDs (e.g. `GAMES` → `GAMES_ACTION`). Use these values in the category files of [`apple metadata`](#metadata-appitool-apple-metadata). | Option | Default | Description | |:---|:---|:---| | `-p, --platform ` | `ios` | Target platform (`ios`, `macos`, `tvos`, `visionos`). | ```bash appitool apple categories list appitool apple categories list -p macos ``` --- # `appitool google` Direct management of Google Play Console store visuals and resources via the Google Play Developer API v3. All `google assets` subcommands (except `types` and `specs`) accept [`GooglePlayAppOptions`](https://appitool.appibara.com/commands/overview#googleplayappoptions) (`-g, --google-key`, `--package-name`), falling back to `GOOGLE_KEY`, `GOOGLE_PACKAGE_NAME` in `.env`, or auto-detection from the local Android project. The default local folder is `~/.appitool/assets//google/`. When [`STORE_ASSETS_PATH`](https://appitool.appibara.com/guide/configuration#store-assets-apple-assets-google-assets) is set, it is `/google/` instead (default paths below then refer to that folder). > [!NOTE] > **CI Guard:** Destructive subcommands (`assets delete`, `users delete`, `invitations cancel`, `users revoke`) accept [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions) (`--ci` / `--no-ci`) and are skipped as a no-op (exit code `0`) when running in CI mode. Pass `--no-ci` to force execution in CI. ## Synopsis ```bash appitool google [options] ``` ## Subcommands Summary | Domain | Subcommand | Description | |:---|:---|:---| | **Apps** | `apps list` | Lists apps accessible with the service account key (package name and Play Console title). | | | `signing-certs list` | Shows SHA-1 / SHA-256 of Play App Signing certificates (incl. hybrid post-quantum) from Play-generated APKs or local certificate files. | | **Store Visuals (`assets`)** | `assets list` | Lists existing store screenshots and graphic assets by locale and image type. | | | `assets upload` | Uploads PNG/JPEG screenshots, icons, feature graphics, or banners and commits an edit. | | | `assets download` | Downloads store screenshots and graphics locally to `~/.appitool/assets//google/` (or `-o`). | | | `assets delete` | Deletes an individual image by ID or all images of a given type for a locale. | | | `assets types` | Lists all supported Google Play `imageType` keys, aliases, and descriptions. | | | `assets specs` | Shows Google Play Console image specs (dimensions, aspect ratio, formats, file size, alpha, and count limits). | | **Store Listing Text (`metadata`)** | `metadata list` | Shows title, short/full description, and video per language. | | | `metadata download` | Writes listing text to `/metadata/.txt` files. | | | `metadata upload` | Sends changed fields in one edit and commits it. | | **Users** | `users list` | Lists developer account users with account and per-app permissions. | | | `users invite` | Invites a user (account permissions and/or access to one app). | | | `users update` | Changes a user's account permissions or access expiration. | | | `users delete` | Removes a user. | | | `users grant` | Gives a user permissions for one app (creates or replaces the grant). | | | `users revoke` | Removes a user's permissions for one app. | | **Invitations** | `invitations list` | Lists pending or expired invitations. | | | `invitations cancel` | Cancels a pending invitation. | --- ## Supported Store Visual Types | CLI Key | Aliases | API `imageType` | Description | |:---|:---|:---|:---| | `phone` | `phone-screenshots`, `phone_screenshots` | `phoneScreenshots` | Phone screenshots (PNG/JPEG, 2–8 images) | | `tablet7` | `seven-inch`, `7-inch`, `seven-inch-screenshots` | `sevenInchScreenshots` | 7-inch tablet screenshots (PNG/JPEG) | | `tablet10` | `ten-inch`, `10-inch`, `ten-inch-screenshots` | `tenInchScreenshots` | 10-inch tablet screenshots (PNG/JPEG) | | `tv` | `tv-screenshots`, `tv_screenshots` | `tvScreenshots` | Android TV screenshots (PNG/JPEG) | | `wear` | `watch`, `wear-screenshots`, `wear_screenshots` | `wearScreenshots` | Wear OS screenshots (PNG/JPEG) | | `icon` | `app-icon` | `icon` | High-res app icon (512x512 PNG/JPEG) | | `feature-graphic` | `feature`, `feature_graphic` | `featureGraphic` | Feature graphic banner (1024x500 PNG/JPEG) | | `tv-banner` | `banner`, `tv_banner` | `tvBanner` | Android TV banner (1280x720 PNG/JPEG) | --- ## Screenshots & Visuals (`appitool google assets`) ### `appitool google assets list` Opens a temporary read-only Google Play edit session (deleted automatically after reading), lists configured store listing languages (or the specified `--locale`), and prints images for each matching `(language, imageType)` slot. | Option | Description | |:---|:---| | `--locale ` | Filter by BCP-47 language code (e.g. `en-US`, `tr-TR`). Omit to inspect all listing languages. | | `-t, --type ` | Filter by image type (e.g. `phone`, `tablet7`, `feature-graphic`, `icon`). Omit to inspect all types. | ```bash appitool google assets list --package-name com.example.app appitool google assets list --locale en-US -t phone ``` ### `appitool google assets upload` Uploads PNG/JPEG screenshots and graphics to Google Play Console inside a single atomic edit transaction—either for flat image path(s) (`--locale` required, `-t` defaults to `phone`) or symmetrically from a `//` directory tree defaulting to `~/.appitool/assets//google/` (`--locale` and `-t` optional filters). | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `--locale ` | — | BCP-47 language code (e.g. `en-US`, `tr-TR`). Required for flat files; optional filter for `//` trees. | | `-t, --type ` | `phone` (flat) / all (tree) | Target image type (`phone`, `tablet7`, `tablet10`, `tv`, `wear`, `icon`, `feature-graphic`, `tv-banner`). | | `--replace` | `false` | Delete existing images in each target slot before uploading. For `//` trees, also writes each folder's sync manifest after a committed edit. | | `--sync` | `false` | Mirror `//` folders onto their slots using `.appitool-manifest.json` in a single edit (see [Image sync](#image-sync)). Cannot be combined with `--replace`; requires a directory tree, not explicit files or a flat folder. | | `--validate-only` | `false` | Validate the edit session (`edits.validate`) without committing changes. | | `--changes-not-sent-for-review` | `false` | Commit changes without automatically sending them for Google Play review. | | `--dry-run` | `false` | Validate local image files and preview target slots without contacting Google Play. With `--sync`, reads Google Play in a discarded edit and prints the sync plan. | | `-f, --file ` | `$STORE_ASSETS_PATH/google/` or `~/.appitool/assets//google/` | PNG/JPEG file, flat directory, or `//` directory tree. Repeatable. | ```bash # Bulk-upload all locales and image types from ~/.appitool/assets//google/ appitool google assets upload --replace # Bulk-upload only phone screenshots across all locales in the default folder appitool google assets upload -t phone --replace # Replace phone screenshots for en-US from a flat directory appitool google assets upload \ --package-name com.example.app \ --locale en-US \ -t phone \ --replace \ -f ./screenshots/android/en-US/phone/ # Upload a feature graphic banner appitool google assets upload \ --package-name com.example.app \ --locale en-US \ -t feature-graphic \ -f ./assets/feature-graphic.png # Preview, then apply, only the local changes since the last download/sync appitool google assets upload --sync --dry-run appitool google assets upload --sync ``` #### Image sync `download`, `upload --replace` (directory trees), and `upload --sync` write a `.appitool-manifest.json` into each `//` folder. For every file it records the SHA-256 of the local file and Google Play's image `sha256`; remote images are matched by that hash. Local files are classified the same way as for [`apple assets upload --sync`](https://appitool.appibara.com/commands/apple#asset-sync): unchanged (including renamed with the same content), edited, new, and removed. Because Google Play has no reorder call and appends uploads, each slot is rebuilt from the first position that differs: 1. Keep the longest leading run of images that are unchanged and already in place. 2. Delete every remote image after that run. 3. Upload the remaining local files in file-name order (unchanged files after the first change are re-uploaded from the local file). Examples: editing the 6th of 8 phone screenshots deletes and uploads 6–8; appending a new last file uploads only that file; editing the 1st file re-uploads the whole slot. All slots are planned first; any planning error aborts before an edit with changes is opened. All changes are applied in one edit and committed once, so a failure leaves Google Play unchanged. Manifests are rewritten only after a successful commit (not with `--validate-only`). | Rule | Behavior | |:---|:---| | No manifest, remote slot empty | Bootstrap: upload all files in file-name order and write the manifest. | | No manifest, remote slot has images | Error: run `download` first or use `--replace`. | | Manifest for a different slot | Error: run `download` again or delete the manifest and use `--replace`. | | Remote image not in the manifest after the first change | Error (it cannot be re-uploaded): run `download` again or use `--replace`. | | Limits | Phone 2–8, other screenshot types up to 8, `icon` / `feature-graphic` / `tv-banner` exactly 1. | A `//` folder with no images is skipped, so emptying a folder does not clear its slot; use `google assets delete` for that. ### `appitool google assets download` Downloads store screenshots and graphics from Google Play Console into `///01.` (rewriting CDN URLs to `=s0` for full original resolution). Opens a short-lived read-only edit session that is deleted before downloading binaries. By default, files are stored per project under `~/.appitool/assets//google/`. Each slot folder also gets a `.appitool-manifest.json` for [`upload --sync`](#image-sync). Images written by a previous download that are no longer on Google Play are removed; other local images are kept and reported (`upload --sync` would add them). | Option / Flag | Default | Description | |:---|:---|:---| | `--locale ` | — | Filter by BCP-47 language code (e.g. `en-US`, `tr-TR`). Omit to download all listing languages. | | `-t, --type ` | — | Filter by image type (e.g. `phone`, `tablet7`, `feature-graphic`, `icon`). Omit to download all types. | | `-o, --output ` | `~/.appitool/assets//google/` | Custom destination root directory. | | `--dry-run` | `false` | Preview target local paths and CDN URLs without downloading files. | ```bash # Download all Google Play visuals to ~/.appitool/assets//google/ appitool google assets download # Download only en-US phone screenshots into a custom folder appitool google assets download --package-name com.example.app --locale en-US -t phone -o ./downloads/android ``` ### `appitool google assets delete` Deletes a specific image by ID or all images of a given type for a locale in Google Play Console (guarded in CI mode). | Option / Flag | Default | Description | |:---|:---|:---| | `--locale ` | **Required** | BCP-47 language code (e.g. `en-US`, `tr-TR`). | | `-t, --type ` | **Required** | Target image type (`phone`, `tablet7`, `tablet10`, `tv`, `wear`, `icon`, `feature-graphic`, `tv-banner`). | | `--id ` | — | Specific Google Play image ID to delete (mutually exclusive with `--all`). | | `--all` | `false` | Delete all images of the specified type for the language (mutually exclusive with `--id`). | | `--changes-not-sent-for-review` | `false` | Commit changes without automatically sending them for Google Play review. | | `--dry-run` | `false` | Preview matching image(s) without deleting or committing changes. | ```bash # Preview images that would be removed appitool google assets delete --locale en-US -t phone --all --dry-run # Delete a single image by ID appitool google assets delete --locale en-US -t phone --id AO7oq_example_id ``` ### `appitool google assets types` Prints all supported Google Play `imageType` keys, aliases, API names, and descriptions (no credentials required). ```bash appitool google assets types ``` ### `appitool google assets specs` Shows Google Play Console image specs for store graphics and screenshots (requirement status, dimensions, aspect ratio, formats, maximum file size, alpha rules, and per-locale count limits; no credentials required). | Option | Description | |:---|:---| | `-t, --type ` | `screenshot`, `graphic`, or one image type (e.g. `phone`, `tablet7`, `icon`, `feature-graphic`). Omit to show all. | ```bash appitool google assets specs appitool google assets specs -t phone appitool google assets specs -t graphic ``` --- ## Metadata (`appitool google metadata`) Manages Google Play store listing text as one plain-text file per field: `//metadata/.txt`, where `` is `$STORE_ASSETS_PATH/google/` or `~/.appitool/assets//google/` (the same folder as `google assets`; image commands ignore `metadata/` folders). Store listings have no versions, so there is one current set of files per language. Release notes ("What's new") belong to track releases on Google Play and are not part of listing metadata. The app category is not exposed by the Google Play Developer API (`edits.details` and `edits.listings` have no category field), so it is set in Play Console only. | File | Field | Limit | |:---|:---|:---| | `title.txt` | Title | 30 | | `short_description.txt` | Short description | 80 | | `full_description.txt` | Full description | 4000 | | `video.txt` | Promo video URL | — | **App-level details** (one value for the app, `edits.details`) live in `/metadata/.txt`: `contact_email.txt`, `contact_phone.txt`, `contact_website.txt`, and `default_language.txt` (BCP-47, e.g. `en-US`). ### `appitool google metadata list` Shows the app-level details (`[app]`) and every listing field per language with its character count and limit (read-only edit, discarded). | Option | Description | |:---|:---| | `--locale ` | Show only this language (app-level details are skipped). | ### `appitool google metadata download` Writes each non-empty field to `/metadata/.txt` and the app-level details to `metadata/.txt`. Existing files are overwritten. | Option / Flag | Default | Description | |:---|:---|:---| | `--locale ` | — | Download only this language (app-level details are skipped). | | `-o, --output ` | `$STORE_ASSETS_PATH/google/` or `~/.appitool/assets//google/` | Metadata root directory. | | `--dry-run` | `false` | Preview files without writing them. | ### `appitool google metadata upload` Opens a single edit, reads the listings and app details from it, compares them with the local files (surrounding whitespace ignored), and patches only the fields that differ (all languages and the app details) into that same edit, which is committed once. Because the values compared are the ones the patches apply to, changes made elsewhere in the meantime are not missed. Missing and empty files are ignored. Length limits and the format of changed values are checked before anything is patched: `contact_email` must be an email address, `contact_website` and `video` must be `http(s)` URLs, and `default_language` must be a BCP-47 code such as `en-US` (unchanged values are not checked, and `contact_phone` is free text). Any error aborts the run; when there are no changes, with `--dry-run`, or on any error, the edit is discarded without being committed. Local languages without a Play listing are skipped with a warning. | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `--locale ` | — | Upload only this language (app-level details are skipped). | | `--validate-only` | `false` | Validate the edit (`edits.validate`) without committing. | | `--changes-not-sent-for-review` | `false` | Commit without automatically sending the changes for review. | | `--dry-run` | `false` | Print the per-field changes without patching; the edit is discarded. | | `-f, --file ` | `$STORE_ASSETS_PATH/google/` or `~/.appitool/assets//google/` | Metadata root containing `/metadata/` folders. | ```bash appitool google metadata download appitool google metadata upload --dry-run appitool google metadata upload ``` --- ## Apps ### `appitool google apps list` Lists every app the service account can access, using the Play Developer Reporting API `apps.search` (`GET https://playdeveloperreporting.googleapis.com/v1beta1/apps:search`, all pages). Useful for finding package names (`GOOGLE_PACKAGE_NAME`) and checking that a key works. It does not return Play Console account IDs; no Google Play API exposes those (see [`GOOGLE_PLAY_ACCOUNT_ID`](https://appitool.appibara.com/guide/configuration)). Requires the **Google Play Developer Reporting API** to be enabled in the service account's Google Cloud project (HTTP 403 otherwise) and access to the apps in Play Console. The title is the one set in Play Console and may not be live yet. | Option | Description | |:---|:---| | `-g, --google-key ` | Service account key (`GOOGLE_KEY`). | | `-n, --name ` | Filter by app title (case-insensitive substring). | | `-l, --limit ` | Maximum number of apps to show. | ```bash appitool google apps list appitool google apps list -n kokono ``` ### `appitool google signing-certs list` Shows the SHA-1 and SHA-256 fingerprints of the certificates Play App Signing uses, e.g. for Firebase, Google Sign-In, or `assetlinks.json`. Play Console's certificate download can contain three certificates: `deployment_cert.der` (app signing, RSA), `hybrid_classical_cert.der` (RSA), and `hybrid_pqc_cert.der` (post-quantum ML-DSA); all are covered. **From the API (default):** 1. Reads the Play-generated APKs of a version code (`GET applications/{package}/generatedApks/{versionCode}`), grouped by signing key; the API reports each key's certificate SHA-256. 2. Downloads the smallest Play-generated APK per signing key (a config split of a few KB when available, otherwise a standalone or universal APK; held in memory only) and reads every certificate from its APK Signing Block — v2, v3, v3.1, the `hybrid` block (`0x70E1C89F`, Play's classical + post-quantum certificates; not in Android's public docs, identified from Play-generated APKs), and other unknown blocks (shown as `block 0x…`) — then prints SHA-1, SHA-256, and the algorithm (RSA, ECDSA, ML-DSA-44/65/87) of each and whether it matches the API's SHA-256. Generated APKs exist for app bundles (AAB) uploaded with Play App Signing, so the API mode needs at least one uploaded AAB: with no release on any track the command exits with an explanation (pass `--version-code` for a bundle uploaded but not yet in a release). The service account needs release access to the app (HTTP 403 otherwise). The upload key certificate is not available through the API; it is your own keystore's certificate (`appitool match android`). **From local files (`-f`):** fingerprints certificate files directly (DER `.der`/`.cer`/`.crt` or PEM `.pem`; folders are expanded), without any API call — for example the folder Play Console's certificate download creates. A fingerprint is the hash of the DER bytes, so this also works for post-quantum certificates that older tools such as `openssl` cannot parse. | Option / Flag | Default | Description | |:---|:---|:---| | `--package-name ` | `GOOGLE_PACKAGE_NAME` / project | App to inspect (API mode). | | `--version-code ` | Highest version code on your tracks | Version code whose generated APKs are read. | | `--sha256-only` | `false` | Only print the API's SHA-256 values (no APK download, no SHA-1). | | `-f, --file ` | — | Certificate file or folder to fingerprint locally (repeatable). Skips the API. | | `-g, --google-key ` | `GOOGLE_KEY` | Service account key (API mode). | ```bash # Fingerprints from Play (latest version code) appitool google signing-certs list # Fingerprints of the certificates downloaded from Play Console appitool google signing-certs list -f ~/Downloads/certificates ``` --- ## Users & Invitations Manages Play Console users of the developer account through the Play Developer API `users` and `grants` resources. A user has account-wide permissions (`developerAccountPermissions`) and per-app grants (`appLevelPermissions`). Google has no separate invitation object: an invited user has `accessState` `INVITED` (or `INVITATION_EXPIRED`) until they accept. All user commands accept `-g, --google-key` (`GOOGLE_KEY`) and `--account-id ` (`GOOGLE_PLAY_ACCOUNT_ID`): your Play Console account ID, the number in `play.google.com/console/developers/` (not the Google Cloud project, service account, or package name). The service account needs the **Manage users and permissions** (admin) permission in Play Console; API errors are shown with a likely cause (e.g. 403 → missing permission or wrong account ID). **Permission values** are comma-separated and case-insensitive, written as `can-see-all-apps` or `CAN_SEE_ALL_APPS`: - Account-wide (`--permissions` on `users invite` / `users update`; the `_GLOBAL` suffix is optional): `can-see-all-apps`, `can-view-financial-data`, `can-manage-permissions`, `can-edit-games`, `can-publish-games`, `can-reply-to-reviews`, `can-manage-public-apks`, `can-manage-track-apks`, `can-manage-track-users`, `can-manage-public-listing`, `can-manage-draft-apps`, `can-create-managed-play-apps`, `can-change-managed-play-setting`, `can-manage-orders`, `can-manage-app-content`, `can-view-non-financial-data`, `can-view-app-quality`, `can-manage-deeplinks`, `can-view-connected-apps`, `can-edit-connected-apps`. - Per app (`--app-permissions` on `users invite`, `--permissions` on `users grant`): `can-access-app`, `can-view-financial-data`, `can-manage-permissions`, `can-reply-to-reviews`, `can-manage-public-apks`, `can-manage-track-apks`, `can-manage-track-users`, `can-manage-public-listing`, `can-manage-draft-apps`, `can-manage-orders`, `can-manage-app-content`, `can-view-non-financial-data`, `can-view-app-quality`, `can-manage-deeplinks`. Some of these values are returned by the live API but missing from Google's API spec; they are accepted as well. | Command | Options | Notes | |:---|:---|:---| | `users list` | `-e, --email`, `-l, --limit` | Users who accepted (state `ACCESS_GRANTED` / `ACCESS_EXPIRED`), with account permissions, expiration, and per-app grants. | | `invitations list` | `-e, --email`, `-l, --limit` | Users in `INVITED` / `INVITATION_EXPIRED` state. | | `users invite` | `-e, --email` (required), `--permissions`, `--package-name` + `--app-permissions`, `--expiration ` | At least one of `--permissions` or `--app-permissions` is required; `--package-name` and `--app-permissions` go together. The app grant is created right after the invitation. | | `users update` | `-e, --email` (required), `--permissions`, `--expiration ` | Replaces the account-wide permissions and/or sets a new (future) expiration. Per-app permissions use `users grant` / `users revoke`. | | `users delete` | `-e, --email` (required) | Removes the user. Destructive (CI-guarded). | | `invitations cancel` | `-e, --email` (required) | Only for users who have not accepted yet; otherwise use `users delete`. Destructive (CI-guarded). | | `users grant` | `-e, --email` (required), `--package-name` (`GOOGLE_PACKAGE_NAME` / project), `--permissions` (required) | Creates the app grant, or replaces its permissions if the user already has one. The user must exist (invite first). | | `users revoke` | `-e, --email` (required), `--package-name` | Removes the user's grant for that app. Destructive (CI-guarded). | ```bash appitool google users list appitool google users invite -e dev@example.com --package-name com.example.app --app-permissions can-access-app,can-manage-track-apks appitool google users grant -e dev@example.com --permissions can-access-app,can-reply-to-reviews appitool google users update -e dev@example.com --expiration 2027-01-01T00:00:00Z appitool google invitations cancel -e dev@example.com ``` --- # `appitool firebase` Manages Firebase apps (iOS, Android, web), App Distribution releases and tester groups, Firebase Authentication user accounts, and Cloud Firestore collections and documents. > [!NOTE] > **CI Guard:** Destructive subcommands (`apps delete`, `users delete`, and `firestore delete`) accept [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions) (`--ci` / `--no-ci`) and are skipped as a no-op (exit code `0`) when running in CI mode. Pass `--no-ci` to force execution in CI. ## Synopsis ```bash appitool firebase [options] ``` ## Subcommands Summary | Domain | Subcommand | Description | |:---|:---|:---| | **Apps** | `apps list` | Lists the iOS, Android, and web apps registered in a Firebase project. | | | `apps create` | Registers an iOS, Android, or web app (reports the existing app if already registered). | | | `apps delete` | Removes an app (restorable for 30 days unless `--immediate`). | | | `fingerprints sync` | Adds the Play App Signing SHA-1/SHA-256 fingerprints to a Firebase Android app. | | **App Distribution** | `releases list` | Lists uploaded releases for a Firebase App ID. | | | `releases create` | Uploads an `.apk`, `.aab`, or `.ipa` binary, attaches notes, and distributes to groups/testers. | | | `releases update` | Updates release notes or distributes an existing release to tester groups/emails. | | | `groups list` | Lists tester groups registered in a Firebase project. | | | `groups create` | Creates a new tester group or retrieves an existing one by alias. | | **Authentication** | `users list` | Lists Firebase Auth users with search, anonymous filter, and pagination. | | | `users delete` | Deletes user(s) by UID, email, or bulk-deletes all anonymous users. | | | `users export` | Exports Firebase Auth users to a CSV file. | | **Cloud Firestore** | `firestore collections` | Lists root collection IDs or subcollections under a document path. | | | `firestore list` | Lists documents in a Firestore collection. | | | `firestore get` | Fetches a single Firestore document by path. | | | `firestore set` | Creates or updates a Firestore document (supports `--merge` and auto-ID creation). | | | `firestore delete` | Deletes a Firestore document by path (supports `--dry-run`). | | | `firestore query` | Runs structured queries with `--where`, `--order-by`, `--limit`, and `--all-descendants`. | --- ## Firebase Apps Commands Uses the Firebase Management API (`projects.searchApps`, `projects.{iosApps|androidApps|webApps}.create` / `.remove`, and `projects.androidApps.sha`). The service account needs a role that can manage Firebase apps in the project (e.g. Firebase Admin). ### `appitool firebase apps list` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions) (`-g, --google-key`, `--project`). Lists every app of the project grouped by platform, with display name, bundle ID / package name, and Firebase App ID (all pages). | Option / Flag | Default | Description | |:---|:---|:---| | `-p, --platform ` | all | Only list `ios`, `android`, or `web` apps. | | `--show-deleted` | `false` | Also list apps deleted within the last 30 days. | ```bash appitool firebase apps list -p ios ``` ### `appitool firebase apps create` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions). Registers an app in the project and waits for Firebase to finish creating it, then prints its Firebase App ID and the `.env` variable to set (`FIREBASE_IOS_APP_ID` / `FIREBASE_ANDROID_APP_ID`). If an app with the same platform and bundle ID / package name is already registered, it is reported instead of created. | Option | Default | Description | |:---|:---|:---| | `-p, --platform ` | **Required** | `ios`, `android`, or `web`. | | `-b, --bundle-id ` | `APPLE_BUNDLE_ID` / Xcode project | iOS bundle identifier (`-p ios` only). | | `--package-name ` | `GOOGLE_PACKAGE_NAME` / Android project | Android package name (`-p android` only). | | `-n, --name ` | — | Display name in Firebase (required for `-p web`). | | `--app-store-id ` | — | Apple ID of the app in the App Store (`-p ios` only). | | `--team-id ` | — | Apple Developer Team ID (`-p ios` only). | | `--sha1 ` | — | SHA-1 certificate fingerprint to register, colons optional (`-p android` only; repeatable). | | `--sha256 ` | — | SHA-256 certificate fingerprint to register, colons optional (`-p android` only; repeatable). | ```bash appitool firebase apps create -p ios -n "My App" appitool firebase apps create -p android --package-name com.example.app --sha1 16:00:71:... appitool firebase apps create -p web -n "My Web App" ``` ### `appitool firebase apps delete` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions) and [`GlobalCIOptions`](https://appitool.appibara.com/commands/overview#globalcioptions) (skipped in CI unless `--no-ci`). Removes an app from the project. By default the removal can be undone in the Firebase console for 30 days; `--immediate` deletes it permanently. The app is chosen explicitly (the `FIREBASE_*_APP_ID` variables are not used as defaults). | Option / Flag | Default | Description | |:---|:---|:---| | `--firebase-app-id ` | — | Firebase App ID of the app to remove. | | `-p, --platform ` | — | `ios`, `android`, or `web`; used instead of `--firebase-app-id` with one of the next three options. | | `-b, --bundle-id ` | — | iOS bundle identifier (`-p ios`). | | `--package-name ` | — | Android package name (`-p android`). | | `-n, --name ` | — | Display name of the web app (`-p web`). | | `--immediate` | `false` | Delete permanently right away instead of the 30-day restorable removal. | | `--dry-run` | `false` | Validate the removal with Firebase without removing the app. | ```bash appitool firebase apps delete -p android --package-name com.example.app --dry-run appitool firebase apps delete --firebase-app-id 1:123456789:ios:abc123 ``` ### `appitool firebase fingerprints sync` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions). The same service account key (`-g, --google-key` / `GOOGLE_KEY`) is used for Google Play and Firebase, so it needs release access to the app in Play Console and a Firebase role that can manage apps. Registers certificate fingerprints on a Firebase Android app (needed for Google Sign-In, Phone Auth, Dynamic/App Links, etc.): 1. Reads the Play App Signing certificates exactly like [`google signing-certs list`](https://appitool.appibara.com/commands/google#appitool-google-signing-certs-list) — the deployment certificate and the hybrid classical + post-quantum certificates — and takes the SHA-1 and SHA-256 of each. If an APK cannot be read, only the API's SHA-256 is used for that key. 2. Adds certificates from `-f, --file` (e.g. your upload or debug certificate) and fingerprints from `--sha1` / `--sha256`. 3. Compares with the app's registered fingerprints and adds the missing ones. Existing fingerprints are kept unless `--replace` is passed. The Firebase app is `--firebase-app-id`, else `FIREBASE_ANDROID_APP_ID`, else the Android app registered for the package name. Download a fresh `google-services.json` afterwards if your build embeds it. | Option / Flag | Default | Description | |:---|:---|:---| | `--firebase-app-id ` | `FIREBASE_ANDROID_APP_ID` / app for the package name | Firebase Android App ID. | | `--package-name ` | `GOOGLE_PACKAGE_NAME` / Android project | Android package name (Play lookup and app lookup). | | `--version-code ` | Highest version code on your tracks | Version code whose Play-generated APKs are read. | | `--play` / `--no-play` | `--play` | Read the Play App Signing certificates from Google Play. `--no-play` needs `-f`, `--sha1`, or `--sha256`. | | `-f, --file ` | — | Additional certificate file or folder to register (`.der`/`.cer`/`.crt`/`.pem`; repeatable). | | `--sha1 ` | — | Additional SHA-1 fingerprint (repeatable; colons optional). | | `--sha256 ` | — | Additional SHA-256 fingerprint (repeatable; colons optional). | | `--replace` | `false` | Also remove registered fingerprints that are not in the synced set. | | `--dry-run` | `false` | Show the changes without applying them. | ```bash # Add the Play App Signing fingerprints (deployment + hybrid) appitool firebase fingerprints sync # Also register the upload certificate, preview first appitool firebase fingerprints sync -f upload_cert.der --dry-run ``` --- ## App Distribution Commands All three release subcommands use [`FirebaseCredentialsOptions`](https://appitool.appibara.com/commands/overview#firebasecredentialsoptions) (`--firebase-app-id`, `-p, --platform`, `-g, --google-key`, `--project`). ### `appitool firebase releases list` Lists uploaded releases for a Firebase application (version, build, creation timestamp, release notes, and console URI). | Option | Default | Description | |:---|:---|:---| | `-l, --limit ` | `25` | Maximum number of releases to return (`1–100`). | | `--order-by ` | — | Ordering expression (e.g. `'createTime desc'`). | ```bash appitool firebase releases list --platform ios -l 10 ``` ### `appitool firebase releases create` Uploads an `.apk`, `.aab`, or `.ipa` binary to Firebase App Distribution, waits for processing, optionally attaches release notes, and distributes to tester groups/emails. | Option | Description | |:---|:---| | `--binary ` | Path to `.apk`, `.aab`, or `.ipa` binary (**Required**). | | `--release-notes ` | Release notes text for testers. | | `--test-groups ` | Comma-separated tester group aliases (e.g. `'internal,qa'`). Missing groups are created automatically before upload. | | `--tester-emails ` | Comma-separated tester email addresses. | ```bash appitool firebase releases create \ --platform android \ --binary ./app-release.apk \ --release-notes "QA build #42" \ --test-groups "internal,qa" ``` ### `appitool firebase releases update` Updates an existing Firebase App Distribution release by attaching new release notes and/or distributing to tester groups or emails. | Option | Description | |:---|:---| | `--release-id ` | Full release resource path (`projects/.../apps/.../releases/`) or short release ID (**Required**; `--firebase-app-id` is required if passing a short ID). | | `--release-notes ` | New release notes text to attach. | | `--test-groups ` | Comma-separated tester group aliases to distribute to. | | `--tester-emails ` | Comma-separated tester emails to distribute to. | ```bash appitool firebase releases update \ --platform ios \ --release-id 1a2b3c4d5e \ --release-notes "Updated notes" \ --test-groups "internal" ``` ### `appitool firebase groups list` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions) (`-g, --google-key`, `--project`). Lists tester groups registered in a Firebase project with alias, tester count, and release count. | Option | Default | Description | |:---|:---|:---| | `-l, --limit ` | `25` | Maximum number of groups to return (`1–1000`). | ### `appitool firebase groups create` Uses [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions). Creates a new tester group (or returns the existing group if the alias already exists). | Option | Default | Description | |:---|:---|:---| | `--alias ` | **Required** | Unique alias/ID for the group (e.g. `internal`, `qa-team`). | | `-n, --name ` | `` | Human-readable display name (e.g. `'Internal Testers'`). | ```bash appitool firebase groups create --alias qa-team -n "QA Team" ``` --- ## Firebase Authentication Commands All user management subcommands use [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions) (`-g, --google-key`, `--project`). ### `appitool firebase users list` Lists Firebase Authentication users with optional exact/partial search by email or UID, anonymous filtering, and pagination token support. | Option | Default | Description | |:---|:---|:---| | `-l, --limit ` | `100` | Maximum number of users to return. | | `--search ` | — | Search users by email or UID (attempts fast exact lookup on page 1 before paginated scan). | | `--anonymous ` | `all` | Filter by anonymous status: `all`, `only`, or `exclude`. | | `--page-token ` | — | Pagination token printed at the end of the previous page output. | ```bash # List up to 50 non-anonymous users appitool firebase users list -l 50 --anonymous exclude # Search for a user by email appitool firebase users list --search user@example.com ``` ### `appitool firebase users delete` Deletes Firebase Authentication user(s) by UID, by email lookup, or deletes all anonymous accounts in batches of 500. | Option / Flag | Default | Description | |:---|:---|:---| | `--uid ` | — | UID (`localId`) of the user to delete. | | `-e, --email ` | — | Email address of the user to look up and delete. | | `--anonymous` | `false` | Delete all anonymous users in the project (cannot be combined with `--uid` or `-e`). | | `--dry-run` | `false` | Preview matching user(s) without deleting them. | ```bash # Preview bulk anonymous user cleanup appitool firebase users delete --anonymous --dry-run # Delete a specific user by email appitool firebase users delete -e tester@example.com ``` ### `appitool firebase users export` Exports all Firebase Authentication users to a UTF-8 CSV file with columns: `uid,email,email_verified,display_name,phone_number,photo_url,is_anonymous,disabled,providers,created_at,last_login_at`. | Option | Default | Description | |:---|:---|:---| | `--anonymous ` | `all` | Filter exported users: `all`, `only`, or `exclude`. | | `-o, --output ` | `firebase_users_.csv` | Output CSV filename or path. | ```bash appitool firebase users export --anonymous exclude -o ./exports/users.csv ``` --- ## Cloud Firestore Commands All `appitool firebase firestore` subcommands use [`FirebaseProjectOptions`](https://appitool.appibara.com/commands/overview#firebaseprojectoptions) (`-g, --google-key`, `--project`) and `--database ` (defaults to `(default)`). > [!NOTE] > - **Project ID Resolution:** Firestore requires a string Google Cloud `project_id` resolved in order: `--project` → `FIREBASE_PROJECT_ID` / `GOOGLE_PROJECT_ID` → `project_id` embedded inside the `GOOGLE_KEY` Service Account JSON. > - **IAM Permissions:** The Service Account must hold `Cloud Datastore Viewer` (`roles/datastore.viewer`) for read-only commands (`collections`, `list`, `get`, `query`) or `Cloud Datastore User` (`roles/datastore.user`) for read/write/delete commands (`set`, `delete`). Service Account requests bypass client Firestore Security Rules. ### `appitool firebase firestore collections` Lists root collection IDs or subcollection IDs beneath a specific document path. | Option / Argument | Default | Description | |:---|:---|:---| | `` | — | Optional parent document path (even number of segments, e.g. `users/alice`). | | `-l, --limit ` | `100` | Maximum number of collection IDs to return. | | `--page-token ` | — | Pagination token to fetch the next page of collection IDs. | | `--json` | `false` | Output raw JSON. | ```bash appitool firebase firestore collections appitool firebase firestore collections users/alice --json ``` ### `appitool firebase firestore list` Lists documents in a Firestore collection. | Option / Argument | Default | Description | |:---|:---|:---| | `` | **Required** | Firestore collection path (odd number of segments, e.g. `users` or `users/alice/orders`). | | `-l, --limit ` | `50` | Maximum number of documents to return. | | `--order-by ` | — | Sort expression (e.g. `'createdAt desc'`). | | `--page-token ` | — | Pagination token to fetch the next page of documents. | | `--json` | `false` | Output raw JSON. | ```bash appitool firebase firestore list users -l 20 ``` ### `appitool firebase firestore get` Fetches a single Firestore document by path. | Option / Argument | Default | Description | |:---|:---|:---| | `` | **Required** | Firestore document path (even number of segments, e.g. `users/alice`). | | `--json` | `false` | Output raw JSON. | ```bash appitool firebase firestore get users/alice --json ``` ### `appitool firebase firestore set` Writes a document at a document path (`PATCH`, creating or overwriting) or creates a document with an auto-generated ID when given a collection path (`POST`). | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `` | **Required** | Document path (`users/alice`) or collection path (`users`). | | `--data ` | — | Inline JSON object string containing document fields (mutually exclusive with `-f`). | | `-f, --file ` | — | Path to a JSON file containing document fields (mutually exclusive with `--data`). | | `--merge` | `false` | Merge provided top-level fields using `updateMask.fieldPaths` (requires a document path). | | `--json` | `false` | Output raw JSON. | ```bash appitool firebase firestore set users/alice --data '{"role":"admin","active":true}' --merge appitool firebase firestore set logs -f ./event.json ``` ### `appitool firebase firestore delete` Deletes a Firestore document by path. | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `` | **Required** | Firestore document path (even number of segments, e.g. `users/alice`). | | `--dry-run` | `false` | Check whether the document exists without deleting it. | ```bash appitool firebase firestore delete users/alice --dry-run appitool firebase firestore delete users/alice ``` ### `appitool firebase firestore query` Runs a structured query (`:runQuery`) against a collection (or collection group when `--all-descendants` is set). | Option / Flag / Argument | Default | Description | |:---|:---|:---| | `` | **Required** | Firestore collection path (odd number of segments, e.g. `users` or `orders`). | | `-w, --where ` | — | Repeatable filter expression: ` `. Supported ``: `==`, `!=`, `<`, `<=`, `>`, `>=`, `array-contains`, `in`, `not-in`, `array-contains-any`. | | `--order-by ` | — | Repeatable sort clause (` [asc\|desc]`). | | `-l, --limit ` | `50` | Maximum number of documents to return. | | `--all-descendants` | `false` | Query across all descendant collections matching the final collection ID (collection group query). | | `--json` | `false` | Output raw JSON. | ```bash appitool firebase firestore query users \ -w 'active == true' \ -w 'age >= 18' \ --order-by 'age desc' \ -l 10 \ --json ``` --- # `appitool inspect` Inspects local iOS (Xcode) and Android (Gradle) project files in a workspace and prints resolved identifiers, versions, build numbers / version codes, targets, schemes, and product flavors. When `-s, --scheme` is omitted on iOS, all distributable schemes are inspected and listed; when `--flavor` is omitted on Android, all product flavors are listed with their effective application IDs, versions, and version codes. ## Synopsis ```bash appitool inspect [options] ``` ## Options & Flags | Option / Flag | Default | Description | |:---|:---|:---| | `-p, --platform ` | `all` | Platform to inspect: `all`, `ios`, or `android`. | | `--workspace-name ` | Auto-detected | Custom Xcode workspace or project name. | | `-s, --scheme ` | All distributable schemes | Specific Xcode scheme name to inspect (omit to list every distributable scheme). | | `-c, --configuration ` | Auto-inferred | Xcode build configuration (e.g., `Debug`, `Release`). | | `--flavor ` | All product flavors | Specific Android product flavor to resolve (omit to list all `productFlavors` with resolved overrides). | | `--project-dir ` | Current directory | Path to the project root directory. | | `--json` | `false` | Output results as pretty-printed, key-sorted JSON (`ios.schemes[]`, `ios.version`, `ios.buildNumber`, `android.versionName`, `android.versionCode`, and resolved `android.flavors[]`). | ## Examples ```bash # Inspect all iOS schemes and all Android flavors (including versions and build numbers) appitool inspect # Inspect a single iOS scheme as JSON appitool inspect -p ios -s MyApp -c Release --json # Inspect Android metadata filtered to a single product flavor appitool inspect -p android --flavor staging # Inspect a project located in another directory appitool inspect --project-dir ~/projects/my-mobile-app ``` --- # `appitool clean` Scans `~/.appitool/ios` and `~/.appitool/android` and deletes previously built archives (`.xcarchive`, `.ipa`, `.aab`, `.apk`), optional Xcode DerivedData directories, and (with `--assets`) downloaded store assets under `~/.appitool/assets` (plus the legacy `~/.appitool/screenshots` folder used by older versions). System folders such as `~/.appitool/android/keystores` and `tmp` are preserved, and asset folders are only touched with `--assets`. ## Synopsis ```bash appitool clean [options] ``` ## Options & Flags | Option / Flag | Default | Description | |:---|:---|:---| | `-p, --platform ` | `all` | Platform to clean: `ios`, `android`, or `all`. | | `--dd, --derived-data` | `false` | Also clean Xcode `derivedData` directories under `~/.appitool/ios//derivedData`. | | `--ddo, --derived-data-only` | `false` | Only clean Xcode `derivedData` directories without deleting build archives. | | `--assets` | `false` | Also clean downloaded store assets (screenshots, header/search images, Google Play graphics, their sync manifests, and downloaded `metadata/` text files) under `~/.appitool/assets///` and the legacy `~/.appitool/screenshots///` (removed once empty). A custom `STORE_ASSETS_PATH` folder is never cleaned (it usually lives in your project). `-p ios` limits it to `apple`, `-p android` to `google`, `all` cleans every store folder. Combined with `--ddo`, cleans derived data and assets but no build archives. | | `--dry-run` | `false` | Scan and display items with disk sizes without deleting anything. | ## Examples ```bash # Preview all build artifacts and Xcode DerivedData that would be removed appitool clean --derived-data --dry-run # Delete all iOS and Android build artifacts (keeps DerivedData) appitool clean # Delete only Xcode DerivedData directories appitool clean --ddo # Clean only Android build outputs appitool clean -p android # Preview build artifacts plus downloaded App Store assets for iOS appitool clean -p ios --assets --dry-run ``` --- # `appitool notes` Generates categorized Markdown release notes from Git commit history between two tags or revisions (`git log --no-merges`). ## How Commits Are Categorized `GenerateReleaseNotesTask` parses Conventional Commit prefixes (`type(scope): description`): - `feat` → **`### 🚀 Features`** - `fix` → **`### 🐛 Bug Fixes`** - All other commit types / non-conventional commits → **`### 🔧 Other Changes`** Within each category, scoped commits are grouped under `* ****:`, and commit hashes are automatically formatted as clickable Markdown links when `remote.origin.url` resolves to an HTTP/HTTPS/SSH Git host (e.g. `([#abc1234](https://github.com/org/repo/commit/abc1234))`). ## Synopsis ```bash appitool notes [options] ``` ## Options | Option | Default | Description | |:---|:---|:---| | `--from ` | Latest Git tag at or before `--to` (or last 20 commits if untagged) | Starting Git tag or commit reference (exclusive). If omitted and `--to` (or `HEAD`) already sits on a matching tag, no commits are returned; pass `--from` explicitly to inspect a tagged release. | | `--to ` | `HEAD` | Ending Git tag or commit reference (inclusive). | | `--tag-prefix ` | — | Filter auto-detected tags by prefix when `--from` is omitted (e.g. `v`, `ios-v`, `android-`). | | `-o, --output ` | Print to stdout | File path to write the generated Markdown release notes. | ## Examples ```bash # Auto-detect commits since the latest Git tag (or last 20 commits if untagged) appitool notes # Auto-detect commits since the latest iOS-prefixed tag (e.g. ios-v1.2.0..HEAD) appitool notes --tag-prefix ios-v # Print release notes from v0.8.0 to HEAD appitool notes --from v0.8.0 # Generate notes between two tags and save to CHANGELOG_DRAFT.md appitool notes --from v0.8.0 --to v0.9.0 -o CHANGELOG_DRAFT.md ``` --- # `appitool kokono` Dispatches a push notification to a KokoNo webhook endpoint (`?token=`), with optional end-to-end (E2E) encryption. ## End-to-End Encryption & Keypair Isolation - When an E2E public key is resolved (Base64-encoded 32-byte Curve25519 / X25519 public key), `NotifyTask` encrypts both `title` and `message` using an ephemeral X25519 key pair + `HKDF-SHA256` (`salt: "kokono-salt-v1"`, `info: "kokono-info-v1"`) + `AES-256-GCM`. - Messages longer than 250 characters are truncated with `...`. - **Per-URL Keypair Isolation**: If `--url` is explicitly passed on the command line, `appitool kokono` will **not** fall back to `KOKONO_E2E_PUBLIC_KEY` from `.env`—you must also pass `--e2e` explicitly if you want encryption for that custom URL. ## Synopsis ```bash appitool kokono -m [options] ``` ## Options | Option | Default / `.env` Fallback | Description | |:---|:---|:---| | `--title ` | `appitool` | Notification title. | | `-m, --message <message>` | **Required** | Notification message body. | | `--url <url>` | `KOKONO_URL` | KokoNo notification webhook URL (`https://kokono.me/notify?token=...`). | | `--e2e <public-key>` | `KOKONO_E2E_PUBLIC_KEY` (when `--url` is omitted) | Base64 X25519 public key for E2E encryption. | ## Examples ```bash # Send plain notification using KOKONO_URL from .env appitool kokono -m "Release v0.9.0 deployed to TestFlight." # Send E2E encrypted notification with explicit title appitool kokono --title "CI Alert" -m "Build #128 succeeded." --e2e "<base64_x25519_public_key>" ``` --- <!-- source: commands/slack.md --> # `appitool slack` Sends a message to Slack using either an incoming webhook or a bot token. The bold title and message go in the top-level `text`; a colored attachment (green for `success` / red for `failure`) carries the status bar and footer. ## Formatting & Mentions `--title` and `--message` are sent unescaped as Slack [mrkdwn](https://docs.slack.dev/messaging/formatting-message-text), so Slack's syntax is parsed and the text is used for mobile notifications: | Syntax | Result | |:---|:---| | `*bold*`, `_italic_`, `~strike~`, `` `code` ``, `> quote` | Text styling | | `<https://example.com\|label>` | Link with label | | `<@U0123456789>` | User mention (notifies only members of the channel) | | `<#C0123456789>` | Channel link | | `<!here>`, `<!channel>`, `<!everyone>` | Special mentions | | `<!subteam^S0123456789>` | User group mention | | `<!date^1700000000^{date_short}\|fallback>` | Localized date | Mentions use IDs, not display names. Write a literal `&`, `<`, or `>` as `&`, `<`, `>`. In `flow` notifications, title and message are escaped and shown literally instead. ## Delivery Modes | Mode | Credentials | Channel | Threads | |:---|:---|:---|:---| | Incoming webhook | `--url` / `SLACK_URL` | Fixed by the webhook | No | | Bot token (`chat.postMessage`) | `--token` / `SLACK_BOT_TOKEN` (`xoxb-…`, `chat:write` scope) | `--channel` / `SLACK_CHANNEL` (ID or name) | `--thread-ts` | ## Destination Resolution 1. `--url` and `--token` together is an error. 2. `--token` → bot token mode. 3. `--url` → webhook mode (never falls back to `SLACK_BOT_TOKEN`). 4. Otherwise `SLACK_BOT_TOKEN` (bot token mode) takes precedence over `SLACK_URL` (webhook mode). In bot token mode a channel is required. `--channel` and `--thread-ts` are rejected in webhook mode. The bot must be a member of the channel (or have the `chat:write.public` scope for public channels). On success, the posted message's `ts` is printed so you can reply to it with `--thread-ts`. ## Synopsis ```bash appitool slack -m <message> [options] ``` ## Options | Option | Default / `.env` Fallback | Description | |:---|:---|:---| | `--title <title>` | `appitool` | Bold first line of the message (mrkdwn, sent as-is). | | `-m, --message <message>` | **Required** | Message text (Slack mrkdwn, sent as-is). | | `--status <status>` | `success` | Attachment color: `success` (green) or `failure` (red). | | `--url <url>` | `SLACK_URL` | Slack incoming webhook URL. | | `--token <token>` | `SLACK_BOT_TOKEN` (when `--url` is omitted) | Slack bot token (`xoxb-…`). | | `--channel <channel>` | `SLACK_CHANNEL` | Channel ID or name (bot token only). | | `--thread-ts <ts>` | — | Parent message `ts` to reply in a thread (bot token only). | ## Examples ```bash # Webhook, using SLACK_URL from .env appitool slack -m "Release v1.2.0 deployed to TestFlight." # Mention a user and the channel's active members appitool slack -m "<!here> *v1.2.0* is live. Thanks <@U0123456789>!" # Bot token to a specific channel appitool slack --token "xoxb-…" --channel C0123456789 --title "CI" -m "Build #128 failed." --status failure # Reply in a thread (ts printed by a previous bot token send) appitool slack --channel C0123456789 --thread-ts 1700000000.000100 -m "Retry succeeded." ``` --- <!-- source: commands/self-update.md --> # `appitool self-update` Checks GitHub Releases (`appibara-ltd/appitool`) for a newer semantic version and upgrades the currently running `appitool` binary in place after verifying its SHA256 checksum against `checksums.txt` and its GitHub build provenance attestation (with [sigstore-swift](https://github.com/appibara-ltd/sigstore-swift), cross-checked with the GitHub CLI `gh` when it is installed). ## How It Works 1. Queries `https://api.github.com/repos/appibara-ltd/appitool/releases/latest`. 2. Compares the remote tag (`SemanticVersion`) against the running binary's version. 3. Selects the matching archive for the current OS & CPU architecture: - `appitool-darwin-arm64.tar.gz` (or `universal`) - `appitool-linux-x86_64.tar.gz` / `appitool-linux-arm64.tar.gz` 4. Downloads the archive and `checksums.txt` and verifies the SHA256 digest. 5. **Build provenance:** fetches the archive's Sigstore attestation bundles from the public attestations API (`/repos/appibara-ltd/appitool/attestations/sha256:<digest>`; no `gh auth login` required). This proves the archive was built by the release workflow, not just uploaded to the release. - **sigstore-swift (always):** at least one bundle must verify against Sigstore's trusted root, fetched over TUF (public-good from `tuf-repo-cdn.sigstore.dev`, or GitHub's instance from `tuf-repo.github.com` with the TUF root embedded in appitool, the same one `gh` ships). TUF metadata is cached in `~/.sigstore/root` for one day. The bundle must be an SLSA v1 provenance statement for the archive's SHA256 digest, signed by `https://github.com/appibara-ltd/appitool/.github/workflows/release.yml@…` (issuer `https://token.actions.githubusercontent.com`, source repository `https://github.com/appibara-ltd/appitool`). A missing or invalid attestation, or an unreachable TUF repository, aborts the update. - **`gh` cross-check (when installed):** if `gh` is found on `PATH` (or in `/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin`, `/bin`), also runs `gh attestation verify --bundle … --repo appibara-ltd/appitool --signer-workflow appibara-ltd/appitool/.github/workflows/release.yml`. If `gh` rejects what sigstore-swift accepted, the update is aborted as a disagreement. Without `gh` the cross-check is skipped with a notice. 6. Extracts `appitool` and atomically swaps the executable (with rollback on failure), then creates or updates the `aptl` symlink next to it (skipping with a warning if a non-symlink file or a symlink to another tool already exists there). Running `self-update` without `--check` also ensures the `aptl` symlink when already up to date and the install directory is writable. To run the build provenance check on an archive you downloaded yourself, use [`appitool attestation verify`](https://appitool.appibara.com/commands/attestation#appitool-attestation-verify). > [!TIP] > If you hit GitHub API rate limits (e.g., in CI or shared networks), export `GITHUB_TOKEN` (or `GH_TOKEN`) or configure `GITHUB_TOKEN` in `.env`. ## Synopsis ```bash appitool self-update [options] ``` ## Flags | Flag | Default | Description | |:---|:---|:---| | `--check` | `false` | Check whether an update is available without downloading or installing. | | `--force` | `false` | Force download and re-installation even if already on the latest version. | | `--skip-attestation` | `false` | Skip the GitHub build provenance check (sigstore-swift and the `gh` cross-check); the SHA256 checksum is still verified. | ## Examples ```bash # Check if a newer release exists appitool self-update --check # Upgrade to the latest release appitool self-update # Force reinstall (use sudo if installed into a root-owned /usr/local/bin) sudo appitool self-update --force # Update without the build provenance check appitool self-update --skip-attestation ``` --- <!-- source: commands/attestation.md --> # `appitool attestation` Verifies build provenance attestations and manages the keys that sign them: the private key that [`flow --attest --attest-key`](https://appitool.appibara.com/commands/flow#signing-with-a-private-key-attest-key) signs with, and the public key that [`attestation verify --key`](#key-signed-attestations) checks against. ## Synopsis ```bash appitool attestation verify -f <file> [options] appitool attestation keys create [options] ``` --- ## `appitool attestation verify` Verifies any file's GitHub artifact attestation with [sigstore-swift](https://github.com/appibara-ltd/sigstore-swift). `--repo`, `--signer-workflow`, and `--predicate-type` set which repository, signing workflow, and predicate type the attestation must come from. Their defaults match `appitool`'s own release attestations, so with no options the command checks an `appitool` release archive (e.g. `appitool-darwin-arm64.tar.gz`) the same way [`self-update`](https://appitool.appibara.com/commands/self-update) does before installing. Unlike `self-update`, `attestation verify` does not cross-check with the GitHub CLI. To cross-check, run `gh attestation verify` yourself (see [Examples](#examples)). ### How It Works 1. Computes the file's SHA256 digest. 2. Fetches the attestation bundles for that digest from the repository's public attestations API (`/repos/<repo>/attestations/sha256:<digest>`; no `gh auth login` required for public repositories), or reads them from `--bundle`. 3. At least one bundle must verify against Sigstore's trusted root, fetched over TUF (public-good, or GitHub's instance with the TUF root embedded in appitool). TUF metadata is cached in `~/.sigstore/root` for one day. The bundle must: - be an in-toto statement for the file's digest with the `--predicate-type` predicate (default SLSA provenance v1, `https://slsa.dev/provenance/v1`); - be signed in GitHub Actions (issuer `https://token.actions.githubusercontent.com`) by the `--signer-workflow` workflow (certificate SAN `https://github.com/<signer-workflow>@…`; default `<repo>/.github/workflows/release.yml`); - come from `--repo` (certificate source repository `https://github.com/<repo>` and owner `https://github.com/<owner>`). 4. With `--build-type`, `--bundle-id`, `--package-name`, or `--distribution`, the verified SLSA provenance must also say what was built (see [Checking what was built](#checking-what-was-built)). The command exits with a non-zero status when the file has no attestation, no attestation verifies, or a TUF repository is unreachable. > [!NOTE] > Only files the signing workflow attested verify. appitool's release workflow attests the `appitool-*.tar.gz` archives only, so `checksums.txt`, `install.sh`, and the extracted binary do not. > [!TIP] > If you hit GitHub API rate limits, or the repository is private, export `GITHUB_TOKEN` (or `GH_TOKEN`) or configure `GITHUB_TOKEN` in `.env`. ### Options | Option | Default | Description | |:---|:---|:---| | `-f, --file <path>` | **Required** | Path to the file to verify. | | `--bundle <path>` | — | Sigstore bundle file (one JSON document or JSON Lines) to verify instead of fetching the file's attestations from GitHub, e.g. from `gh attestation download`. | | `--repo <owner/name>` | `appibara-ltd/appitool` | Repository the file must have been built from; attestations are fetched from it. | | `--signer-workflow <workflow>` | `<repo>/.github/workflows/release.yml` | Workflow that must have signed the attestation, as `owner/repo/.github/workflows/<file>.yml` (a `github.com/` or `https://github.com/` prefix and an `@ref` suffix are accepted and ignored). | | `--predicate-type <uri>` | `https://slsa.dev/provenance/v1` | In-toto predicate type the attestation must have. | | `--build-type <uri>` | — | Build type (`buildDefinition.buildType`) the SLSA provenance must have. Implied by `--bundle-id` and `--package-name`. | | `-b, --bundle-id <id>` | — | Bundle ID the provenance must name; implies the appitool iOS build type. | | `--package-name <name>` | — | Package name the provenance must name; implies the appitool Android build type. | | `-d, --distribution <method>` | — | Distribution the provenance must name: `adhoc`, `development`, or `appstore`. Needs an appitool build type. | | `--key <key>` | — | ECDSA P-256 public key (file path, Base64, or inline PEM as `--key=<pem>`) the attestation must be signed with, as made by `flow --attest --attest-key`. Needs `--bundle`; `--repo` and `--signer-workflow` are not checked. See [Key-signed attestations](#key-signed-attestations). | ### Key-signed attestations `appitool flow --attest --attest-key` signs with a private key instead of a GitHub Actions certificate. Verify those with `--key` and the matching public key: the bundle must be signed by that key, carry an RFC 3161 timestamp that verifies against Sigstore's public trusted root, and be an attestation for the file's sha256 with the `--predicate-type` predicate. These attestations are not stored on GitHub, so `--bundle` is required, and there is no workflow certificate, so `--repo` and `--signer-workflow` do not apply. The provenance options below work the same way. ### Checking what was built The provenance options check the contents of the SLSA provenance, after its signature and signer have verified: - `buildDefinition.buildType` must equal `--build-type`. `-b, --bundle-id` implies the appitool iOS build type (`https://appitool.appibara.com/buildtypes/ios/v1`) and `--package-name` the Android one (`https://appitool.appibara.com/buildtypes/android/v1`). - `buildDefinition.externalParameters` must name the given `bundleId` / `packageName` and `distribution`, as strings. - For appitool's build types, external parameters their spec does not define are rejected. `--bundle-id` and `--package-name` cannot be combined, a `--build-type` must match the one they imply, `--distribution` needs an appitool build type, and these options require the SLSA provenance predicate type. The build types are specified in [appitool iOS build type, v1](https://appitool.appibara.com/buildtypes/ios/v1) and [appitool Android build type, v1](https://appitool.appibara.com/buildtypes/android/v1). ### Examples ```bash # Verify a downloaded appitool release archive appitool attestation verify -f ~/Downloads/appitool-darwin-arm64.tar.gz # Verify against a bundle file saved with `gh attestation download` appitool attestation verify -f appitool-linux-x86_64.tar.gz --bundle sha256:<digest>.jsonl # Verify another project's artifact, signed by its build workflow appitool attestation verify -f tool.zip --repo octo-org/octo-tool --signer-workflow octo-org/octo-tool/.github/workflows/build.yml # Verify that an IPA was built by appitool for com.acme.myapp, for the App Store, by acme/myapp's CI appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --repo acme/myapp \ --signer-workflow acme/myapp/.github/workflows/release.yml -b com.acme.myapp -d appstore # Verify a key-signed attestation (flow --attest --attest-key) appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --key attest-key.pub.pem -b com.acme.myapp -d adhoc # Check any other build type appitool attestation verify -f tool.zip --repo octo-org/octo-tool --build-type https://actions.github.io/buildtypes/workflow/v1 # Cross-check an appitool release archive with the GitHub CLI gh attestation verify appitool-darwin-arm64.tar.gz --repo appibara-ltd/appitool --signer-workflow appibara-ltd/appitool/.github/workflows/release.yml ``` --- ## `appitool attestation keys create` Creates an ECDSA P-256 key pair with swift-crypto (no OpenSSL needed): - `<name>.pem`: the private key (PKCS #8 PEM), written with mode `600` so only you can read it. Keep it secret: store it as a CI secret such as `APPITOOL_ATTEST_KEY` and never commit it. - `<name>.pub.pem`: the public key, which you share with whoever verifies your attestations. The command also prints the public key and its hint, the value bundles signed with this key carry in `verificationMaterial.publicKey.hint`. It never uploads the key anywhere. ### Options | Option | Default | Description | |:---|:---|:---| | `-o, --output <dir>` | `.` | Directory to write the key files to (created if missing). | | `-n, --name <name>` | `attest-key` | Base name of the key files: `<name>.pem` and `<name>.pub.pem`. | | `--force` | `false` | Overwrite existing key files. Without it, the command fails if either file exists. | ### Examples ```bash # Create attest-key.pem and attest-key.pub.pem in ./keys appitool attestation keys create -o ./keys # Store the private key as a GitHub Actions secret, then delete the local copy gh secret set APPITOOL_ATTEST_KEY < ./keys/attest-key.pem rm ./keys/attest-key.pem # Verify an attestation signed with it appitool attestation verify -f MyApp.ipa --bundle MyApp.ipa.sigstore.json --key ./keys/attest-key.pub.pem -b com.acme.myapp -d adhoc ``` --- <!-- source: commands/skills.md --> # `appitool skills` Installs the appitool agent skill: a short `SKILL.md` (Agent Skills format) that tells coding agents how to use appitool. It points them to `appitool <command> -h` and to these docs (`llms.txt` and the command pages) instead of repeating them, so even small, fast models use the right commands, options, and safety steps. ## Synopsis ```bash appitool skills install [options] ``` --- ## `appitool skills install` Writes the skill once and makes it visible to every agent: | Path | Read by | |:---|:---| | `.agents/skills/appitool/SKILL.md` | Agents that use the shared `.agents/skills/` folder, such as Codex and Cursor | | `.claude/skills/appitool` → `../../.agents/skills/appitool` | Claude Code, which reads only `.claude/skills/`. The link is relative, so it keeps working when the project is committed and cloned. | If something already exists at `.claude/skills/appitool` (a folder, a file, or a symlink pointing elsewhere), it is never replaced, even with `--force`; the command reports it and Claude Code keeps using it. A link that already points to the skill is kept as is. The skill text is built into the binary, so it always matches the installed appitool version. The same file is published at [`/skills/appitool/SKILL.md`](https://appitool.appibara.com/skills/appitool/SKILL.md) for copying by hand. ### Options | Option | Default | Description | |:---|:---|:---| | `--project-dir <path>` | current directory | Project folder that gets `.agents/` and `.claude/`. | | `--global` | `false` | Install for your user instead: `~/.agents/skills/appitool/SKILL.md` and `~/.claude/skills/appitool`. Cannot be combined with `--project-dir`. | | `--force` | `false` | Overwrite an existing `.agents/skills/appitool/SKILL.md` (for example after updating appitool). Without it, the command fails if the file exists. | ### Examples ```bash # Add the skill to the current project, then commit it appitool skills install git add .agents/skills/appitool .claude/skills/appitool # Install for every project on this machine appitool skills install --global # Refresh the skill after updating appitool appitool skills install --force ``` --- <!-- source: buildtypes/ios/v1.md --> # appitool iOS build type, v1 **Build type URI:** `https://appitool.appibara.com/buildtypes/ios/v1` **Status:** Stable. Emitted by [`appitool flow ios --attest`](https://appitool.appibara.com/commands/flow#build-provenance-attest); changes follow [Versioning](#versioning). **Predicate type:** [SLSA Provenance v1](https://slsa.dev/spec/v1.0/provenance) (`https://slsa.dev/provenance/v1`) This build type describes an iOS app archive (`.ipa`) built and exported by [appitool](https://github.com/appibara-ltd/appitool) with `appitool flow ios`. A provenance statement with this `buildType` says: *this IPA was built by appitool, from this source, with these parameters, by this builder.* The statement is signed with [Sigstore](https://www.sigstore.dev) and stored as a Sigstore bundle (for example `MyApp.ipa.sigstore.json`). It is separate from Apple code signing: the IPA keeps its Apple signature, and this attestation describes how the IPA was produced. --- ## Subject - The exported `.ipa` is the first subject. `name` is its file name; `digest` holds its `sha256`. - When appitool exports debug symbols, the `.dSYM.zip` may be a second subject, in the same form. - Digests are of the final files, after Apple code signing and export. --- ## External parameters Inputs chosen by whoever started the build. Verifiers should compare these with what they expect. Every field is a string unless noted. - **`command`** (required): always `flow ios`. - **`distribution`** (required): `appstore`, `adhoc` or `development`, as given to `-d, --distribution`. - **`bundleId`** (required): the app's bundle identifier, given with `-b, --bundle-id` or detected from the Xcode project. - **`scheme`** (required): the Xcode scheme built, given with `-s, --scheme` or inferred. - **`configuration`** (required): the build configuration, for example `Release`, given with `-c, --configuration` or inferred. - **`source`** (required, object): the source that was built. - **`repository`** (required): the repository URL, for example `https://github.com/acme/myapp`. - **`ref`** (optional): the git ref that was checked out, for example `refs/tags/v1.2.0` or `refs/heads/main`. External parameters never contain credentials: no App Store Connect keys, Match passwords, git tokens or webhook URLs. --- ## Internal parameters Values appitool derived during the build. They are informational: useful for auditing and reproducing a build, but verifiers should not base trust decisions on them. - **`version`** (required): the marketing version (`CFBundleShortVersionString`). - **`buildNumber`** (required): the build number appitool assigned (`CFBundleVersion`), computed as the latest remote build number or the project's, whichever is higher, plus one. - **`exportMethod`** (required): the Xcode export method: `app-store-connect`, `release-testing` or `debugging`. - **`teamId`** (optional): the Apple Developer Team ID that signed the archive. - **`xcodeVersion`** (optional): the Xcode version used, for example `26.1`. - **`releaseTag`** (optional): the git tag appitool creates for the release, for example `🍏_1.2.0_42`. --- ## Resolved dependencies Each entry is an in-toto resource descriptor. 1. **Source** (required): the commit that was built. - `uri`: `git+<repository>@<ref>`, for example `git+https://github.com/acme/myapp@refs/tags/v1.2.0`. - `digest`: `{ "gitCommit": "<40-character commit SHA>" }`. 2. **appitool** (required): the appitool that ran the build. - `name`: `appitool`. - `uri`: `https://github.com/appibara-ltd/appitool/releases/tag/v<version>`, for example `https://github.com/appibara-ltd/appitool/releases/tag/v0.11.10`. - `digest` (optional): `{ "sha256": "<SHA-256 of the appitool executable>" }`. The `uri` identifies the appitool release that ran the build. appitool's releases carry their own Sigstore-signed provenance, but it covers the release archives (`appitool-*.tar.gz`), not the extracted executable, so the executable's `sha256` identifies the binary that ran and cannot be checked against that provenance directly. --- ## Builder `runDetails.builder.id` names who ran the build and stands behind the statement. For keyless signing it must match the identity in the Sigstore signing certificate. - **Your own CI (GitHub Actions):** the workflow that ran appitool, `https://github.com/<owner>/<repo>/.github/workflows/<file>@<ref>`. The signing certificate is issued to that same workflow. This proves which repository's CI built the IPA. "Built with appitool" is that workflow's claim, which you can audit by reading the workflow file at that ref. - **Your own CI, signed with a private key (`--attest --attest-key`):** the same `builder.id`, but the bundle carries a public key instead of a certificate, and an RFC 3161 timestamp instead of a transparency log entry. The workflow named in `builder.id` is then the key holder's claim, not something the signature proves; verifiers trust whoever holds the key (`appitool attestation verify --key`). - **nativeflow build service:** `https://nativeflow.app/builder/v1`. nativeflow builds in an isolated job and signs with its own identity, so the statement is backed by nativeflow rather than by the app's own CI. `runDetails.metadata` should hold `invocationId` (for GitHub Actions, the run URL with its attempt), `startedOn` and `finishedOn`. --- ## Example ```json { "_type": "https://in-toto.io/Statement/v1", "subject": [ { "name": "MyApp.ipa", "digest": { "sha256": "9f2c…" } } ], "predicateType": "https://slsa.dev/provenance/v1", "predicate": { "buildDefinition": { "buildType": "https://appitool.appibara.com/buildtypes/ios/v1", "externalParameters": { "command": "flow ios", "distribution": "appstore", "bundleId": "com.acme.myapp", "scheme": "MyApp", "configuration": "Release", "source": { "repository": "https://github.com/acme/myapp", "ref": "refs/tags/v1.2.0" } }, "internalParameters": { "version": "1.2.0", "buildNumber": "42", "exportMethod": "app-store-connect", "teamId": "ABCDE12345", "xcodeVersion": "26.1", "releaseTag": "🍏_1.2.0_42" }, "resolvedDependencies": [ { "uri": "git+https://github.com/acme/myapp@refs/tags/v1.2.0", "digest": { "gitCommit": "a1b2c3…" } }, { "name": "appitool", "uri": "https://github.com/appibara-ltd/appitool/releases/tag/v0.11.10", "digest": { "sha256": "7e41…" } } ] }, "runDetails": { "builder": { "id": "https://github.com/acme/myapp/.github/workflows/release.yml@refs/tags/v1.2.0" }, "metadata": { "invocationId": "https://github.com/acme/myapp/actions/runs/123456789/attempts/1", "startedOn": "2026-11-30T10:00:00Z", "finishedOn": "2026-11-30T10:14:00Z" } } } } ``` --- ## Verifying A [JSON Schema](https://appitool.appibara.com/buildtypes/ios/v1.schema.json) for the external and internal parameters is published next to this page. 1. Verify the attestation with [`appitool attestation verify`](https://appitool.appibara.com/commands/attestation#appitool-attestation-verify), which uses [sigstore-swift](https://github.com/appibara-ltd/sigstore-swift): ```bash appitool attestation verify -f MyApp.ipa \ --bundle MyApp.ipa.sigstore.json \ --repo acme/myapp \ --signer-workflow acme/myapp/.github/workflows/release.yml \ -b com.acme.myapp -d appstore ``` This checks the Sigstore signature against Sigstore's trusted root, that the statement's subject is the file's sha256, that the predicate type is SLSA provenance v1, and that the signing certificate was issued to the given workflow in the given repository. `-b` also checks that `buildType` is `https://appitool.appibara.com/buildtypes/ios/v1`, and with `-d` that the external parameters name `bundleId` and `distribution`; external parameters this spec does not define are rejected. Without `--bundle`, appitool fetches the attestation from the repository's GitHub attestations instead. 2. Check any other external parameters you care about, such as `source.repository`. 3. Optionally, check that the appitool version in `resolvedDependencies` is one you trust. appitool's release archives can themselves be verified with `appitool attestation verify -f appitool-<platform>.tar.gz`. Any Sigstore verifier can check the signature and signer, for example `gh attestation verify MyApp.ipa --bundle MyApp.ipa.sigstore.json --repo acme/myapp --signer-workflow acme/myapp/.github/workflows/release.yml`; check `buildType` and the external parameters yourself afterwards. The App Store re-signs and encrypts apps before delivering them, so for `appstore` builds this attestation covers the IPA you built and uploaded, not the copy installed from the App Store. An IPA distributed directly (`adhoc` or `development`, for example through Firebase App Distribution) can be checked byte for byte. --- ## Versioning - This page describes `v1`, which is stable: the meaning of its fields will not change. - New optional fields may be added to the internal parameters of `v1`. - The external parameters of `v1` are fixed: verifiers should reject external parameters they do not recognise, so adding one requires a new version. - Renaming or removing a field, or changing what a field means, requires a new build type at `…/ios/v2`. This page stays online so older attestations can still be read. ## Changelog - **v1:** declared stable, with the same fields as the draft. - **v1 (draft):** first version. --- <!-- source: buildtypes/android/v1.md --> # appitool Android build type, v1 **Build type URI:** `https://appitool.appibara.com/buildtypes/android/v1` **Status:** Stable. Emitted by [`appitool flow android --attest`](https://appitool.appibara.com/commands/flow#build-provenance-attest); changes follow [Versioning](#versioning). **Predicate type:** [SLSA Provenance v1](https://slsa.dev/spec/v1.0/provenance) (`https://slsa.dev/provenance/v1`) This build type describes an Android app bundle (`.aab`) or APK (`.apk`) built by [appitool](https://github.com/appibara-ltd/appitool) with `appitool flow android`. A provenance statement with this `buildType` says: *this AAB or APK was built by appitool, from this source, with these parameters, by this builder.* The statement is signed with [Sigstore](https://www.sigstore.dev) and stored as a Sigstore bundle (for example `MyApp_release.aab.sigstore.json`). It is separate from Android app signing: the AAB or APK keeps its own signature, and this attestation describes how it was produced. --- ## Subject - The built `.aab` or `.apk` is the only subject. `name` is its file name; `digest` holds its `sha256`. - The digest is of the final file, after Gradle has signed it. --- ## External parameters Inputs chosen by whoever started the build. Verifiers should compare these with what they expect. Every field is a string unless noted. - **`command`** (required): always `flow android`. - **`distribution`** (required): `appstore`, `adhoc` or `development`, as given to `-d, --distribution`. - **`packageName`** (required): the app's package name, given with `--package-name` or detected from Gradle (the flavor's `applicationId` when a flavor is set). - **`format`** (required): `aab` or `apk`, as given to `--format` or defaulted (`aab` for `appstore`, `apk` otherwise). - **`flavor`** (optional): the Gradle product flavor, as given to `--flavor`. Absent when no flavor was used. - **`source`** (required, object): the source that was built. - **`repository`** (required): the repository URL, for example `https://github.com/acme/myapp`. - **`ref`** (optional): the git ref that was checked out, for example `refs/tags/v1.2.0` or `refs/heads/main`. External parameters never contain credentials: no Google service account keys, Match passwords, keystore passwords, git tokens or webhook URLs. --- ## Internal parameters Values appitool derived during the build. They are informational: useful for auditing and reproducing a build, but verifiers should not base trust decisions on them. - **`versionName`** (required): the app's `versionName`. - **`versionCode`** (required): the `versionCode` appitool assigned, computed as the latest remote version code or the project's, whichever is higher, plus one. - **`buildType`** (required): the Gradle build type, `release` (for `appstore` and `adhoc`) or `debug` (for `development`). - **`gradleTask`** (required): the Gradle task that produced the subject, for example `bundleRelease` or `assembleProductionRelease`. - **`signing`** (required): how the subject was signed: `match` (the release keystore from appitool Match) or `gradle` (the project's own Gradle signing config, as used for debug builds). - **`releaseTag`** (optional): the git tag appitool creates for the release, for example `🤖_1.2.0_42`. --- ## Resolved dependencies Each entry is an in-toto resource descriptor. 1. **Source** (required): the commit that was built. - `uri`: `git+<repository>@<ref>`, for example `git+https://github.com/acme/myapp@refs/tags/v1.2.0`. - `digest`: `{ "gitCommit": "<40-character commit SHA>" }`. 2. **appitool** (required): the appitool that ran the build. - `name`: `appitool`. - `uri`: `https://github.com/appibara-ltd/appitool/releases/tag/v<version>`, for example `https://github.com/appibara-ltd/appitool/releases/tag/v0.11.10`. - `digest` (optional): `{ "sha256": "<SHA-256 of the appitool executable>" }`. The `uri` identifies the appitool release that ran the build. appitool's releases carry their own Sigstore-signed provenance, but it covers the release archives (`appitool-*.tar.gz`), not the extracted executable, so the executable's `sha256` identifies the binary that ran and cannot be checked against that provenance directly. --- ## Builder `runDetails.builder.id` names who ran the build and stands behind the statement. For keyless signing it must match the identity in the Sigstore signing certificate. - **Your own CI (GitHub Actions):** the workflow that ran appitool, `https://github.com/<owner>/<repo>/.github/workflows/<file>@<ref>`. The signing certificate is issued to that same workflow. This proves which repository's CI built the app. "Built with appitool" is that workflow's claim, which you can audit by reading the workflow file at that ref. - **Your own CI, signed with a private key (`--attest --attest-key`):** the same `builder.id`, but the bundle carries a public key instead of a certificate, and an RFC 3161 timestamp instead of a transparency log entry. The workflow named in `builder.id` is then the key holder's claim, not something the signature proves; verifiers trust whoever holds the key (`appitool attestation verify --key`). - **nativeflow build service:** `https://nativeflow.app/builder/v1`. nativeflow builds in an isolated job and signs with its own identity, so the statement is backed by nativeflow rather than by the app's own CI. `runDetails.metadata` should hold `invocationId` (for GitHub Actions, the run URL with its attempt), `startedOn` and `finishedOn`. --- ## Example ```json { "_type": "https://in-toto.io/Statement/v1", "subject": [ { "name": "MyApp_production_release.aab", "digest": { "sha256": "3c8d…" } } ], "predicateType": "https://slsa.dev/provenance/v1", "predicate": { "buildDefinition": { "buildType": "https://appitool.appibara.com/buildtypes/android/v1", "externalParameters": { "command": "flow android", "distribution": "appstore", "packageName": "com.acme.myapp", "format": "aab", "flavor": "production", "source": { "repository": "https://github.com/acme/myapp", "ref": "refs/tags/v1.2.0" } }, "internalParameters": { "versionName": "1.2.0", "versionCode": "42", "buildType": "release", "gradleTask": "bundleProductionRelease", "signing": "match", "releaseTag": "🤖_1.2.0_42" }, "resolvedDependencies": [ { "uri": "git+https://github.com/acme/myapp@refs/tags/v1.2.0", "digest": { "gitCommit": "a1b2c3…" } }, { "name": "appitool", "uri": "https://github.com/appibara-ltd/appitool/releases/tag/v0.11.10", "digest": { "sha256": "7e41…" } } ] }, "runDetails": { "builder": { "id": "https://github.com/acme/myapp/.github/workflows/release.yml@refs/tags/v1.2.0" }, "metadata": { "invocationId": "https://github.com/acme/myapp/actions/runs/123456789/attempts/1", "startedOn": "2026-11-30T10:00:00Z", "finishedOn": "2026-11-30T10:09:00Z" } } } } ``` --- ## Verifying A [JSON Schema](https://appitool.appibara.com/buildtypes/android/v1.schema.json) for the external and internal parameters is published next to this page. 1. Verify the attestation with [`appitool attestation verify`](https://appitool.appibara.com/commands/attestation#appitool-attestation-verify), which uses [sigstore-swift](https://github.com/appibara-ltd/sigstore-swift): ```bash appitool attestation verify -f MyApp_production_release.aab \ --bundle MyApp_production_release.aab.sigstore.json \ --repo acme/myapp \ --signer-workflow acme/myapp/.github/workflows/release.yml \ --package-name com.acme.myapp -d appstore ``` This checks the Sigstore signature against Sigstore's trusted root, that the statement's subject is the file's sha256, that the predicate type is SLSA provenance v1, and that the signing certificate was issued to the given workflow in the given repository. `--package-name` also checks that `buildType` is `https://appitool.appibara.com/buildtypes/android/v1`, and with `-d` that the external parameters name `packageName` and `distribution`; external parameters this spec does not define are rejected. Without `--bundle`, appitool fetches the attestation from the repository's GitHub attestations instead. 2. Check any other external parameters you care about, such as `source.repository`. 3. Optionally, check that the appitool version in `resolvedDependencies` is one you trust. appitool's release archives can themselves be verified with `appitool attestation verify -f appitool-<platform>.tar.gz`. Any Sigstore verifier can check the signature and signer, for example `gh attestation verify MyApp_production_release.aab --bundle MyApp_production_release.aab.sigstore.json --repo acme/myapp --signer-workflow acme/myapp/.github/workflows/release.yml`; check `buildType` and the external parameters yourself afterwards. Google Play re-signs and splits the uploaded AAB, so this attestation covers the file you built and uploaded, not the APKs Google Play delivers to devices. An APK distributed directly (for example through Firebase App Distribution) can be checked byte for byte. --- ## Versioning - This page describes `v1`, which is stable: the meaning of its fields will not change. - New optional fields may be added to the internal parameters of `v1`. - The external parameters of `v1` are fixed: verifiers should reject external parameters they do not recognise, so adding one requires a new version. - Renaming or removing a field, or changing what a field means, requires a new build type at `…/android/v2`. This page stays online so older attestations can still be read. ## Changelog - **v1:** declared stable, with the same fields as the draft. - **v1 (draft):** first version.