feat: allow installation of community plugins/extensions for Klipper #330

Open
opened 2023-04-15 18:18:37 +02:00 by jtrmal · 16 comments
jtrmal commented 2023-04-15 18:18:37 +02:00 (Migrated from github.com)

It's not an issue -- I'm just wondering if you would be open to including PR that would be adding an option to install KAMP (https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging) and also as a separate PR Klippain (https://github.com/Frix-x/klippain/). Both of these are aimed at simplifying QOL on klipper.

Describe the solution you'd like

There would be an option in KIAUH that would allow installing these two (independently on each other)

Describe alternatives you've considered

There is not an easy way how to install these via moonraker and mainsail and people want generally stay away from manual setups. So KIAUH sounds as a very good option, as it's already often times used to simplify setup process

Additional information

CC @kyleisah and @Frix-x

### Is your feature request related to a problem? Please describe It's not an issue -- I'm just wondering if you would be open to including PR that would be adding an option to install KAMP (https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging) and also as a separate PR Klippain (https://github.com/Frix-x/klippain/). Both of these are aimed at simplifying QOL on klipper. ### Describe the solution you'd like There would be an option in KIAUH that would allow installing these two (independently on each other) ### Describe alternatives you've considered There is not an easy way how to install these via moonraker and mainsail and people want generally stay away from manual setups. So KIAUH sounds as a very good option, as it's already often times used to simplify setup process ### Additional information CC @kyleisah and @Frix-x
Cortexian commented 2023-04-16 06:52:12 +02:00 (Migrated from github.com)

+1, I've been reading about KAMP and it would be amazing if KIAUH supported installing and updating KAMP!

+1, I've been reading about KAMP and it would be amazing if KIAUH supported installing and updating KAMP!
Frix-x commented 2023-04-16 11:30:42 +02:00 (Migrated from github.com)

Thanks @jtrmal for the mention for Klippain. I think this issue could be renamed to "Allow install of user plugins in KIAUH" or something like that.

I see a lot of systems that could benefit from this: KAMP, Klippain, Auto Z calibration plugin (@TitusLabs ), the already included G code shell commands, etc...

Thanks @jtrmal for the mention for Klippain. I think this issue could be renamed to "Allow install of user plugins in KIAUH" or something like that. I see a lot of systems that could benefit from this: KAMP, Klippain, Auto Z calibration plugin (@TitusLabs ), the already included G code shell commands, etc...
dw-0 commented 2023-04-16 11:49:59 +02:00 (Migrated from github.com)

I think developing this feature as a modular system would be the way to go as @Frix-x already stated correctly, so more community developed plugins/extensions/macro-configs could benefit from it. What im currently thinking of is something like an index-file where the corresponding plugin is listed with its name, github repo and "entry point", where KIAUH then can build its interface from to make it available for selection by the user. Every plugin would then need its own install script, so that it could simply be used by KIAUH as the entry-point for execution and installation to keep it simple and more importantly (for me personally) keep maintenance to each plugin developer.

I think developing this feature as a modular system would be the way to go as @Frix-x already stated correctly, so more community developed plugins/extensions/macro-configs could benefit from it. What im currently thinking of is something like an index-file where the corresponding plugin is listed with its name, github repo and "entry point", where KIAUH then can build its interface from to make it available for selection by the user. Every plugin would then need its own install script, so that it could simply be used by KIAUH as the entry-point for execution and installation to keep it simple and more importantly (for me personally) keep maintenance to each plugin developer.
Frix-x commented 2023-04-16 21:12:40 +02:00 (Migrated from github.com)

Yes this is exactly what I had in mind :)
Having an install script in the plugin repo is something ok for me. In fact it's already the case in most of them, so it should be only some adaptions to make it work correctly with KIAUH.

Maybe providing a template script or something could be good to help devs integrate their repo. But this can be done later.

Yes this is exactly what I had in mind :) Having an install script in the plugin repo is something ok for me. In fact it's already the case in most of them, so it should be only some adaptions to make it work correctly with KIAUH. Maybe providing a template script or something could be good to help devs integrate their repo. But this can be done later.
jtrmal commented 2023-04-17 20:45:46 +02:00 (Migrated from github.com)

I'm willing to take a stab at it, if it would be acceptable, to take the weight from @th33xitus shoulders. Probably next week, if that's ok.

I'm willing to take a stab at it, if it would be acceptable, to take the weight from @th33xitus shoulders. Probably next week, if that's ok.
TitusLabs commented 2023-04-17 21:40:43 +02:00 (Migrated from github.com)

That's a great idea. Let me know if I need to adjust anything else for this..

That's a great idea. Let me know if I need to adjust anything else for this..
dw-0 commented 2023-04-17 21:44:49 +02:00 (Migrated from github.com)

I'm willing to take a stab at it, if it would be acceptable, to take the weight from @th33xitus shoulders. Probably next week, if that's ok.

@jtrmal Take your time. Im currently spending all my very limited time in completing #283 to get it shipped in the near future. And im likely not merging anything bigger into the project until #283 is merged first except bugfixes or small stuff which doesn't really touch the things i have to touch there. No idea when it's done, but probably not earlier than 2-3 weeks from now.

> I'm willing to take a stab at it, if it would be acceptable, to take the weight from @th33xitus shoulders. Probably next week, if that's ok. @jtrmal Take your time. Im currently spending all my very limited time in completing #283 to get it shipped in the near future. And im likely not merging anything bigger into the project until #283 is merged first except bugfixes or small stuff which doesn't really touch the things i have to touch there. No idea when it's done, but probably not earlier than 2-3 weeks from now.
ChaosBlades commented 2023-08-16 23:40:01 +02:00 (Migrated from github.com)

I guess this can be added here.

Add LED Effects for Klipper
https://github.com/dw-0/kiauh/issues/371

I guess this can be added here. Add LED Effects for Klipper https://github.com/dw-0/kiauh/issues/371
Frix-x commented 2023-09-22 16:06:33 +02:00 (Migrated from github.com)

I guess it's also the same for Spoolman (issue #373 )

I guess it's also the same for Spoolman (issue #373 )
jtrmal commented 2023-09-22 17:09:39 +02:00 (Migrated from github.com)

I'm sorry for being late on this. It's just my IRL existence was quite
complicated the last few months. I should have time on this soon (November
at the latest)
y.

On Fri, Sep 22, 2023 at 10:06 AM Félix Boisselier @.***>
wrote:

I guess it's also the same for Spoolman (issue #373
https://github.com/dw-0/kiauh/issues/373 )


Reply to this email directly, view it on GitHub
https://github.com/dw-0/kiauh/issues/330#issuecomment-1731484768, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUKYX5WASLLZTCLNXEJSPLX3WLPHANCNFSM6AAAAAAW7QEA4I
.
You are receiving this because you were mentioned.Message ID:
@.***>

I'm sorry for being late on this. It's just my IRL existence was quite complicated the last few months. I should have time on this soon (November at the latest) y. On Fri, Sep 22, 2023 at 10:06 AM Félix Boisselier ***@***.***> wrote: > I guess it's also the same for Spoolman (issue #373 > <https://github.com/dw-0/kiauh/issues/373> ) > > — > Reply to this email directly, view it on GitHub > <https://github.com/dw-0/kiauh/issues/330#issuecomment-1731484768>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ACUKYX5WASLLZTCLNXEJSPLX3WLPHANCNFSM6AAAAAAW7QEA4I> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Frix-x commented 2023-09-25 08:59:31 +02:00 (Migrated from github.com)

Take your time, there is no stress about it. It was just to link some issue that could benefit from this as well to not forget about it or let them now that some universal solution could be availabe in the future for them :)

Take your time, there is no stress about it. It was just to link some issue that could benefit from this as well to not forget about it or let them now that some universal solution could be availabe in the future for them :)
GAZ082 commented 2023-10-12 17:41:07 +02:00 (Migrated from github.com)

+1 for getting spoolman in Kiauh.

+1 for getting spoolman in Kiauh.
roykrikke commented 2023-12-26 16:54:04 +01:00 (Migrated from github.com)

+1 for getting klippain in Kiauh

+1 for getting klippain in Kiauh
XxTopKillerzZ commented 2024-01-17 16:41:40 +01:00 (Migrated from github.com)

+1 for KAMP and spoolman

+1 for KAMP and spoolman
jtrmal commented 2024-01-18 09:01:07 +01:00 (Migrated from github.com)

I've been thinking how to enable this without demanding of too much continuous book-keeping from kiauh
In essence, I think we could expect each project/repo that wants to be compatible with kiauh to contain directory "kiauh" with files "install.sh" and "uninstall.sh" (or maybe just one file taking one of install/uninstall parameters).
Kiauh itself would just offer installing from a git repository (and/or local path) and then running the install script.
A little of book-keeping would be needed to support uninstall (just making note which git repos were installed or installing the projects into a specific master directory and then listing these). But kiauh already does similar stuff, so again, that might not be too hard.

