Feature Request: plugin.spec.yaml generator

It’s possible I missed it (I’m still pretty new)… but it would make things a lot easier if I could use icon-plugin to generate a base plugin spec

icon-plugin generate specfile -n pluginname -a actionname -a actionname -t triggername

There’s probably a better way… but my biggest hurdle initially was figuring out, “How do I use this specfile thing”… you could go crazy with the abstraction and let me input a json object like:

{'name':'myplugin', 'actions':{'do_thing':{'input':{'input1':'string'},'output':{'output1':'object'}, 'triggers':<snip>}

The goal being to separate the places where I write things that get referenced in code from the pretty text I need to input.
(I’ve been having a hard time remembering where I can use hyphens, and where using one will break the icon-plugin codegen… this would help with that)

At the end of the day, this is probably a “wouldn’t it be cool if…” vs an actual feature request.

Thanks for the feedback. This is something we’re looking at internally. It’s been on our roadmap for a while, and if you keep bugging us about it, it’ll move up in the priority list.

Slightly different than what you’re asking, I think our implementation will be an interactive wizard of some sort to get you going.

The other thing that might help in the meantime is simply copying another plugin.spec file to use as the base. Internally when we start a new plugin, we almost always copy the template from another plugin and start there.

I’ve been having a hard time remembering where I can use hyphens,

I came from a Java/C# background. I had a hard time with this at first too. I wanted to use camel case for everything. It’s something you’ll get used to after you have a few plugins under your belt. The short answer to this is if it’s an attribute, it needs hyphens. If it’s a value you can use regular text.

1 Like

Yea, I thought about the interactive wizard option as well (kinda how AWS SAM will let you clone templates)… Going that route would definitely make it easier for folks to go from “I can copy paste python snippets” to “I can make my own plugins”.

That said, asking for this almost feels meme worthy… Super excited to hear you all are already thinking about it :slight_smile:


1 Like