Skip to content

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.

IdentifierCLI Option.env VariableProject Detection
iOS bundle ID-b, --bundle-idAPPLE_BUNDLE_IDMain target bundle ID from the local Xcode project
Android package name--package-nameGOOGLE_PACKAGE_NAMEapplicationId / namespace from the local Android project
Firebase App ID--firebase-app-idFIREBASE_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 ​

VariableDescriptionExample / Default
APPLE_KEY_IDApp Store Connect API Key ID2X9R4HXF34
APPLE_ISSUER_IDApp Store Connect API Issuer UUID57246542-96fe-1a63-e053-0824d011072a
APPLE_KEYPath to .p8 file, raw PEM string, or Base64-encoded .p8./AuthKey_2X9R4HXF34.p8
APPLE_BUNDLE_IDDefault iOS bundle identifiercom.example.app
APPLE_TEAM_IDApple Developer Team ID (10-character alphanumeric)ABCDE12345

iOS xcodebuild Configuration ​

VariableDescriptionDefault / Behavior
XCODE_WORKSPACEPath to .xcworkspaceAuto-discovered in . or ios/
XCODE_PROJECTPath to .xcodeprojAuto-discovered in . or ios/
XCODE_SCHEMEXcode scheme name to buildAuto-inferred via xcodebuild -list -json
XCODE_CONFIGURATIONBuild configuration (Release or Debug)Release
XCODEBUILD_FORMATTERPipe formatter for xcodebuild outputxcbeautify --renderer github-actions

Google Play Developer API ​

VariableDescriptionExample / Default
GOOGLE_KEYPath to Service Account JSON, raw JSON string, or Base64 JSON./service-account.json
GOOGLE_PACKAGE_NAMETarget Android application package namecom.example.app
GOOGLE_PLAY_ACCOUNT_IDPlay Console account ID for google user commands: the number in play.google.com/console/developers/<id> (not the Google Cloud project, service account, or package name). --account-id overrides it.1234567890123456789

Store Assets (apple assets & google assets) ​

VariableDescriptionDefault / Behavior
STORE_ASSETS_PATHFolder 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: <path>/apple/<locale>/<type|metadata>/ and <path>/google/<locale>/<type|metadata>/ (no project folder, since the path is project-specific). -o, --output (download) and -f, --file (upload) still take precedence.Unset or empty: ~/.appitool/assets/<project>/<store>/
APPLE_REVIEW_DEMO_PASSWORDApp 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 ​

VariableDescriptionDefault / Behavior
ANDROID_PROJECT_DIRAndroid root directory containing gradlew./android if present, else .
ANDROID_FLAVORGradle product flavor (e.g., production, staging); fallback for build android --flavor and flow android --flavorNone
ANDROID_CONFIGURATIONBuild type (Release or Debug)Release
ANDROID_KEYSTORE_PATHPath to local .keystore / .jks fileNone
ANDROID_KEYSTOREBase64-encoded keystore content (decoded to temporary keystore)None
ANDROID_KEYSTORE_PASSWORDKeystore store passwordNone
ANDROID_KEY_ALIASKey alias inside keystoreNone
ANDROID_KEY_PASSWORDKey passwordNone

Firebase (App Distribution & Auth) ​

VariableDescriptionNotes
FIREBASE_IOS_APP_IDFirebase App ID for iOS (1:<project>:ios:<hash>)Used by check ios, flow ios -d adhoc, and firebase commands
FIREBASE_ANDROID_APP_IDFirebase App ID for Android (1:<project>:android:<hash>)Used by check android, flow android -d adhoc, and firebase commands
FIREBASE_PROJECT_IDFirebase / Google Cloud project ID or project numberFalls back to GOOGLE_PROJECT_ID or project number parsed from FIREBASE_*_APP_ID
GOOGLE_PROJECT_IDFallback Google Cloud project ID when FIREBASE_PROJECT_ID is unsetUsed by FirebaseProjectOptions

Match Code Signing (appitool match & flow) ​

