ErrLookup › Background articles › "no subcommand specified" and "... is required": CLI errors when a required argument is missing
"no subcommand specified" and "... is required": CLI errors when a required argument is missing
"No subcommand specified", "No arguments provided", "Specify a ...", "--id is required" - these errors fire when a command-line tool is invoked without an argument it treats as mandatory: a dispatcher given no subcommand (rtk go, hadoop aws s3guard, php artisan october:util) or a management command missing a required flag, positional, or argument pair (Phabricator bin/ workflows, pnpm access, gem, siyuan). This page covers the family across 13 libraries and 89 documented records: why the tools refuse to guess, how the errors surface, which script-level mistakes trigger them, and how to fix and prevent them.
Distilled from 89 documented records across 13 repositories.
Background
These errors come from the argument-parsing layer that runs before a tool does any real work, and the family has two dominant shapes. The first is the subcommand dispatcher: rtk's go, gt, sbt, and dotnet proxies, October CMS's october:util, and Hadoop's "hadoop aws s3guard" each route an invocation to a filtered handler or a proxied child process; with an empty argv there is no token to route, so they refuse up front rather than spawn a bare process (rtk's sbt guard, for example, keeps you out of sbt's interactive shell). The second is the required-argument check: Phabricator's bin/ management workflows, pnpm access, Ruby's gem command, SiYuan's asset CLI, and others validate flags and positionals before touching state, and abort as soon as a mandatory slot is empty.
The family exists because these tools refuse to guess, and the records show the cost of guessing would be real. Phortune's invoice workflow will not invent a billing range because an incorrect one can double-bill customers. bin/auth unlimit demands --all so its semantics stay stable when narrower resets are added. rtk's dispatchers need a verb before their output filters can attach. So the check fires before any side effect: pnpm's access commands fail at argument parsing with nothing sent to the registry, Phabricator's usage guards throw before any database access, and rtk bails before spawning a process.
From the caller's side the result is almost always a usage message plus a non-zero exit, but the exact surface is library-specific. Phabricator signals caller misuse with PhutilArgumentUsageException, which prints usage text to stderr instead of a stack trace. Hadoop's S3GuardTool prints help and throws ExitUtil.ExitException with exit code 42 (EXIT_USAGE). October's october:util mimics Symfony's "no commands defined in the namespace" wording and appends the available utility names. Several messages double as discovery: the herald test error lists the content types valid for your object, the garbage-collector error lists valid collector constants, and october:util prints a "Did you mean one of these?" list. One outlier, Diviner's "Specify one or more files to atomize", is a plain Exception and surfaces with a stack trace rather than a usage message.
What counts as missing also varies across the family, and that is where the subtler triggers live. Arguments can be present yet resolve to nothing: Phabricator's pull, discover, and clusterize workflows resolve callsigns through a locality check, so a correctly spelled name on a host with no bound working copies still yields zero repositories, and a shell glob that matches nothing leaves diviner atomize with no files. Pairs must arrive complete: gitbutler's "but agentlog skim [TARGET] [VALUE]" rejects either half alone because the default applies only when both are omitted, and phortune's --last/--next must define both bounds of the billing range. Ruby's gem command treats every leading dash entry as a flag, so an invocation made entirely of options still has an empty name list. The required set itself drifts with versions: S3Guard's old subcommands were removed with the DynamoDB metadata store, and Phabricator workflow flags change between releases, so a command that once worked can start landing in this family.
Common causes
- Bare invocation with zero arguments. Running a dispatcher or subcommand with nothing after it: rtk go, hadoop aws s3guard, php artisan october:util, pnpm access grant. For dispatchers that strip generic options first (Hadoop's -D and -conf), supplying only those options also leaves nothing to route.
- Unset or empty variable in a script, cron entry, or agent wrapper. The command is composed as "tool $ARGS" where the variable is unset, empty, or an empty array or loop iteration. Records across rtk, Phabricator, pnpm, and SiYuan name this trigger; the error is often the first sign that the script never set the variable.
- Required flag omitted or passed empty. Phabricator workflows (--subscription, --user, --device, --collector, --book, --atomizer, --type), SiYuan's --id, and career-ops' --company/--platform/--subject throw when a mandatory flag is absent. Passing an empty string (--id "") fails the same check.
- Only half of a required pair supplied. gitbutler's agentlog skim rejects a lone TARGET (skim review) or a lone VALUE (skim 1234), and phortune invoice rejects --last without --next. Defaults apply only when the whole pair is omitted.
- Arguments given but resolving to zero. Phabricator's pull, discover, and clusterize filter names through locality and hosting checks, so wrong or non-local callsigns behave like no argument. A wildcard glob that matches nothing (src/*.php in an empty directory) leaves diviner atomize with no files.
- All arguments are flags, so the positional list is empty. Ruby's gem treats leading dash entries as options, so a call given only flags still has no gem names; catalog.js show --json passes flags but no component ID.
- Misspelled flag or outdated subcommand after an upgrade. --everything instead of --all, or --devices= instead of --device, never binds, so the required slot stays empty. Version drift does the same: S3Guard's init, destroy, and import subcommands were removed, and Phabricator workflow flags change between releases.
What usually fixes it
- Re-run with the required argument, and read the error before searching: many messages in this family enumerate the valid values (herald content types, collector constants, october:util utility names, the s3guard subcommand list in the help text), so the fix is often printed with the failure.
- Guard scripts at the point of invocation: assert variables non-empty before building the command line ([ -n "$ID" ], ${VAR:?message}, shell set -u), and echo the full command line while debugging to see which slot collapsed.
- Default the variable or substitute a safe token in wrappers, for example CMD=${CMD:-compile} or rtk gt "${CMD:---help}"; or treat a bare call as a usage question and answer it with <tool> --help, which passes most guards.
- Consult the tool's own discovery surface before scripting (--help, pnpm access help, bin/repository list-repositories, components --json) and pin the exact flags and subcommands per version in runbooks, re-checking after upgrades.
- Emit argument pairs from a single source so they always ship together: TARGET with VALUE, --last with --next computed from one billing period, --to/--cc recipient arrays built and length-checked once.
Documented occurrences
- dotnet: no subcommand specified (rtk-ai/rtk)
- There are no commands defined in the "util" namespace. (octobercms/october)
- 42: No arguments provided (apache/hadoop)
- gt: no subcommand specified (rtk-ai/rtk)
- Specify an atomizer class with %s. (phacility/phabricator)
- sbt: no subcommand specified (rtk-ai/rtk)
- Specify which subscription to invoice with %s. (phacility/phabricator)
- Specify one or more repositories to pull. (phacility/phabricator)
- Specify a content type to run rules for. For this object, valid content types are: %s. (phacility/phabricator)
- ACCESS_GRANT_ARGS_REQUIRED: Permissions and scope:team are required (e.g., pnpm access grant read-only @scope:developers @scope/pkg) (pnpm/pnpm)
- ACCESS_SET_MFA_PACKAGE_REQUIRED: Package name is required (e.g., pnpm access set mfa=automation @scope/pkg) (pnpm/pnpm)
- Specify a billing range with %s and %s, or use %s. (phacility/phabricator)
- When specifying %s or %s, you must specify both arguments to define the beginning and end of the billing range. (phacility/phabricator)
- Specify one or more files to atomize. (phacility/phabricator)
- Specify one or more repositories to discover. (phacility/phabricator)
- Specify a Diviner book configuration file with %s. (phacility/phabricator)
- Please specify at least one gem name (e.g. gem build GEMNAME) (ruby/ruby)
- go: no subcommand specified (rtk-ai/rtk)
- Choose a policy with "%s", "%s" or "%s". (phacility/phabricator)
- {} target value is required (gitbutlerapp/gitbutler)
…and 69 more across the corpus — use search.
Honest provenance: generated on 2026-08-23 from AI-assisted analysis of the linked records. See how records are made.