Skip to content

Introduce new CLI module inspired by PicoCLI#53201

Draft
geoand wants to merge 1 commit intoquarkusio:mainfrom
geoand:quickcli
Draft

Introduce new CLI module inspired by PicoCLI#53201
geoand wants to merge 1 commit intoquarkusio:mainfrom
geoand:quickcli

Conversation

@geoand
Copy link
Contributor

@geoand geoand commented Mar 23, 2026

The main idea of this implementation is to
determine all the necessary annotation metadata
at build time

This new module is used in the Quarkus CLI in
place of PicoCLI. As can be seen, the changes to
Quarkus CLI are minimal


Using this instead of picocli for the quarkus-cli yielded the following difference in startup for time quarkus version

From:

real	0m0.388s
user	0m1.086s
sys	0m0.070s

To:

real	0m0.312s
user	0m0.751s
sys	0m0.046s

For a hello world CLI project using Picocli, the improvement is less impressive.

From:

real    0m0.225s
user    0m0.446s
sys     0m0.053s

To:

real    0m0.189s
user    0m0.408s
sys     0m0.039s

The main idea of this implementation is to
determine all the necessary annotation metadata
at build time

This new module is used in the Quarkus CLI in
place of PicoCLI
@quarkus-bot quarkus-bot bot added area/cli Related to quarkus cli (not maven/gradle/etc.) area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/jbang Issues related to when using jbang.dev with Quarkus labels Mar 23, 2026
@geoand geoand changed the title Quickcli Introduce new CLI module inspired by PicoCLI Mar 23, 2026
@geoand geoand removed area/documentation area/dependencies Pull requests that update a dependency file area/jbang Issues related to when using jbang.dev with Quarkus labels Mar 23, 2026
@github-actions
Copy link

🎊 PR Preview fd77d32 has been successfully built and deployed to https://quarkus-pr-main-53201-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@maxandersen
Copy link
Member

cool @geoand - i'm tired of picocli overhead too but adding a third actually fourth cli parser (picocli, argline(? the one quarkus bot uses), aesh) also is tricky.

have you tried these numbers compare to use picoclis annotation processor for native image?

the diff between helloworld and quarkus cli is the number of commands I assume.

I'm asking because just applying those gave a boost similar to above (if i read the numbers right)

in any case I'll try give it a go.

@geoand
Copy link
Contributor Author

geoand commented Mar 23, 2026

have you tried these numbers compare to use picoclis annotation processor for native image?

I have not, but IIRC, that annotation processor doesn't prevent runtime reflection, right?

but adding a third actually fourth cli parser

Yeah, I totally agree on this. Honestly, if it were not for Quarkus CLI using PicoCLI, I probably would not have bothered

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/documentation area/jbang Issues related to when using jbang.dev with Quarkus labels Mar 23, 2026
@maxandersen
Copy link
Member

crazy thought: I'm wondering if maybe aesh could be adjusted to follow whatever quickcli does so we dont add one more...

@stalep ^^ this is example of overhead we were chatting about :)

@geoand
Copy link
Contributor Author

geoand commented Mar 23, 2026

I'm definitely not tied to this solution; I just wanted to show what is possible.

FWIW, the huge advantage this solution has is that Quarkus CLI is almost unchanged despite the move to the new CLI lib

@maxandersen
Copy link
Member

Ultimately I wish we had a library I could use both in and outside Quarkus apps...is the quickcli "tied" to quarkus?

@geoand
Copy link
Contributor Author

geoand commented Mar 23, 2026

There is no fallback for reading annotations at runtime, but we could certainly add one if we want to support such use cases

@geoand geoand removed area/documentation area/dependencies Pull requests that update a dependency file labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Related to quarkus cli (not maven/gradle/etc.) area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jbang Issues related to when using jbang.dev with Quarkus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants