<!-- generated by gen-docs; do not edit, run make gen-docs -->

# CLI reference

This is a command-group index. The source of truth for flags, arguments, and defaults is the built-in help: run `flightline <group> --help` (or `flightline <group> <subcommand> --help`). The help text is generated from the code, so it never drifts. This page deliberately does not duplicate flags.

```bash
flightline --help              # top-level command tree
flightline <group> --help      # a command group and its subcommands
```

Every command supports `--output table` (default) and `--output json`. JSON is a stable contract for pipes and LLM consumers.

| Group | Summary |
|-------|---------|
| [`age-rating`](#age-rating) | Inspect Apple age-rating declarations |
| [`analytics`](#analytics) | Request, track, and download Apple analytics reports |
| [`apply`](#apply) | Reconcile App Store Connect to match a state file |
| [`apps`](#apps) | Manage and inspect apps in App Store Connect |
| [`beta-feedback`](#beta-feedback) | Read TestFlight beta feedback (crash submissions, screenshots) |
| [`builds`](#builds) | Manage and inspect builds |
| [`categories`](#categories) | Inspect App Store category catalog and per-app assignments |
| [`custom-product-pages`](#custom-product-pages) | Inspect App Store Custom Product Pages |
| [`diagnostics`](#diagnostics) | Read crash and hang diagnostic signatures (build-scoped) |
| [`export-compliance`](#export-compliance) | Inspect export-compliance / encryption answers |
| [`fetch`](#fetch) | Fetch live App Store Connect state into a state.yaml |
| [`finance`](#finance) | Fetch App Store Connect finance (settlement) reports |
| [`iap`](#iap) | Manage and inspect non-subscription In-App Purchases |
| [`lint`](#lint) | Lint a state.yaml against Flightline's offline preflight rules |
| [`metadata`](#metadata) | Manage App Store metadata localizations |
| [`performance`](#performance) | Read Xcode Organizer performance metrics |
| [`plan`](#plan) | Diff a state file against live ASC state |
| [`preflight`](#preflight) | Run live + offline preflight rules against an App Store version |
| [`pricing`](#pricing) | Inspect App Store pricing and availability |
| [`privacy-labels`](#privacy-labels) | Inspect privacy nutrition labels |
| [`rejection`](#rejection) | Compose a rejection report for a version (state + submission + items) |
| [`review-submissions`](#review-submissions) | Inspect App Store review submissions (modern /v1/reviewSubmissions) |
| [`reviewer-demo`](#reviewer-demo) | Manage the App Store Review demo account + reviewer contact info |
| [`reviews`](#reviews) | Read App Store customer reviews and Apple's AI summaries |
| [`sales`](#sales) | Fetch App Store Connect sales reports (TSV-backed, vendor-wide) |
| [`screenshots`](#screenshots) | Manage App Store screenshots |
| [`subscriptions`](#subscriptions) | Read auto-renewable subscription configuration (read-only in v1) |
| [`territories`](#territories) | List App Store territories |
| [`testflight`](#testflight) | Inspect TestFlight beta groups, testers, and review state |
| [`versions`](#versions) | Manage and inspect App Store versions |
| [`whoami`](#whoami) | Verify ASC credentials and print the configured identity |

## `age-rating`

age-rating reads the questionnaire Apple uses to compute a version's age rating. The declaration lives on the per-version appInfo resource; Flightline resolves bundleId + versionString to the right appInfo and fetches its ageRatingDeclaration. L3 preflight will flag declarations with unanswered questions: surface the same data here for manual inspection.

Flags, arguments, and defaults: `flightline age-rating --help`.

## `analytics`

analytics drives Apple's asynchronous analytics report lifecycle: 1. request : submit an analyticsReportRequests entry to Apple 2. status : refresh Apple state and update the persisted checkpoint 3. list-instances: enumerate report instances for the active request 4. download: pull every segment of an instance to local CSV files State persists to $XDG_STATE_HOME/flightline/<bundleId>/analytics.json so a Ctrl-C between submit and download resumes cleanly on the next run.

Flags, arguments, and defaults: `flightline analytics --help`.

## `apply`

Loads <state.yaml>, validates it against the schema, fetches live state, computes the diff, and writes the changes back to ASC. Without --confirm, apply prints the plan and refuses to write: same guardrail as terraform plan. With --confirm, every leaf-level change dispatches to its L1 writer, with a checkpoint persisted after every success so a Ctrl-C / crash mid-apply resumes cleanly via --resume. --dry-run fetches live state and computes the dispatch path, but sends no mutating API requests. It requires credentials and network access. Examples: flightline apply state.yaml # plan only, refuses to write flightline apply state.yaml --confirm # write changes flightline apply state.yaml --confirm --resume # continue after Ctrl-C flightline apply state.yaml --dry-run --output json

Flags, arguments, and defaults: `flightline apply --help`.

## `apps`

apps groups read commands over the /v1/apps resource.

Flags, arguments, and defaults: `flightline apps --help`.

## `beta-feedback`

beta-feedback groups read commands over Apple's TestFlight feedback resources: - crash <bundleId> : list crash submissions, optionally filtered by build - screenshot <bundleId> : list screenshot submissions, optionally filtered by build - download <feedbackId> : download the crash log or screenshot to disk Feedback is tester-authored, so this command group is read-only.

Flags, arguments, and defaults: `flightline beta-feedback --help`.

## `builds`

builds groups read commands over the /v1/builds resource.

Flags, arguments, and defaults: `flightline builds --help`.

## `categories`

categories groups read commands over the /v1/appCategories resource. categories list dumps Apple's catalog of top-level categories. Filterable by --platform; defaults to IOS to match Flightline's default platform. categories get <bundleId> shows the category assignments on the app's editable appInfo (primary + secondary plus their subcategories). Unassigned slots are a frequent rejection cause: surface them visibly.

Flags, arguments, and defaults: `flightline categories --help`.

## `custom-product-pages`

custom-product-pages groups read commands over Apple's AppCustomProductPage resources: alternate App Store listings used to target ad-driven traffic with different screenshots and descriptions. list <bundleId> : list all configured pages with current state get <bundleId> --page <id> : detail for one page (versions + localizations)

Flags, arguments, and defaults: `flightline custom-product-pages --help`.

## `diagnostics`

diagnostics groups read commands over Apple's diagnostic signatures resource. Apple deduplicates crash and hang reports into signatures: same call stack, same crash, regardless of how many users hit it. Apple v4.3 only exposes diagnostic signatures scoped to a build: - list <bundleId> --build <number> : list signatures for a build - get <signatureId> : fetch the full log payload There is no app-wide aggregation API in v4.3; --build is required on list.

Flags, arguments, and defaults: `flightline diagnostics --help`.

## `export-compliance`

export-compliance reads Apple's two-tier export-compliance surface: 1. The per-build boolean `usesNonExemptEncryption` (lives on the Build attached to the version, not on the version itself). 2. The per-app `appEncryptionDeclaration` resources for full ECCN classification when the boolean is not sufficient. L3 preflight will gate submissions on a missing build-level answer; this verb surfaces the same data for manual inspection.

Flags, arguments, and defaults: `flightline export-compliance --help`.

## `fetch`

Pulls every L2 surface Flightline supports for the given bundleId and writes the result as a Flightline state file. Default output is YAML with a yaml-language-server schema directive prepended for editor autocomplete. Surfaces absent from the state file are not managed. The diff engine leaves those surfaces untouched on subsequent applies. Examples: flightline fetch app.tideterm.ios > state.yaml flightline fetch app.tideterm.ios -o state.yaml --version 1.0.1 flightline fetch app.tideterm.ios --output json | jq '.spec.version'

Flags, arguments, and defaults: `flightline fetch --help`.

## `finance`

finance pulls finance/settlement reports from /v1/financeReports. Apple indexes finance reports by fiscal year/month, not calendar month. Daily granularity belongs to `flightline sales`. FINANCIAL defaults to the consolidated region ZZ. FINANCE_DETAIL defaults to Z1. The bundleId argument filters typed output by Vendor Identifier so a single- vendor multi-app account stays focused. --output tsv streams Apple's raw wire format unfiltered. Vendor number is read from APP_STORE_CONNECT_VENDOR_NUMBER.

Flags, arguments, and defaults: `flightline finance --help`.

## `iap`

iap groups read commands over the /v2/inAppPurchases resource. Auto-renewable subscriptions live under a separate /v1/subscriptionGroups resource and are not handled here: see `flightline subscriptions`.

Flags, arguments, and defaults: `flightline iap --help`.

## `lint`

lint runs every Flightline preflight rule that does not require live ASC access against the supplied state.yaml. The check covers schema gaps the JSON Schema validator cannot express (yes/no coercion, required-but-empty fields, format: email shape) plus structural rules (localizations completeness, screenshots required-devices). Exit codes: 0 clean (no diagnostics, or info-only) 1 at least one error-severity diagnostic 2 only warnings (no errors) Use `--output json` for stable LLM/CI consumption; the table form is for humans.

Flags, arguments, and defaults: `flightline lint --help`.

## `metadata`

metadata writes per-locale strings into appStoreVersionLocalizations (description, keywords, whatsNew, promotionalText, marketing/support URLs) and appInfoLocalizations (name, subtitle). Both resources are diff-then-PATCH idempotent: re-running with the same arguments is a no-op.

Flags, arguments, and defaults: `flightline metadata --help`.

## `performance`

performance groups read commands over Apple's perfPowerMetrics endpoints: the same battery / memory / hangs / launches / disk-writes metrics the Xcode Organizer "Metrics" tab shows. - app <bundleId> : app-level (cross-build aggregate) - build <bundleId> --build <number>: build-specific metrics Filter by --platform, --category (HANG | LAUNCH | MEMORY | DISK | BATTERY | TERMINATION | ANIMATION), and --device.

Flags, arguments, and defaults: `flightline performance --help`.

## `plan`

Loads <state.yaml>, validates it against the embedded JSON Schema, fetches live ASC state for the same bundleId/version, and prints the change set the apply command would make. Read-only: never writes. Exit code 0 always (diffs aren't errors) unless --exit-on-changes is set, in which case the command returns exit code 2 when changes exist (useful in CI hooks). Examples: flightline plan state.yaml flightline plan state.yaml --output json | jq '.changes | length' flightline plan state.yaml --exit-on-changes

Flags, arguments, and defaults: `flightline plan --help`.

## `preflight`

preflight runs every Flightline rejection-prevention rule against a live App Store version. Live rules query the ASC API for IAP attachment, build state, age-rating completeness, and screenshot device coverage. Offline rules run too when --state-file is provided so authoring mistakes are caught alongside live ones. Without --state-file the live state is fetched and used as the rule input: useful for "is the version actually submittable right now?" checks against any app you have credentials for. With --state-file the user-authored YAML is the input for offline rules and the live ASC state is consulted for live rules. When --state-file is used, its bundleId, version, and platform must match the command coordinates. An omitted state-file platform inherits the command platform (IOS by default); mismatches fail before rules run. Exit codes: 0 clean (no diagnostics, or info-only) 1 at least one error-severity diagnostic 2 only warnings (no errors)

Flags, arguments, and defaults: `flightline preflight --help`.

## `pricing`

pricing groups read commands over the /v1/appPriceSchedules and /v1/apps/{id}/appAvailabilityV2 resources. Apple's pricing model uses AppPriceSchedule (one per app) carrying manual/automatic price windows that link to AppPricePointV3 entries (customerPrice + proceeds per territory). AppPriceTier is deprecated. Availability lives in a separate resource: a flag for new-territory auto-release plus the per-territory availability set.

Flags, arguments, and defaults: `flightline pricing --help`.

## `privacy-labels`

privacy-labels would read Apple's App Privacy Details (nutrition labels) for an app. Apple's App Store Connect API v4.3 does not expose this surface: labels are authored exclusively in App Store Connect's web UI. This command returns a typed diagnostic so callers can detect the unsupported state programmatically. When Apple ships an API endpoint, the command can be wired without changing the JSON contract.

Flags, arguments, and defaults: `flightline privacy-labels --help`.

## `rejection`

rejection composes the API-visible signals around an App Store rejection into one report: the version's state, the build attached to it (if any), the matching review submission's state, and each review submission item's state. Apple's resolution-center reviewer text is NOT in the public API. Flightline shows the API-visible state. To read the actual reviewer message, log into App Store Connect. Examples: flightline rejection com.example.myapp --version 1.0.1 flightline rejection com.example.myapp --version 1.0.1 --output json | jq .submission.state

Flags, arguments, and defaults: `flightline rejection --help`.

## `review-submissions`

review-submissions reads from /v1/reviewSubmissions, the modern flow. Apple's /v1/appStoreVersionSubmissions is deprecated; Flightline uses the modern endpoint exclusively.

Flags, arguments, and defaults: `flightline review-submissions --help`.

## `reviewer-demo`

reviewer-demo configures the per-version appStoreReviewDetail Apple shows reviewers during App Store Review. Security: --password is never written to logs, never echoed in --verbose output, and never appears in error messages. Prefer --password-file <path> to keep the secret out of shell history.

Flags, arguments, and defaults: `flightline reviewer-demo --help`.

## `reviews`

reviews groups read commands over Apple's customer-review surface: - list <bundleId> : list reviews with optional territory/rating/since filters - get <reviewId> : fetch a single review with the developer response (if any) - summary <bundleId> : read Apple's AI summarization of recent reviews

Flags, arguments, and defaults: `flightline reviews --help`.

## `sales`

sales pulls Sales and Trends reports from /v1/salesReports. Reports are vendor-wide: Apple does not filter by app on the wire. The bundleId argument resolves the app and scopes typed output by bundle ID, configured SKU, and Apple ID. Use --output tsv to stream Apple's raw (gunzipped) wire format unfiltered for downstream tools. Frequency is inferred from the date flag (--days → DAILY, --week → WEEKLY, --month → MONTHLY, --year → YEARLY). --frequency may be supplied as an explicit assertion but must match the selected date shape. Reports are fetched per-day for daily windows so a 30-day pull = 30 API calls; budget against Apple's 500 req/hr cap accordingly. Vendor number is read from APP_STORE_CONNECT_VENDOR_NUMBER. Refuses to run without one rather than erroring on the wire.

Flags, arguments, and defaults: `flightline sales --help`.

## `screenshots`

screenshots wraps Apple's appScreenshotSets / appScreenshots resources. Uploads use the 3-step reserve -> PUT chunks -> commit dance. All operations are idempotent: a file whose MD5 already matches a slot in the set is skipped.

Flags, arguments, and defaults: `flightline screenshots --help`.

## `subscriptions`

subscriptions groups read commands over Apple's auto-renewable subscription resources. Apple structures subscriptions as a tree: - SubscriptionGroup : competing-tier group └── Subscription : one product within the group ├── Localizations : per-locale name/description ├── IntroductoryOffers : onboarding discount tiers └── Prices : price ladder - list <bundleId> : list groups + member count - get <bundleId> --product <productId> : full detail for one product This command group is read-only.

Flags, arguments, and defaults: `flightline subscriptions --help`.

## `territories`

territories groups read commands over the /v1/territories resource. Apple's territory list is reference data: the same set across every ASC account, with currency codes that change at most a few times a year. The list command caches results under $XDG_CACHE_HOME/flightline/territories.json for 24 hours by default; pass --no-cache to force a fresh fetch.

Flags, arguments, and defaults: `flightline territories --help`.

## `testflight`

testflight groups read commands over Apple's TestFlight resources: - groups list <bundleId> : list internal + external beta groups - testers list <bundleId> : list testers in the app or a group - beta-review get <bundleId> --build <n> : show beta-review state for a build

Flags, arguments, and defaults: `flightline testflight --help`.

## `versions`

versions groups read and write commands over the /v1/appStoreVersions resource.

Flags, arguments, and defaults: `flightline versions --help`.

## `whoami`

whoami exercises the simplest auth-required ASC endpoint to verify the configured key works, then prints the credential metadata Flightline is using. Credentials are resolved via the standard precedence: --key-id flag > APP_STORE_CONNECT_KEY_ID > ~/.config/flightline/config.yaml The .p8 private key is read from $APP_STORE_CONNECT_KEY_PATH if set, otherwise ~/.appstoreconnect/AuthKey_<KEY_ID>.p8 (mode 0600 required). Examples: flightline whoami flightline whoami --output json | jq -r .keyId flightline whoami --output json | jq -e .authorized # exit nonzero on failure

Flags, arguments, and defaults: `flightline whoami --help`.

