Writing a plugin that triggers on a Control Panel Template Hook?
Figured it out after browsing some existing plugins' source:

Craft::$app-&gt;getView()-&gt;hook('cp.entries.edit.details', function(array &amp;$context) {
    return '&lt;a href="#" class="btn"&gt;My Button!&lt;/a&gt;';
});