Is it possible to list which interfaces a snap provides/requires before installing it?
alan@KinkPad-K450:~/Temp/foo$ snap download emoj Fetching snap "emoj" Fetching assertions for "emoj" Install the snap with: snap ack emoj_53.assert snap install emoj_53.snap alan@KinkPad-K450:~/Temp/foo$ unsquashfs emoj_53.snap meta/snap.yaml Parallel unsquashfs: Using 4 processors 1 inodes (1 blocks) to write [===================================================================|] 1/1 100% created 1 files created 2 directories created 0 symlinks created 0 devices created 0 fifos alan@KinkPad-K450:~/Temp/foo$ cat squashfs-root/meta/snap.yaml name: emoj version: v2.0.0 summary: emoj description: 'Find relevant emoji from text on the command-line. ' architectures: - amd64 confinement: strict grade: stable apps: emoj: command: command-emoj.wrapper plugs: - network - x11
Depending on what you’re trying to do, the store does expose that information (and snapd does use it, but does not expose it) via the
snap-yaml field. It has some caveats but, for example, you can do
http https://api.snapcraft.io/v2/snaps/info/emoj \ Snap-Device-Series:16 architecture==amd64 fields==snap-yaml | jq -r '."channel-map"."snap-yaml"'
name: emoj version: v2.0.0 summary: emoj description: 'Find relevant emoji from text on the command-line. ' architectures: - amd64 confinement: strict grade: stable apps: emoj: command: command-emoj.wrapper plugs: - network - x11
I think we should implement this, and the companion “find things that have these plugs/slots/interfaces”, but I’m not sure what would be a reasonable UX for it from
snap find, or
snap info. Ideas?
Also see lp:1776938.
A somewhat related proposal to the request is here: Install snap without any auto-connections proposal
If we had that, at least for snaps one is unsure about, you could install it without any interfaces connected, then inspect with
snap connections to see all the possible connections for that snap.
I know this thread is old, but not knowing which interfaces a snap by an unknown publisher uses is why I am reluctant to try out new snaps.
It would be great to have this information shown within the web store and/or the snap command.