Plugin guidelines/restrictions

Hi @foosel (and other OctoPrint contributors),

I stumbled upon this comment on an OctoPi issue suggesting @foosel disapproved of plugins living in the formal repository if they support executing local system commands. I found this a bit odd given the presence of Action Commands but it couldn't hurt to confirm with you.

Is there any official/unofficial guidance here? I'd like to avoid developing anything you might ultimately frown upon and reject (from the repository).

Thanks in advance.

My plugin was initially rejected for this reason but the changes were relatively minor. Basically you replace os.system with subprocess.call.

That must be a misunderstanding. I do not want plugins to try to execute stuff right on first install without the user's knowledge or permission, especially not with sudo (e.g. to try to install any kind of third party stuff). But executing commands in general is totally fine.

ETA

The example provided by @b-morgan was due to the fact that os.system is a fairly low level call (with various possible issues) and should be avoided in any case.

And before I forget, take a look at this guide which outlines the requirements and restrictions:

If you look at one of my typical plugin's installations, the Settings page will know that it's not been initialized yet and then prompt the user to copy/paste/run some command themselves. It does require the user to participate in the installation but at least they shouldn't be surprised.