API: How to invoke a cli command from a JS extension?

Hi,

So, I am trying to build a popclip extension which requires calling several cli commands. My logic works great in a js extension, but using exec or spawnSync does not work.

Any tips would be appreciated

Happy new year

So no one answered this question, I assume it is restricted and therefore not possible to call a cli command from an extension built in JS/TS.

It makes no sense to me, it can be done from a shell extension, why is it restricted for other languages

This ends my attempt to integrate with Soulver.app, which like many other tools, has a cli interface.