kubernetes-sigs / kui

A hybrid command-line/UI development experience for cloud-native development
Apache License 2.0
2.84k stars 184 forks source link

Need a skeleton project to start a new client from scratch #5799

Closed ujibang closed 4 years ago

ujibang commented 4 years ago

Describe the topic

I'm working on a Kui derived shell to help executing HTTP requests against RESTHeart API server called RESTHeart Shell

It somehow follows enhancement proposal https://github.com/IBM/kui/issues/4477

I managed to create a first prototype starting form Oui, since the README states:

Kui can form the basis for delivering CLI-driven GUI experiences. For example, Kui has a custom client for Apache OpenWhisk: Oui

However Oui is built from Kui 6.0.5 (latest Kui release is currently 8.12.0) and has not been updated in 8 months.

I tried to update my prototype to latest Kui release but found it very hard due to lack of documentation. It is not clear to me how to correctly define a custom client definition plugin.

Your suggestions for this topic

I think it would be super useful to have a skeleton repo to start a project from scratch with minimal dependency to kui plugins. Something like https://github.com/kui-shell/plugin-sample (that uses Kui 5.2.21)

starpit commented 4 years ago

Howdy. Agreed. We have this: https://github.com/IBM/kui/blob/master/docs/example/AnimalApp/README.md

The intention behind this was to serve as an example for coding a custom Kui from an external repository. Note how the package.json of this "AnimalApp" points to the npm-published versions of Kui.

A couple of notes:

1) We should be ready to publish Kui 9.0.0 by the end of the week. This won't have any breaking changes at this level of integration, but does introduce a new Notebook architecture and some updates to the UI to make Kui present more as a notebook. Hence the major bump.

2) Why the name "AnimalApp"? It includes some sample commands (in plugin-example) that offer some goofy cat-centric commands. The wiki shows them in action: https://github.com/IBM/kui/wiki, but we have not yet documented the AnimalApp client in the wiki.

3) Make sure to read the WARNING in that readme.

~4) There is a PR in flight to update the README, and fix an issue with developing a browser-based client: https://github.com/IBM/kui/pull/5804. The README update improves the documentation to improve the Electron versus browser client distinctions.~ merged

ujibang commented 4 years ago

Super! I was able to easily update to latest release. Thank you very much!

Just wondering how UsageModel works now!

With 6.0.5 just throwing an UsageError leads to display a nice usage output. With latest release we get no output.

I noticed that the command help was commented out from plugin-core-support. Is this the cause for the missing usage output?

ujibang commented 4 years ago

The AnimalApp is a good skeleton project

starpit commented 4 years ago

thanks for the help with this!