Moclap : a prototype CLI argument parser for Mojo

I wanted to explore mojo reflection capabilities, so i made a prototype CLI parser similar to GitHub - clap-rs/clap: A full featured, fast Command Line Argument Parser for Rust .

I am amazed at how simple it turned out.

Check it out: GitHub - jgsimard/moclap

9 Likes

This is really cool! I knew it wouldn’t take long before we saw a CLI argument parser built with the new reflection features. I love how clean this looks, could be excellent for enabling quick command line applications.

Really cool, nice reference for others as well.

nice! I was actually just about to post a question seeking feedback to potentially create a cli parse.

Are you thinking features like sub-commands, terminal console color handling, shell completions, or user prompting similar to inquire or inquirer are in scope for this project or are you hoping to keep it focused?

the ultimate goal is to replicate the capabilities of clap, so anything in that direction is in scope. First step would be to support most basic types, then subcommands.

Ill continue to work on it but not super fast because I dont have much spare time.

Happy to contribute with anyone on this project !