awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
CLIUtils avatar

CLIUtils/CLI11

0
View on GitHub↗
4,322 stars·451 forks·C++·11 viewscliutils.github.io/CLI11/book↗

CLI11

CLI11 is a header-only C++ library for parsing command line arguments and managing configuration files. It maps shell input to typed variables and supports the creation of complex command hierarchies.

The library is distinguished by its support for nested subcommands with infinite depth and prefix matching. It integrates configuration management by allowing application settings to be loaded from TOML or INI files, with the ability to fall back to environment variables.

The project provides a comprehensive set of tools for argument parsing, including flags and positional arguments, alongside a validation framework to enforce mandatory options and mutual dependencies. It also includes automated help documentation generation with customizable formatting and a callback system to trigger custom logic during specific parsing stages.

This dependency-free library is designed for C++11 and later versions.

Features

  • C++ CLI Frameworks - Provides a comprehensive framework for building complex C++ command-line interfaces with nested hierarchies and automated help.
  • Command Line Argument Parsing - Provides the core capability of reading raw command line strings and assigning them to typed variables.
  • Configuration File Integration - Merges settings from INI or TOML files directly into the command line state for flexible application configuration.
  • Automated Help Generators - Automatically produces detailed usage instructions and descriptions for options and subcommands upon user request.
  • C++ Configuration Management - Enables loading and saving application settings using INI or TOML files with environment variable overrides.
  • CLI Argument Parsers - Functions as a primary utility for mapping shell input to typed variables and managing command hierarchies.
  • Nested Command Structures - Supports the organization of subcommands into a nested hierarchy allowing for infinite depth.
  • CLI Configuration Files - Provides a system for reading application settings from configuration files using custom or default paths.
  • Positional Argument Configurations - Assigns values to options based on their order of appearance when no flag name is provided.
  • Command Line Argument Parsers - Provides a header-only implementation for parsing raw shell input strings into structured C++ objects.
  • Typed Variable Bindings - Connects command-line options to existing variables using internal wrappers to avoid the need for custom typed classes.
  • Command Line Flag Definitions - Supports the creation of options that trigger based on presence for boolean toggles or occurrence counters.
  • Mandatory Parameter Enforcement - Enforces that specific command-line options are provided, causing the program to exit if they are missing.
  • Configuration File Parsers - Provides utilities for reading INI and TOML configuration files and mapping them to internal data structures.
  • Help Text Generators - Automatically constructs and formats instructional documentation to inform users about available options and usage patterns.
  • Configuration File Loading - Reads settings from files or environment variables to provide default or override values for the application.
  • Input Validation Frameworks - Passes parsed values through a chain of validator functions to enforce numeric ranges, file existence, or custom formats.
  • Command-Line Type Mapping - Maps command line flags to specific C++ data types to ensure inputs are correctly typed and stored.
  • CLI Argument Validators - Validates that input values meet specific criteria, such as valid file paths or numeric ranges.
  • Input Validation Rules - Checks provided arguments against a set of declarative rules to ensure they meet specific criteria.
  • Terminal Input Validation - Runs checks and transformations on parsed values to ensure they meet specific operational criteria.
  • CLI Input Validation - Enforces data constraints and custom rules on command line arguments to ensure program stability.
  • Input Format Validations - Checks and transforms user entries using predefined rules to ensure numeric constraints or required formats.
  • Argument Grouping - Collects related options into groups to manage mutual exclusivity or organize help output.
  • Multi-Value Argument Capture - Captures one or more arguments into a single container by supporting repeated flags or space-separated lists.
  • CLI Type Converters - Provides utilities for mapping raw command-line strings into native C++ types via custom conversion logic.
  • Default Value Assignment - Assigns fallback values to options when they are omitted by the user and displays them in help text.
  • Configuration-Driven Command Execution - Executes subcommands based on blocks within a configuration file to allow the config to act as a script.
  • Command Callbacks - Provides callbacks that run at specific stages of the parsing process to perform setup or teardown actions.
  • Positional Argument Validation - Tests command line tokens against validators to determine if they are positional options or extra arguments.
  • Environment Variable Configuration - Includes logic for reading command-line argument values directly from specified environment variables.
  • Flag Detection Callbacks - Executes specific functions immediately when a flag is detected during the parsing process.
  • Environment Fallbacks - Implements a fallback mechanism that retrieves values from environment variables when a command-line option is not provided.
  • Option Callbacks - Allows triggering user-defined functions when specific options are parsed to handle complex data types.
  • Cross-Platform Console Tooling - Ensures consistent command-line tool behavior and Unicode support across different operating systems.
  • Command Help Customization - Allows replacing the default help generation with custom programmable functions or classes for bespoke output.
  • Help Layout Templates - Provides a customizable formatter to adjust labels and layouts of the generated help text.
  • Option Dependency Constraints - Tracks requirements and exclusions between options to ensure mutually exclusive or dependent flags are correctly provided.
  • TOML Configuration Support - Supports reading application settings from structured TOML and INI configuration files.
  • Callback Execution Controllers - Triggers specific callback functions immediately after a subcommand and its associated options are parsed.
  • Custom Parsing Logic - Provides mechanisms to execute user-defined logic at specific stages of the argument parsing process.
  • Header-Only Libraries - Distributed as a dependency-free, header-only library for easy integration into C++11 and later projects.
  • Option Dependency Constraints - Implements dependencies where one option requires another to be present or prevents another from being used.
  • CLI Option Dependencies - Implements a validation framework to enforce mandatory options and mutual dependencies between command-line flags.
  • Subcommand - Matches subcommands using unambiguous partial names, allowing users to trigger commands with shortened versions.
  • CLI Syntax Consistency Validation - Ensures that defined options and subcommands are self-consistent and throws exceptions for malformed arguments.
  • Custom Argument Validators - Supports defining unique validation or transformation logic via functions to enforce domain-specific rules.
  • Argument Parsers - Feature-rich command-line parser for C++11 and beyond.
  • C++ CLI Frameworks - Feature-rich command-line parser for modern C++.
  • CLI and Argument Parsing - Feature-rich command-line parser for C++11.
  • Command Line Interfaces - Advanced CLI parsing with single or multi-file support.
  • Command Line Parsing - Feature-rich CLI parsing.

Star history

Star history chart for cliutils/cli11Star history chart for cliutils/cli11

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to CLI11

Similar open-source projects, ranked by how many features they share with CLI11.
  • commandlineparser/commandlinecommandlineparser avatar

    commandlineparser/commandline

    4,817View on GitHub↗

    This library is a .NET command line parser for C# and F# that implements POSIX getopt conventions to map shell arguments into strongly typed objects. It provides a framework for building console applications that process Unix-style flags and options. The project features a routing system that directs program execution based on action-oriented verbs, supporting sub-commands and default actions. It includes an automatic help generator that produces localized usage instructions and formatted help screens based on the defined command options. The toolset covers argument parsing with strongly typ

    C#command-linedotnetdotnet-core
    View on GitHub↗4,817
  • fastapi/typerfastapi avatar

    fastapi/typer

    19,632View on GitHub↗

    This project is a Python framework for building command-line interfaces by converting standard functions into executable programs. It uses type hints to automatically infer and generate argument parsers, validation logic, and help documentation, allowing developers to define complex terminal applications through simple function signatures. The framework distinguishes itself through a decorator-driven registration system that enables the construction of hierarchical command trees. It supports dependency injection to manage shared state and runtime configuration across subcommands, and it utili

    Pythoncliclickpython
    View on GitHub↗19,632
  • yargs/yargsyargs avatar

    yargs/yargs

    11,492View on GitHub↗

    yargs is a command-line interface framework and argument parser for Node.js. It translates raw command-line strings into structured JavaScript objects, providing a toolkit for building terminal applications with nested sub-commands, dedicated handlers, and a structured user interface. The framework distinguishes itself through automated help text generation, which constructs formatted usage menus and instructions based on registered metadata. It also provides shell completion generation for Bash and Zsh and uses string-distance algorithms to offer typo correction suggestions when invalid inpu

    JavaScript
    View on GitHub↗11,492
  • pallets/clickpallets avatar

    pallets/click

    17,560View on GitHub↗

    Click is a Python framework for building command-line interfaces. It provides a declarative approach to defining command structures, allowing developers to map functions to command-line arguments, options, and nested groups using decorators. The framework handles the complexities of parameter parsing, type validation, and help documentation generation automatically. The project distinguishes itself through its hierarchical context system, which propagates configuration and state across nested commands, and its environment-aware parameter resolution that prioritizes command-line inputs, enviro

    Pythoncliclickpallets
    View on GitHub↗17,560
See all 30 alternatives to CLI11→

Frequently asked questions

What does cliutils/cli11 do?

CLI11 is a header-only C++ library for parsing command line arguments and managing configuration files. It maps shell input to typed variables and supports the creation of complex command hierarchies.

What are the main features of cliutils/cli11?

The main features of cliutils/cli11 are: C++ CLI Frameworks, Command Line Argument Parsing, Configuration File Integration, Automated Help Generators, C++ Configuration Management, CLI Argument Parsers, Nested Command Structures, CLI Configuration Files.

What are some open-source alternatives to cliutils/cli11?

Open-source alternatives to cliutils/cli11 include: commandlineparser/commandline — This library is a .NET command line parser for C# and F# that implements POSIX getopt conventions to map shell… fastapi/typer — This project is a Python framework for building command-line interfaces by converting standard functions into… yargs/yargs — yargs is a command-line interface framework and argument parser for Node.js. It translates raw command-line strings… pallets/click — Click is a Python framework for building command-line interfaces. It provides a declarative approach to defining… remkop/picocli — picocli is a command line interface development framework and argument parser for JVM-based applications. It maps… apple/swift-argument-parser — This is a library for building command-line interfaces in Swift. It converts command-line arguments into type-safe…