You are currently viewing Kotlin Binary CLI Tool Template – quickly create your own CLI tool and compile it down to binary

Kotlin Binary CLI Tool Template – quickly create your own CLI tool and compile it down to binary

Hi everyone!

If you ever wanted to create a fast, native binary tool using Kotlin and all the Java libraries you know, I’ve prepared a neat template that does just that.

It has clear instructions what to download and how to prepare both IDE and CLI environment and finally how to build a native binary of the project with one simple script (.sh so only Linux and MacOS).

It uses GraalVM for compilation and Clikt library for really easy configuration of program input arguments and help.

===========Here it is: https://github.com/grodzickir/kotlin-jvm-cli-native-tool-template

I was wondering for a long time if I can use Kotlin to create some native cli program (I really hate bash) and do not spend a month trying to compile it AND do not twist my current JDK setup, so I can still work.

So I prepared this repo for future me and maybe for someone else, with all of the needed instructions and a nice build script.

Please let me know what you think 😉

submitted by /u/rgrodzicki
[link] [comments]