Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. cli

cli

BSL-1.0C++v2.2.0

A cross-platform header-only C++14 library for building interactive command line interfaces with Cisco-style navigation.

GitHubGitHub
1.3k stars156 forks0 contributors

What is cli?

cli is a header-only C++14 library for building interactive command-line interfaces with hierarchical menus, persistent history, and autocompletion. It solves the problem of creating professional CLI tools that mimic Cisco-style interfaces, supporting both local and remote sessions via telnet. The library provides an asynchronous architecture that simplifies development of single-threaded applications without synchronization concerns.

Target Audience

C++ developers building interactive command-line tools, network management applications, or embedded systems requiring professional CLI interfaces. Particularly useful for those creating tools with hierarchical menus and remote access capabilities.

Value Proposition

Developers choose cli for its header-only simplicity, cross-platform compatibility, and rich feature set including telnet support and asynchronous architecture. It stands out by providing Cisco-style navigation patterns without external dependencies for local sessions.

Overview

A library for interactive command line interfaces in modern C++

Use Cases

Best For

  • Building network equipment configuration interfaces
  • Creating embedded system management CLIs
  • Developing remote administration tools with telnet access
  • Implementing interactive debugging consoles
  • Building teaching tools for command-line interface concepts
  • Creating hierarchical menu-driven applications

Not Ideal For

  • Projects requiring advanced Unicode or internationalization support without custom stream implementations
  • Applications needing high-performance, non-blocking I/O beyond the provided async schedulers
  • Teams wanting a drop-in solution with pre-defined command sets for common administrative tasks
  • Environments where C++14 or later is not available or where minimal dependencies are critical

Pros & Cons

Pros

Header-Only Simplicity

Being header-only means no separate compilation is needed; developers just include the headers, reducing build complexity and dependency management, as emphasized in the Installation section.

Rich Interactive Features

Provides persistent command history, tab autocompletion, hierarchical menus, and color output, mimicking professional CLI tools like Cisco interfaces, as shown in the demo GIFs and Features list.

Async and Thread-Safe Architecture

Asynchronous command execution with schedulers allows for single-threaded applications without synchronization worries, detailed in the Async programming section with examples like LoopScheduler.

Remote Session Support

Built-in telnet server enables remote CLI access, expanding usability for network management, with support for both boost and standalone asio, as described in the Dependencies and Async sections.

Cons

Limited Unicode Support

The README explicitly states that cli does not have effective Unicode support by default, requiring custom stream implementations like boost::nowide for proper handling, which adds complexity.

Dependency on Asio for Remote Features

To enable telnet server functionality, the library depends on asio (standalone or boost), adding external dependencies and setup complexity that might not be desired for local-only applications.

Niche Ecosystem and Documentation

As a specialized C++ library, it has a smaller community and less extensive documentation compared to more general CLI frameworks, which could hinder troubleshooting and adoption for broader use cases.

Frequently Asked Questions

Quick Stats

Stars1,348
Forks156
Contributors0
Open Issues35
Last commit4 months ago
CreatedSince 2016

Tags

#command-line-interface#asio#cli-framework#interactive#c-plus-plus-14#c-plus-plus#ui-library#cli#interactive-cli#cross-platform#parser#header-only

Built With

A
ASIO
C
CMake
C
C++14

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

FTXUIFTXUI

:computer: C++ Functional Terminal User Interface. :heart:

Stars10,006
Forks579
Last commit3 days ago
cxxoptscxxopts

Lightweight C++ command line option parser

Stars4,752
Forks641
Last commit6 days ago
CLI11CLI11

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

Stars4,258
Forks442
Last commit5 days ago
imtuiimtui

ImTui: Immediate Mode Text-based User Interface C++ Library

Stars3,565
Forks151
Last commit6 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub