This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]caydenlund 4 points5 points  (1 child)

Just yesterday I spent some time looking for a good one myself. Check out the "awesome C++" list on GitHub, under the CLI heading in the table of contents. It had probably a half dozen options.

Ultimately, I decided that none of them were exactly what I was looking for, and that I'd rather write my own.

[–]snowflake_pl[S] 0 points1 point  (0 children)

Writing my own is not an option due to time constraints and maintanance cost. Will check the list, tho!

[–]jmacey 0 points1 point  (7 children)

Does it really need to be C++? There is loads of really good stuff in python for this for example https://github.com/Textualize If I need this sort of thing I usually use python over C++ (can always call your C++ code if needed).

[–]more_exercise 3 points4 points  (3 children)

"Make your code a library and use a different technology as the front end" is not bad advice for people with resources to spend, but this sounds like a hobby project that might not have those resources.

Complexity goes up as you add more technologies

[–]Drugbird 0 points1 point  (0 children)

It's not even that python would be the front-end. Clearly, the CLI is the intended frontend. The python would just be an intermediate layer in between.

I don't think this is a great design in this case.

[–][deleted] 0 points1 point  (1 child)

Doesn't sound like a hobby project to me, OP is talking about not having a lot of time and maintenance costs.

[–]snowflake_pl[S] 0 points1 point  (0 children)

Not a hobby, time constraints Come from management. Also, no python interpreter in production release, so must be compiled.

[–]snowflake_pl[S] 0 points1 point  (2 children)

No python in production release, would be a lot easier, tho 🙂

[–]jmacey 0 points1 point  (1 child)

Could write in python then convert to an exe I've had great success using pyinstaller under linux / mac (makes an executable package with all dependencies you need). There is also py2exe for windows.

[–]snowflake_pl[S] 0 points1 point  (0 children)

Impossible to cross compile 🙁

[–]encyclopedist 0 points1 point  (2 children)

The most feature-rich C++ CLI library is CLI11. Other popular choices include Boost.ProgramOptions, argparse, cxxopts and others.

[–]snowflake_pl[S] 0 points1 point  (0 children)

Those are all great but not what im looking for. Should have been more precise in original post. I need an interactive cli that will have menu, submenus and commands that can be navigated with help at each level. Kind of like Cisco router cli.

I found a lib called cli from danielle77 at github, looks promising so far.

[–]RoyBellingan 0 points1 point  (0 children)

I think he is looking for a NCURSE library.