For a framework for building command line tools, the strongest matches are clap-rs/clap (Clap is a robust and widely-used library for command-line), yargs/yargs (Yargs is a robust framework for building Node) and symfony/console (This is a comprehensive PHP framework that provides all). cacjs/cac and urfave/cli round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Find the best CLI framework for your next project. We ranked top open-source tools by activity and features to help you compare and pick the right one.
Clap is a command-line argument parser for Rust that enables developers to define complex interfaces through strongly-typed data structures. It functions as a comprehensive framework for building terminal applications, automating the transformation of raw string inputs into validated, type-safe code representations while simultaneously generating help documentation and usage statements. The library distinguishes itself by offering both a declarative, attribute-based approach and a fluent builder-pattern API, allowing for flexible interface construction. It includes a sophisticated validation
Clap is a robust and widely-used library for command-line argument parsing in Rust that provides essential features like terminal styling, auto-completion, and complex command structure management for building interactive CLI applications.
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
Yargs is a robust framework for building Node.js CLI applications that handles command parsing, help generation, and shell completion, though it lacks built-in interactive prompt components which would require integration with additional libraries.
Console is a PHP CLI framework used for building interactive terminal applications. It functions as a command line interface development toolkit and orchestrator that manages the lifecycle of terminal commands, processes user input, and produces formatted text output. The project includes a terminal capability detector to identify system color modes and window dimensions for creating responsive layouts. It provides a console output formatter for rendering styled text, bordered blocks, and progress bars, alongside a system for creating interactive terminal interfaces. The framework covers com
This is a comprehensive PHP framework that provides all the essential tools for building interactive CLI applications, including command routing, argument parsing, terminal styling, and interactive input collection.
cac is a Node.js CLI framework used to build command line interfaces with a declarative API. It functions as a command line argument parser and a command dispatcher that maps terminal input keywords to specific JavaScript callback functions. The framework features an automated help generator that produces usage instructions and version documentation based on the defined command structures. It manages command aliases and provides a routing system to link specific keyword inputs to execution logic. The toolkit covers command interface definition, including the configuration of global and comma
This is a lightweight CLI framework that provides essential command parsing, routing, and help generation, making it a solid choice for building interactive command-line tools despite lacking built-in terminal styling or advanced plugin systems.
This is a framework for building structured terminal applications in Go. It provides the core components necessary to define a command-line interface, including a system for managing commands, sub-commands, and their associated flags. The library distinguishes itself through an automated help generator that produces formatted usage instructions and manual pages, and a shell completion generator that creates tab-completion scripts for Bash, Zsh, Fish, and PowerShell. It also features a command lifecycle manager to handle pre- and post-execution logic and process exit codes. The toolkit covers
This is a robust framework for building structured CLI applications in Go that excels at command parsing, flag management, and shell completion, though it lacks built-in interactive prompt widgets.
Vorpal is a Node.js interactive CLI framework and terminal user interface library used to build extensible command-line shells. It functions as an interactive command-line parser that converts string input into executable functions, managing the lifecycle of terminal sessions and command routing. The framework is distinguished by a plugin-based extension architecture that allows external modules to register new commands, shared behaviors, and complete command suites into the core environment. It supports the creation of custom shell environments with specialized namespaces and a system for pe
Vorpal is a comprehensive Node.js framework specifically designed for building interactive CLI applications, featuring robust command parsing, plugin-based extensibility, and built-in support for terminal session management.
picocli is a command line interface development framework and argument parser for JVM-based applications. It maps command line options and positional parameters to strongly typed Java methods and fields using a declarative, annotation-based model. The framework provides specific support for native image compilation, producing the reflection and resource configuration files necessary to build standalone binaries with reduced startup overhead. It further distinguishes itself with a dedicated system for generating shell autocompletion scripts and an ANSI terminal stylizer for applying colors and
This is a comprehensive Java framework for building CLI applications that includes robust support for command parsing, terminal styling, and auto-completion, though it focuses more on argument-driven interfaces than complex interactive prompt flows.
oclif is a Node.js framework for building command-line interfaces. It provides a structured system for developing terminal applications with consistent command patterns, argument parsing, and automated help generation. The project features a modular plugin architecture that allows for external functionality to be injected via a manifest-based loading mechanism. It includes a dedicated distribution pipeline and packager to bundle applications into OS-native installers and tarballs for Windows, macOS, and Linux. The framework covers a broad range of development capabilities, including project
oclif is a comprehensive Node.js framework designed specifically for building professional CLI applications, offering robust support for command parsing, plugin architecture, and cross-platform distribution.
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
Typer is a robust framework for building CLI applications that leverages Python type hints to handle command parsing and argument validation, making it a highly effective tool for creating complex terminal interfaces.
Commander.js is a framework for building command-line interfaces and terminal applications. It functions as an argument parsing library and command lifecycle manager, transforming raw terminal input strings into structured, validated objects for use in executable scripts. The system utilizes a recursive command tree pattern, allowing developers to organize complex execution flows through nested subcommands. It features a declarative interface for defining command-line flags and arguments, which maps user input directly to internal state properties. To assist with usability, the framework auto
Commander.js is a widely-used framework for building CLI applications that excels at command parsing and structuring complex command hierarchies, though it lacks built-in interactive prompts and advanced terminal styling compared to more comprehensive suites.
Cobra is a development framework for building command-line applications in Go. It organizes application logic into a hierarchical tree structure where each node represents a command, complete with its own flags and execution logic. This structure allows developers to build complex, nested command interfaces that mirror business domains while maintaining a clean separation between command orchestration and underlying business logic. The framework distinguishes itself through its declarative approach to metadata and configuration. It automatically derives help documentation, usage instructions,
Cobra is a comprehensive framework for building complex, nested CLI applications in Go that provides robust command parsing, automatic help generation, and built-in support for shell auto-completion.
Compose beautiful command line interfaces in Swift
This library provides a framework for defining command-line interfaces and parsing arguments in Swift, serving as a foundational tool for building interactive CLI applications.
Docopt is a command-line argument parser and declarative interface tool that converts raw terminal input into a structured data map. It derives its parsing logic and requirements directly from a standardized POSIX-style help message, using the documentation as the formal specification for the interface. The system implements a POSIX usage pattern parser to translate human-readable help strings into rules for extracting options and positional arguments. It automatically generates help screens and version information based on the internal usage patterns defined by the user. The tool ensures a
This library provides a declarative approach to command parsing and help generation, serving as a foundational tool for building CLI applications even though it lacks built-in support for interactive prompts or terminal styling.
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
Click is a robust Python framework for building complex, nested command-line interfaces that handles command parsing and terminal styling, though it lacks a built-in plugin architecture.
This project is a framework for building interactive, graphical-style terminal applications. It provides a declarative component model that organizes user interfaces into a tree of nested widgets, each managing its own lifecycle, state, and rendering. By subclassing the base application class, developers can construct complex, keyboard-navigable interfaces that run directly within terminal emulators. The framework distinguishes itself through a reactive architecture and a CSS-based layout engine. It uses a reactive attribute system to automatically track state changes and trigger targeted int
Textual is a comprehensive framework for building complex, interactive terminal user interfaces that provides the necessary tools for terminal styling, layout management, and event-driven interactivity.
Kong is a declarative command line interface framework and parser for Go. It maps flags and positional arguments directly into typed Go structures using struct tags, allowing developers to define terminal interfaces through data models rather than manual parsing logic. The project functions as a configuration mapper that populates Go structures from a combination of command-line arguments, environment variables, and JSON files. It distinguishes itself by providing a dependency injection container to pass external services into command handlers and a plugin architecture for dynamic command reg
Kong is a declarative CLI framework for Go that excels at command parsing and structure mapping, providing a robust foundation for building complex command-line applications.
This project is a terminal user interface library for Node.js, designed to facilitate the construction of interactive command-line applications. It provides a comprehensive toolkit of high-level widgets that abstract complex terminal escape codes and rendering logic, allowing developers to build functional interfaces using reusable components. The framework distinguishes itself by implementing a box-model-based layout engine and a virtual DOM-style reconciliation system. These mechanisms enable responsive design patterns—such as percentage-based sizing and relative positioning—to function wit
This library provides a comprehensive toolkit for building interactive terminal user interfaces with complex layouts and widget-based components, making it a strong choice for developing feature-rich CLI applications.
Python Fire is a library that automatically generates command line interfaces from any Python object, function, or class. It removes the need for manual argument parsing by mapping Python dictionaries, lists, and classes directly to terminal commands. The tool converts Python docstrings into formatted terminal help screens and produces shell scripts to enable tab-completion for available commands. It can wrap existing libraries or external modules to expose their functionality via the terminal without requiring modifications to the original source code. The library supports hierarchical comm
Python Fire is a framework that simplifies CLI development by automatically generating interfaces from Python objects, though it focuses more on command parsing and structure than on building interactive prompts or complex terminal styling.
Rich is a comprehensive library for building sophisticated command-line interfaces and terminal applications. It provides a robust console formatting engine and a layout framework that enables developers to render rich text, syntax-highlighted code, and complex data structures directly in the terminal. By utilizing a recursive constraint-based layout engine, the library allows for the creation of hierarchical grids, panels, and trees that maintain their structure even as terminal dimensions change. What distinguishes the library is its ability to manage persistent, real-time terminal interfac
Rich is a powerful library for terminal styling and complex data rendering that serves as a foundational component for building interactive CLI applications, though it focuses more on visual output than on command parsing or plugin architecture.
Termui is a Go terminal user interface library used for building interactive dashboards and visual layouts within a command-line environment. It functions as a TUI layout engine, an interactive CLI framework, and a terminal data visualization toolkit. The library provides a set of specialized widgets for rendering charts, plots, gauges, and tables using character-based graphics. It includes a grid-based system for arranging interface elements using relative coordinates and proportional sizing to create structured displays. The toolkit covers a broad range of capabilities including data visua
This library provides a robust set of tools for building interactive, visual terminal interfaces and dashboards, making it a strong choice for developers focused on the UI and layout aspects of CLI applications.
This project is a framework for building stateful, component-driven terminal user interfaces in Rust. It provides a structured architecture for managing complex command line applications by decoupling rendering logic from application state through a centralized message-passing system. By utilizing a component-based model, it enables developers to construct interactive interfaces that handle event routing, focus management, and lifecycle orchestration in a predictable manner. The framework distinguishes itself through its focus on modularity and developer productivity. It employs trait-based c
This framework provides a robust, component-driven architecture for building complex, stateful terminal user interfaces in Rust, making it a strong choice for developers needing to manage interactive CLI application logic.
Ink is a declarative framework for building interactive command-line applications using a component-based architecture. It functions as a console renderer that maps component trees to terminal output buffers, allowing developers to manage stateful interfaces through standard component reconciliation. By translating high-level layout and style properties into terminal control codes, it enables the creation of responsive, dynamic interfaces within the console. The framework distinguishes itself by integrating a cross-platform layout engine that applies a flexible box model to the character-base
Ink is a component-based framework that enables the creation of complex, interactive terminal user interfaces using React, providing the necessary tools for terminal styling and dynamic layout management.
Create beautiful and testable command-line interfaces.
Cleo is a Python framework designed specifically for building interactive, testable CLI applications with built-in support for command parsing, terminal styling, and prompt handling.
This project is a PHP framework designed for building interactive command-line applications and automation tools. It provides a structured environment for developers to construct console interfaces that handle user input and terminal output, facilitating the management of system-level operations and repetitive development tasks. The framework utilizes a command-pattern dispatching system that maps terminal arguments to executable classes, supported by a dependency-injection container to manage service lifecycles. It incorporates reflective metadata discovery to automatically extract command d
This library provides the necessary tools for command parsing and console interaction within PHP applications, serving as a dedicated framework for building CLI tools.
python-prompt-toolkit is a Python library and terminal user interface framework used for building interactive command line interfaces. It provides a toolkit for constructing complex terminal applications with advanced input handling and layout management. The project features a real-time syntax highlighting engine and a rendering system that ensures correct alignment and display of double-width Unicode characters. It includes specialized capabilities for command line autocompletion, providing ghost text suggestions and searchable input history. The framework covers a broad range of interface
This library provides a robust foundation for building interactive CLI applications with advanced features like autocompletion, syntax highlighting, and complex layout management, though it focuses more on the interface layer than on high-level command parsing or plugin architectures.
Command line parsing, invocation, and rendering of terminal output.
This library provides robust command parsing and terminal output rendering for .NET applications, serving as a foundational framework for building interactive CLI tools.
The complete solution for Ruby command-line executables
This is a dedicated Ruby framework for building CLI applications that provides command parsing and terminal styling, though it lacks a built-in plugin architecture.
Command-line interface builder for the Crystal programming language.
This library provides a structured way to build command-line interfaces in Crystal, offering essential command parsing and interface building capabilities for CLI development.
| Repositorio | Estrellas | Lenguaje | Licencia | Último push |
|---|---|---|---|---|
| clap-rs/clap | 16.5K | Rust | Apache-2.0 | |
| yargs/yargs | 11.5K | JavaScript | MIT | |
| symfony/console | 9.8K | PHP | MIT | |
| cacjs/cac | 2.9K | TypeScript | mit | |
| urfave/cli | 24.1K | Go | MIT | |
| dthree/vorpal | 5.6K | JavaScript | MIT | |
| remkop/picocli | 5.4K | Java | Apache-2.0 | |
| oclif/oclif | 9.5K | TypeScript | MIT | |
| fastapi/typer | 19.6K | Python | MIT | |
| tj/commander.js | 28.3K | JavaScript | MIT |