A simple, small, flexible, single-header C++11 argument parsing library, in
fewer than 2K lines of code.
This is designed to appear somewhat similar to Python's argparse, but in C++, with static type checking, and hopefully a lot faster (also allowing fully nestable group logic, where Python's argparse does not).
UTF-8 support is limited at best. No normalization is performed, so non-ascii characters are very best kept out of flags, and combined glyphs are probably going to mess up help output if you use it. Most UTF-8 necessary for internationalization should work for most cases, though heavily combinatory UTF alphabets may wreak havoc.
This program is MIT-licensed, so you can use the header as-is with no restrictions. I'd appreciate attribution in a README, Man page, or something if you are feeling generous, but all that's required is that you don't remove the license and my name from the header of the args.hxx file in source redistributions (ie. don't pretend that you wrote it). I do welcome additions and updates wherever you feel like contributing code.
The API documentation can be found at https://taywee.github.io/args
The code can be downloaded at https://github.com/Taywee/args
There are also somewhat extensive examples below.
You can find the complete test cases at https://github.com/Taywee/args/blob/master/test.cxx, which should very well describe the usage, as it's built to push the boundaries.
args alternatives and related libraries
Based on the "CLI" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of args or a related project?
args RecommendationsThere are no recommendations yet. Be the first to promote args!
Have you used args? Share your experience. Write a short recommendation and args, you and your project will be promoted on Awesome C++.
Recently added args resources
Be the first to add one!