Creating a CLI in C++

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • cmake-project-template

    This project is aimed at jump-starting a C/C++ project that can build libraries, binaries and have a working unit test suite. It uses CMake build system and is deliberately completely minimal.

  • What general file structure would I use? I am considering using a CMake template like this. Are there better templates, or should I avoid this approach entirely?

  • fire-hpp

    A C++ library that uses clever tricks to create super low-code, yet fully functional CLIs

  • I am considering using a CLI generator like this. How could I add these commands to my shell? Here, we are simply calling cpp output files (e.g. ./add -x=1 -y=2, where add is a built file). What if I wanted all my commands to be visible elsewhere and with a prefix (e.g. math add -x=1 -y=2)?

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • CLI11

    CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

  • I'd recommend to use CLI11. I was baffled by how much it can do.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts