phacility/phabricator · warning · PhutilArgumentUsageException
Specify a file to read parameters from with "--input".
Error message
Specify a file to read parameters from with "--input".
What it means
Usage guard in the Conduit call management workflow: the --input argument was omitted or empty, so there is no file from which to read the method parameters. execute() raises this until an input file is given.
Solutions
- Create a JSON file for the parameters (an empty object file for parameterless methods) and pass it with --input.
- For quick tests: printf '{}' > /tmp/params.json && ./bin/conduit call --method user.whoami --input /tmp/params.json.
Example fix
# before
$ ./bin/conduit call --method user.whoami
# after
$ echo '{}' > /tmp/params.json
$ ./bin/conduit call --method user.whoami --input /tmp/params.json Defensive patterns
Strategy: validation
Validate before calling
#!/bin/bash
INPUT="${INPUT:-/tmp/conduit-params.json}"
[ -f "$INPUT" ] || printf '{}' > "$INPUT" # parameterless methods still need a file
./bin/conduit call --method "$METHOD" --input "$INPUT" Prevention
- Always create the params file first, even when it is just '{}'.
- Treat --method and --input as a pair; validate both in wrappers before executing.
When it happens
Trigger: Running ./bin/conduit call --method user.whoami with no --input; guessing a different flag name like --params or --data.
Common situations: Assuming parameterless methods need no input file; migrating from arc call-conduit where stdin echo '{}' is the idiom.
Understand the failure class
Background: "no subcommand specified" and "... is required": CLI errors when a required argument is missing — this error's family across 13 libraries.
Related errors
- Specify a method to call with "--method".
- No Conduit method provided.
- No such user " " exists.
- Too many Conduit methods provided.
- Argument " " is not a valid message ID.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/2ac911ef5c6955cc.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/conduit/management/PhabricatorConduitCallManagementWorkflow.php:51
'help' => pht(
'Execute the call as the given user. (If omitted, the call will '.
'be executed as an omnipotent user.)'),
),
));
}
public function execute(PhutilArgumentParser $args) {
$viewer = $this->getViewer();
$method = $args->getArg('method');
if (!strlen($method)) {
throw new PhutilArgumentUsageException(
pht('Specify a method to call with "--method".'));
}
$input = $args->getArg('input');
if (!strlen($input)) {
throw new PhutilArgumentUsageException(
pht('Specify a file to read parameters from with "--input".'));
}
$as = $args->getArg('as');
if (strlen($as)) {
$actor = id(new PhabricatorPeopleQuery())
->setViewer($viewer)
->withUsernames(array($as))
->executeOne();
if (!$actor) {
throw new PhutilArgumentUsageException(
pht(
'No such user "%s" exists.',
$as));
}
// Allow inline generation of user caches for the user we're acting
// as, since some calls may read user preferences.View on GitHub (pinned to 5720a38cfe)