Kotter (a Kotlin-idiomatic library for writing dynamic console application) hits 1.0!

For the past year, I’ve been working on and off on a library to make it easier to write interesting, dynamic console applications, with an API that feels distinctly Kotlin. Inspired by Compose but without needing to be a compiler plugin, Kotter has been a labor of love, and I am happy to finally present it, a year later, as a stable project.

If a totally free and open source interactive CLI API sounds interesting to you, check out the project on GitHub!

Kotter has an extensive README to walk you through all the features it provides, but in addition to that, I may have gone a little overboard writing examples for it. Honestly, I was just having too much fun. Here’s a supercut of some of my favorite ones:

Just some of the examples bundled with Kotter

You can find the source for all of those (and much more) under the examples/ folder.

Originally, for a totally different project, I wanted to create a CLI experience that felt rich, with animations and colors and input autocompletions. Given how long people have been writing CLI applications, I was surprised when I couldn’t find something that felt fun to use. I think most people out there use JAnsi, but would you rather write this:

ansi().fg(RED).a("Hello").fg(GREEN).a(" World").reset() 

or this?

red { text("Hello") }; green { text(" World") } 

There’s a bunch more to Kotter, but I don’t want this post to get too long. For those of you who are intrigued, just head over to Kotter’s GitHub page and drink in the complete overview.

Enjoy! And of course happy to answer any questions.

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