I've written a (somewhat) similar CLI in rust: https://github.com/nwj/zeke/
These threads are great for collecting a bunch of different implementations and looking at the various design decisions people have made. There's really a surprising amount of variety out there.