Open yschimke opened 5 years ago
Feel free to close, this is a suggestion, I don't have plans to actively work on this.
Another cool idea, thank you! So basically we want to generate a script very similar to the linked script from a picocli model.
Looking at the linked rsocket-cli.rb
script, missing items not in the picocli model (so user must provide):
Anything else?
That seems about right. BTW I converted a project from airline to picocli and the experience was great. Particularly because I want it to work well with graal etc and it seems to rely a lot less on reflection.
https://github.com/rsocket/rsocket-cli/commit/099792ffcca62383e9840b913d3d307709d394af
I've implemented a few CLIs now, so really appreciate the functionality this library provides. Some of these suggestions are towards allowing a developer to just write the Main class, and have shell integration, installation, user help for free. I guess I'm wondering how you could tie the experience together, or whether that is something a framework like micronauts would provide?
I've been working on a tool to make this possible: https://jreleaser.org
Bonus: it's CLI option uses picocli (thanks @remkop!)
@aalmiray Very nice! I am happy to include a link to jreleaser from the picocli docs, maybe the Packaging section. Do you feel like providing a PR?
Love to! Where can I find the doc sources? i cloned this repo and found HTML files under docs
but it looks to me the site is built with Asciidoc, isn't it? Another weird thing is that Ii get the following files already modified upon checking out my fork
modified: docs/A-Whirlwind-Tour-of-Picocli.html
modified: docs/announcing-picocli-1.0.html
modified: docs/autocomplete.html
modified: docs/build-great-native-cli-apps-in-java-with-graalvm-and-picocli.html
modified: docs/feedback.html
modified: docs/groovy-2.5-clibuilder-renewal-part1.html
modified: docs/groovy-2.5-clibuilder-renewal-part2.html
modified: docs/groovy-2.5-clibuilder-renewal.html
modified: docs/man/index.html
modified: docs/migrating-from-commons-cli.html
modified: docs/picocli-2.0-do-more-with-less.html
modified: docs/picocli-2.0-groovy-scripts-on-steroids.html
modified: docs/picocli-on-graalvm.html
modified: docs/picocli-programmatic-api.html
modified: docs/quick-guide.html
modified: docs/zh/picocli-2.0-do-more-with-less.html
modified: docs/zh/picocli-2.0-groovy-scripts-on-steroids.html
Is there some sort of trigger that modifies these files?
Hi @aalmiray! The modified files are generated HTML files, you can ignore them. I thought I had fixed things so that when I commit files, line endings are converted from CRLF to LF, but perhaps something went wrong there... I hope it is not too inconvenient.
The source for the manual is here: https://github.com/remkop/picocli/blob/master/docs/index.adoc
When you run gradlew asci
, the generated index.html will appear in build/docs/index.html
.
I'd also like a brew package ideally. It's a very popular package management framework!
I'd also like a brew package ideally. It's a very popular package management framework!
@mayurankv This is supported via JReleaser: https://picocli.info/#_jreleaser
It's fairly trivial to expose and bundled java app with launcher scripts via homebrew without any permission from upstream brew maintainers
e.g. https://github.com/yschimke/homebrew-tap/blob/master/rsocket-cli.rb#L18
This script makes the following brew command possible
Since you are generating bash completion scripts, it seems like a logical step to generate a homebrew file.