How to use a snap within my snap?

I’d like to use the node snap within my snap. How do I do this? Can it only be done through interfaces or can the snap literally be included inside my snap?

If interfaces are the way to do it, can I make it so node is installed when my snap is installed?

Check out the stage-snaps Snapcraft property, using it via the content interface is also technically possible if the runtime snap exposes such interface.

1 Like

Ah that sounds like exactly what I need. Is it documented anywhere? It doesn’t seem to have made it into https://docs.snapcraft.io/snapcraft-yaml-reference yet.

1 Like

It’s in the parts reference: https://docs.snapcraft.io/snapcraft-parts-metadata

You’re right about the complete snapcraft reference not having it. It doesn’t seem like that page gets updated as often as the individual top-level and parts reference pages.

1 Like

I’ve added the missing entry to the standalone reference.