CtrlAltDevelopOP•

I was working on a command line application, and I found that none of the existing libraries had the features or ease-of-use that I was looking for. So I made this library to be a simple and powerful way to write just about any type of CLI.

Let me know what you think!

8
JustMy42Cents•

There's already a ton of Kotlin arg parsers, but having tried some out, I have to say this just might be my favorite. Any chance you could extend this library to a sensible .properties parser as well?

7
CtrlAltDevelopOP•

I'm glad you like it! I could potentially add something like that, but it seems like CLIs and file parsing are different enough that it might be better as a separate library. What kind of use cases did you have in mind?

2
JustMy42Cents•

It's both parametrization of an application, if you think about it. I wouldn't mind a parser that reads application config from a .properties file, but allows to override these settings with main args. Kind of like konfig without the ugly parts.

3

Yeah, would be really cool to integrate external configs and maybe even ENV configs into one tool, so the same param could have:

  • app-level default
  • file-based-config-level value
  • ENV-level override
  • CLI-level override

Seems like it might be (relatively) straightforward to include, though it does add complexity.

Maybe it could be handled as an external library which hooks into the initial processing and updates ARGV automatically or something like that.

2
LouizFC•

Thank you a ton. Most libraries rely on annotations, mostly inhereted from java, but it's good to see one that fits kotlin syntax so well.

4
deraj123•

Looks really nice. I'm looking forward to trying it out. I found myself in the same position and fully intended to write something like this (was even looking at using click as inspiration). But now I don't have to. Thanks!

2
sureshg•

Looks nice. I used https://github.com/airlift/airline for my last java project. Is there any chance it gets uploaded to maven central? Would be really helpful in corporate envs.

2
knur•

Does anyone find the name suggestive?

-9