Post

Built a CLI application with Java? Which library did you use? What challenges have you encountered? I'd love to hear about your experience! #Java

7 reposts18 likes

Flow Components are kinda similar to Inquirer but Inquirer is way more simpler to use and provides many different types of components out of the box.

Thanks for sharing! My main challenge has been integration testing, especially for CLIs that perform operations on the file system, downloading/modifying files and so on. I haven’t found a good way yet to achieve that, combined with the power of Testcontainers.

Usually I use all quarkus package that comes with cli solution (if I’m not wrong based on picocli). My biggest challenge is trying not to solve all problems of the world in one cli application

For kcctl 🧸 (github.com/kcctl/kcctl), we are using picocli, compiled into native binaries via @quarkus.io and @graalvm.org. A bit of a learning curve ("pico" is a bit of a misnomer), but once you got the hang, it's really good. Fast enough to launch it even for tab completions, doing a REST call!

github.comGitHub - kcctl/kcctl: A modern and intuitive command line client for Kafka ConnectA modern and intuitive command line client for Kafka Connect - kcctl/kcctl

Thanks! As you asked for challenges, setting up the build for all the platforms was one. Until recently, GitHub Actions didn't support Apple Silicon runners, so you couldn't build native binaries for Arm Macs. But it is supported by now.