Why is my custom console command throwing Calling unknown method: ...getAcceptsJson?
I had a hunch that a web controller with a similar name was getting called, and indeed that is what was happening. In my module's init method I was setting the controller namespace like this:

$this-&gt;controllerNamespace = 'modules\vetscripts\controllers';`


By default, then, the console was going to the web controller, I'm assuming. @Selvin pointed me in the right direction with this:

use craft\console\Application as Console

...

public function init()
{
    ...
    if (Craft::$app instanceof Console) {
        $this-&gt;controllerNamespace = 'modules\vetscripts\console\controllers';
    }
    ...
}


Now I can see my module's custom console actions when running ./craft from the console.