cxxopts is a lightweight, header-only C++ library for parsing command-line options following GNU-style syntax. It supports short (-a), long (--option), combined short options (-abc), value attachment via space or equals sign, positional arguments, implicit and default values, boolean flags, vector options with configurable delimiters, and multiple long aliases per option. The library is implemented entirely in a single header file (include/cxxopts.hpp) and requires a C++11 compiler. It provides a clean API: create a cxxopts::Options object, define options via add_options(), parse argc/argv with parse(), and retrieve values from the returned ParseResult. Exceptions are used for error handling but can be disabled via CXXOPTS_NO_EXCEPTIONS. The library has comprehensive test coverage using Catch, continuous integration with CMake, Meson, and Bazel build systems, and includes fuzz testing via OSS-Fuzz. It is mature, well-maintained, and widely adopted (over 4800 GitHub stars). The architecture is monolithic but well-organized, with clear separation of concerns between option definition, value storage, parsing logic, and help text generation. External dependencies are optional: ICU for Unicode help output and std::optional/std::filesystem when available. There are no isolated subcomponents that can be extracted without modification, as the entire library is designed as a cohesive single-file unit.
Comonicon is a Julia CLI generator that transforms function definitions and docstrings into full-featured command-line interfaces with zero duplication, zero overhead, and zero dependencies after code generation. The system follows a classic compiler pipeline: Julia source code is parsed by the frontend (@cast/@main macros) into an AST representation, which is then walked by the codegen module to produce executable Julia Expr, and finally processed by the builder module for installation, system image generation, and distribution. Key features include automatic CLI documentation generation from docstrings, shell completion generation (bash/zsh), and flexible build options via PackageCompiler. The architecture shows clear separation of concerns across frontend, AST, codegen, and builder modules, with thoughtful use of Julia's macro system and type features.