Like the other poster, we have to compile it separately on different architecture machines (we are on Bitbucket). We use Quarkus as the base and picocli as the cli https://quarkus.io/guides/picocli. Quarkus takes care of a lot and makes the native image experience nicer. Size wise, for internal use our users don't complain, since we are all devs.
Do you use any cli library in front? Is 12-20mb acceptable for a cli executable?
Working on a cli tool poc for work here, hence the interest.