Closed afbora closed 7 months ago
I wonder if we should use the existing main groups instead of plugin:
kirby install:plugin getkirby/kql
kirby upgrade:plugin getkirby/kql
kirby remove:plugin getkirby/kql
Especially since there already is make:plugin.
We broke this for the uuid commands. But maybe we could change that in the future. I think we really just need to commit to one standard. @distantnative @lukasbestle what are your thoughts on this?
I agree it would be good to be consistent.
I don't have a strong preference about the order. Namespacing by type (like plugin:install
) fits well semantically, but namespacing by command (like install:plugin
) works better with commands like make
(we have many of them and most types will only ever have a make
command.
install:*
, remove:*
, upgrade:*
syntax make sense but I still favor of plugin:*
syntax. I'm thinking to create plugin command about versions. We can use plugin:*
syntax for all plugin related commands. For example: kirby plugin:check
and kirby plugin:check --all
. This commands checks plugin(s) versions.
I agree that the plugin namespace is a bit of an extra case here. I think there will be a lot of additional useful commands for plugins.
Maybe in this case we could think about adding aliases for install, remove and upgrade? On the other hand, aliases could also create even more confusion. Let's maybe keep the plugin namespace as default for now. We can still add aliases later if needed.
Great! Do you want to me change command names? uptate
to upgrade
and delete
to remove
.
@bastianallgeier Ready to review and need your last touches 🙂
I made a first few small changes and had a few thoughts:
I think we need to check for the plugin type in the composer json. So far I can basically install any Github repo and it does not really need to be a proper Kirby plugin. I think it would be good to use this as a sanity check.
If a plugin does not have an index.php and does not call Kirby::plugin(), it cannot be removed.
@bastianallgeier If anonymous plugin installed (for ex: /site/plugins/hello-world
), you need to call kirby plugin:remove plugins/hello-world
. Anonymous plugins registry name is plugins/DIRNAME
.