Fix pages / ASC CLI

ASC CLI: "--<flag> must be passed after the subcommand name"

Error: --stars must be passed after the subcommand name (asc reviews list [flags])

Tool: App Store Connect CLI (asc). Versions: Affected: 5.11.0 and later; last version without this error: 5.10.0; we reproduced it on 5.10.0, 5.11.0, 5.13.0. Exit code 2.

Cause: Since ASC CLI 5.11.0 (released 2026-10-05), a flag written between a command group and its subcommand (asc reviews --stars 1 list) is an error, because older versions parsed it into the group and then silently dropped it.

Fix: Put every flag after the leaf subcommand: asc reviews list --stars 1 --app 123, asc builds list --app 123.

# wrong: asc reviews --stars 1 list --app 123
asc reviews list --stars 1 --app 123

# wrong: asc builds --app 123 list
asc builds list --app 123

The flag name and command in the message change with your command line. Some groups, such as asc builds, print an unknown flag error for the same mistake instead (shown below); that form already failed in 5.10.0, and 5.11.0 added a "Did you mean a subcommand?" line listing the subcommands that accept the flag. On 5.10.0 the reviews command ran without the --stars filter.

The same cause also prints:

Error: unknown flag `--app` for `asc builds`

Last verified 2026-10-07 (5.10.0, 5.11.0, 5.13.0). Page updated . Also as Markdown and JSON.

How did we reproduce the ASC CLI error?

A fresh Debian 13 VM from bin/sandbox-run (Node.js 24, root, online, no credentials for any service), destroyed after the run. Run on . Failing command: asc reviews --stars 1 list --app 123.

Before: the flag is accepted and dropped; the command continues to authentication (ASC CLI 5.10.0):

$ asc reviews --stars 1 list --app 123
Error: reviews: missing authentication. Run 'asc auth login' or create /root/.asc/config.json (see 'asc auth init')
Hint: Run `asc auth login` or `asc auth init` (or set ASC_KEY_ID/ASC_ISSUER_ID/ASC_PRIVATE_KEY_PATH). Try `asc auth doctor` if you're unsure what's misconfigured.
# exit 3

After: rejected (ASC CLI 5.11.0):

$ asc reviews --stars 1 list --app 123
Error: --stars must be passed after the subcommand name (asc reviews list [flags])
# exit 2

Same in the latest release (ASC CLI 5.13.0):

$ asc reviews --stars 1 list --app 123
Error: --stars must be passed after the subcommand name (asc reviews list [flags])
# exit 2

The unknown flag form on the builds group (ASC CLI 5.13.0):

$ asc builds --app 123 list
Error: unknown flag `--app` for `asc builds`
Did you mean a subcommand? These accept `--app`: list, count, next-build-number, wait, info, expire, expire-all, upload, update, add-groups, remove-groups, dsyms
For help:
  asc builds --help
# exit 2

Fix verified: flags after the subcommand reach authentication (ASC CLI 5.13.0):

$ asc reviews list --stars 1 --app 123
Error: reviews: missing authentication. Run 'asc auth login' or create /root/.asc/config.json (see 'asc auth init')
Hint: Run `asc auth status` to see configured credentials. To add an API key, create one at https://appstoreconnect.apple.com/access/integrations/api and run `asc auth login --name MyKey --key-id KEY_ID --issuer-id ISSUER_ID --private-key /path/to/AuthKey_KEY_ID.p8` (or set ASC_KEY_ID/ASC_ISSUER_ID/ASC_PRIVATE_KEY_PATH).
# exit 3

Why does ASC CLI print this error?

Pull request #2889 (merged 2026-10-05, shipped in 5.11.0) explains that the CLI framework parsed --flag into the group's flag set "and then silently dropped" it, so asc reviews --stars 1 list --app 123 "sent no rating filter"; the fix rejects such flags instead of ignoring them. (rorkai/App-Store-Connect-CLI PR #2889)

Related ASC CLI fixes and pages

Sources

Last verified: 2026-10-07.