VariableDescriptionDefault / Behavior
MATCH_GIT_URLGit repository URL for certificates/profiles/keystoresRequired for Match
MATCH_GIT_BRANCHGit branch namemaster
MATCH_GIT_TOKENHTTPS Git Personal Access Token or SSH private/deploy key (file path, raw PEM, or Base64)Falls back to GITHUB_TOKEN, then GH_TOKEN
MATCH_PASSWORDPassphrase for AES-256 encryption/decryptionRequired for Match
MATCH_KEYCHAIN_NAMECustom macOS keychain name or pathappitool
MATCH_KEYCHAIN_PASSWORDPassword used to create/unlock custom keychainappipass
MATCH_READONLYIn flow ios (MatchOptions), read-only unless set to "false"true (unless "false")
MATCH_TYPEDefault Match profile type for match ios sync, nuke, and prune when -t, --type is omittedappstore

Webhook Notifications ​

VariableDescriptionNotes
SLACK_URLSlack incoming webhook URLUsed by slack and flow for success/failure attachments
SLACK_BOT_TOKENSlack bot token (xoxb-…, chat:write scope) for chat.postMessageUsed by slack; takes precedence over SLACK_URL unless --url is passed
SLACK_CHANNELDefault channel ID or name for bot token deliveryUsed by slack with a bot token
KOKONO_URLKokoNo webhook URL (https://kokono.me/notify?token=<token>)Used by kokono and flow
KOKONO_E2E_PUBLIC_KEYBase64 X25519 recipient public key for KokoNo E2E encryptionOptional

GitHub Self-Update ​

VariableDescriptionNotes
GITHUB_TOKENOptional GitHub PAT to avoid API rate limits in self-update & Match HTTPS PAT fallbackFalls back to GH_TOKEN
GH_TOKENSecondary fallback token in self-update & MatchChecked 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.

VariableDescriptionNotes
ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKENRequest the job's OIDC token (audience sigstore) for the Sigstore signing certificateSet by GitHub Actions with id-token: write
GITHUB_SERVER_URL, GITHUB_REPOSITORY, GITHUB_REF, GITHUB_SHAThe built source (externalParameters.source, resolvedDependencies)Set by GitHub Actions
GITHUB_WORKFLOW_REFThe signing workflow (runDetails.builder.id)Set by GitHub Actions
GITHUB_RUN_ID, GITHUB_RUN_ATTEMPTThe run (runDetails.metadata.invocationId)Set by GitHub Actions
APPITOOL_ATTEST_KEYECDSA 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 entrySet 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.

VariableDescriptionNotes
CIGeneric CI indicatorAny 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_CLOUDProvider-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/
│   └── <TargetName>/
│       ├── build/
│       │   └── <version>_<build>[_adhoc|_development]/  # Falls back to <yyyy_MM_dd_HH_mm>
│       │       ├── <Scheme>.xcarchive
│       │       ├── <Scheme>.ipa
│       │       └── <Scheme>.app.dSYM.zip
│       └── derivedData/
├── android/
│   ├── <TargetName>/
│   │   └── build/
│   │       └── <version>_<build>[_adhoc|_development]/  # Falls back to <yyyy_MM_dd_HH_mm>
│   │           ├── <Target>_release.aab
│   │           └── <Target>_release.apk
│   ├── keystores/
│   │   └── <packageName>.keystore
│   └── tmp/
├── certs/
│   └── <type>/
├── assets/                     # default store assets root; STORE_ASSETS_PATH replaces assets/<project>/ (older versions used ~/.appitool/screenshots/)
│   └── <project>/
│       ├── apple/<locale>/<type>/    # apple assets download / upload: screenshot types (01_<name>.png) and header|search (one image), .appitool-manifest.json for upload --sync
│       ├── apple/<locale>/metadata/  # apple metadata download / upload: <field>.txt (name, subtitle, description, keywords, …)
│       ├── apple/metadata/           # app-level: copyright, categories, App Review details, content rights, accessibility URL
│       ├── google/<locale>/<type>/   # Used by both download and default bulk upload (01.png, .appitool-manifest.json for upload --sync)
│       ├── google/<locale>/metadata/ # google metadata download / upload: title, short_description, full_description, video
│       └── google/metadata/          # app-level: contact_email, contact_phone, contact_website, default_language
└── match/
    └── <UUID>/                  # Temporary Git clone working directory (auto-cleaned)

Use appitool 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).

Released under the MIT License.