I've been thinking how to enable this without demanding of too much continuous book-keeping from kiauh In essence, I think we could expect each project/repo that wants to be compatible with kiauh to contain directory "kiauh" with files "install.sh" and "uninstall.sh" (or maybe just one file taking one of install/uninstall parameters). Kiauh itself would just offer installing from a git repository (and/or local path) and then running the install script. A little of book-keeping would be needed to support uninstall (just making note which git repos were installed or installing the projects into a specific master directory and then listing these). But kiauh already does similar stuff, so again, that might not be too hard.
dw-0 commented 2024-02-08 22:06:12 +01:00 (Migrated from github.com)

I came up with an idea which im currently already implementing in v6 of kiauh and i wanted to show a small sneak peak of how the current draft is constructed

I was thinking of a new main menu option:
image

The option will take a user to a new submenu with a list of extensions:
image

Each extension itself will have another submenu where installation and removal is possible, the submenu also shows a description of the extension:
image

This is the visible part to the user.

Now to how a contributor could contribute a new extension to this system, which i think is quite simple and i will show it for the gcode shell command extension:
image

There will be an extensions folder in the project. Each extension has to be placed there. Each extension actually has to be a single python module. The module is very simple though:
image
Only two methods have to be implemented. Those two methods are the ones which will be called either by selecting installing or removing an extension. So the contributor has pretty much all the freedoms on how he want to accomplish that. Either through python as well, or simply call a bash script from within those install_extension or remove_extension method. Those are meant to be the so called "entry points" i had in mind in the past.

The second requirement for an extension is a metadata.json, that file is used to specify the module to load by kiauh and to provide general metadata:
image
KIAUH will load all extensions automatically and will dynamically build the extensions menu based on the content of the projects extensions folder. index of the metadata is used for sorting within the extensions menu. I wasn't sure if its really required, but i would think its good to have an option to force the sorting and do not relay on an arbitrary sequence that can occur nor on an alphabetical order. The maintained_by should hold the name of the contributor of that extension or the one that feels responsible if the original maintainer is not maintaining it anymore. Im not sure if version actually makes sense. I think i will drop that value again as i don't see an actual use in it. display_name will hold the name that is used to show the extension name in kiauhs extension menu. description holds the extension description that is shown once the user navigated to the extensions submenu.

So far that is my current idea... feel free to comment on anything i proposed.

I came up with an idea which im currently already implementing in v6 of kiauh and i wanted to show a small sneak peak of how the current draft is constructed I was thinking of a new main menu option: ![image](https://github.com/dw-0/kiauh/assets/31533186/e68e3574-9ccf-4d7e-91be-4d31eec4207e) The option will take a user to a new submenu with a list of extensions: ![image](https://github.com/dw-0/kiauh/assets/31533186/5b4894eb-ba72-453a-9c81-617416fb16c1) Each extension itself will have another submenu where installation and removal is possible, the submenu also shows a description of the extension: ![image](https://github.com/dw-0/kiauh/assets/31533186/4e5baa50-8458-4060-bc85-b18c30bf7141) This is the visible part to the user. Now to how a contributor could contribute a new extension to this system, which i think is quite simple and i will show it for the gcode shell command extension: ![image](https://github.com/dw-0/kiauh/assets/31533186/9d3a746b-cc22-48fe-ad64-a375a1bfd9f4) There will be an extensions folder in the project. Each extension has to be placed there. Each extension actually has to be a single python module. The module is very simple though: ![image](https://github.com/dw-0/kiauh/assets/31533186/a6ebf088-cf6c-4cd3-8616-a002540bd717) Only two methods have to be implemented. Those two methods are the ones which will be called either by selecting installing or removing an extension. So the contributor has pretty much all the freedoms on how he want to accomplish that. Either through python as well, or simply call a bash script from within those install_extension or remove_extension method. Those are meant to be the so called "entry points" i had in mind in the past. The second requirement for an extension is a metadata.json, that file is used to specify the module to load by kiauh and to provide general metadata: ![image](https://github.com/dw-0/kiauh/assets/31533186/eb64174d-8087-4fdc-adc8-c013e6009f71) KIAUH will load all extensions automatically and will dynamically build the extensions menu based on the content of the projects extensions folder. `index` of the metadata is used for sorting within the extensions menu. I wasn't sure if its really required, but i would think its good to have an option to force the sorting and do not relay on an arbitrary sequence that can occur nor on an alphabetical order. The `maintained_by` should hold the name of the contributor of that extension or the one that feels responsible if the original maintainer is not maintaining it anymore. Im not sure if `version` actually makes sense. I think i will drop that value again as i don't see an actual use in it. `display_name` will hold the name that is used to show the extension name in kiauhs extension menu. `description` holds the extension description that is shown once the user navigated to the extensions submenu. So far that is my current idea... feel free to comment on anything i proposed.
Sign in to join this conversation.