Accessing snapd information from within a snap

I’ve recently tried to update my snapcraft.yaml file to include base: core18. After some tinkering, I got this to build a snap, but my app crashes.

It seems that, prior to using core18, the snap command was available in /usr/bin, but it’s not the case with core18. Is it possible to list the available snaps from within my app, the way snap list is doing?

My app needs to check, for instance, if another given snap is installed, or if it’s been installed using classic or devmode parameters.

Thanks,

Does your snap have snapd-control?

Thanks for the answer! I added this interface and it seems to be useful. I can now access /run/snapd.socket and communicate with it using sockets. Is it the way to go, or is there an easier way? (I currently have to send requests and read responses in chunks using Python)