saveman / octargs

C++ command line argument parsing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub License GitHub Release GitHub Release Build Status Coverity Scan

OCTARGS - Argument Parsing Library

OCTARGS is a C++ library for parsing command line arguments.

  • Header-only library.
  • Requires C++11.
  • Released under MIT license.

Features supported:

  • Arguments without values (e.g. "--verbose").
  • Arguments with values (e.g. "--level=9", "--jobs 9").
  • Exclusive arguments (e.g. "--help").
  • Positional arguments (e.g. "cat file1.txt file2.txt").
  • Short and long names (e.g. "-j", "--jobs", "--parallel-jobs").
  • Subparsers (e.g. "git add ", "git init ").
  • Default values
  • Limiting allowed values
  • Converting values to a requested type (with checking)
  • Storing converted values in object variables automatically (with checking and automatic type detection).
  • Automatic usage documentation.
  • Support for char and wchar_t character types (and more with a limited effort).

Documentation

Project documentation is generated using Doxygen and hosted on GitHub pages.

Examples

Short code snippets showing general concepts are available in the documentation. For a more complicated examples take a look into Examples folder.

About

C++ command line argument parsing library

License:MIT License


Languages

Language:C++ 86.3%Language:CMake 9.4%Language:Makefile 2.4%Language:Shell 1.6%Language:Batchfile 0.3%