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 123The 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`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 3After: 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 2Same 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 2The 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 2Fix 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 3Why 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
image has an alpha channel or transparency; re-export it as RGB PNG or JPEG without alpha(ASC CLI 5.13.0 and later)- ASC CLI tool page: Flag placed on the command group instead of the subcommand
- All fix pages
Sources
- fix(cli): reject group flags placed before a subcommand (PR #2889) (read 2026-10-07)
- ASC CLI 5.11.0 release notes (read 2026-10-07)
Last verified: 2026-10-07.