A comment: the "commandline" name does not seem to be a good fit -- I clicked on the link expected to something related to a command line, like a parser or a help printer, but it actually has nothing for it... So perhaps a better name would have something about terminal or console or reading or TUI (text user interface).
Also, have you considered using one of the BSD/MIT readline replacements (like replxx, libedit, or linenoise) as a backend, instead on implementing your own? This can potentially save a lot of work adding proper terminal type support, highlighting, advanced editing etc...
commandline was a bad naming decision, I agree, and it's definitely not too late to change it.
Using a readline equivalent as a backend is a really nice idea, it just has to be Windows, Linux and MacOS compatible. I'll look into those, thank you for the idea, that'd be a great improvement
I love building small interactive programs that run in your terminal, and for that, you often need a way to print out and get input, at the same time, asynchronously. For example, a chat app will need to print incoming messages, even while the user is typing.
`commandline` is a cross-platfrom library, written in modern C++, which aims to solve exactly this issue. It allows an app that uses it to print messages from multiple threads blindly, while handling on-demand input from the user. It's similar to GNU's getline in this way, but is MIT Licensed which was one requirement I had in a non-GPL project in the past.
I've just released version v1.0.0 of it, the first release, after around 1 year of on-and-off development, and am very excited to get feedback from this awesome community!
I'm here for any questions, and the GitHub is also open for any issues that may come up!
Also, have you considered using one of the BSD/MIT readline replacements (like replxx, libedit, or linenoise) as a backend, instead on implementing your own? This can potentially save a lot of work adding proper terminal type support, highlighting, advanced editing etc...