Quick way to register numerous "apps" from the same snap?

Friend just asked me the following: Imagine a single code base which normally generates and installs a dozen related executables. As it’s a single code base, then it could be represented by a single “parts:” stanza in snapcraft.yaml.

But given the dozen generated executables, must I still define an apps: stanza for every single executable I want to expose from the snap? If all the executables end up in the same directory (eg., /usr/local/bin), and I want to install them in the snap via their same names, is there a shortcut to say, “Just take them all”? Perhaps a stage: or prime: scriptlet? Or am I looking at a dozen “apps:” stanzas?

There currently is no globbing mechanism for applications, if there are many more cases like this it could be considered, but this is the main entry point for a snap (or application) so it is highly desirable to have it curated.

I had assumed as much, just wanted to confirm.

you can indeed always hack around it by creating a launcher script:

#! /bin/sh

exec $SNAP/usr/local/bin/$@

just call that script as $SNAP_NAME in your apps: section and give the binary as first argument (this would indeed need some argument checking, a help function and such, just want to outline the principle …)