In the context of the Control Panel, the URL parameters are the best way to get that info because the user chooses which site to work on, which draft to work on, or which revision to review. Craft, itself, relies on those URL parameters.
In the context of a CLI request, there is no user interaction. You're on the hook to sort out which entry, draft, site, and user are relevant to the element you'd like to manipulate. As of Craft 3.3 (current version today) there is an EntryRevisions service class. All of the methods are deprecated in favor of running your own entry queries, but those methods are a good reference for how to get the drafts or revisions you're looking for.
For example, rather than running the deprecated method:
$drafts = Craft::$app->getEntriesRevisions()->getDraftsByEntryId($entryId, $siteId);
You'd run the contents of that method for yourself:
->orderBy(['drafts.name' => SORT_ASC])