A bash-based framework for creating command-line programs with subcommands, supporting any scripting language.
Sub is a framework for creating command-line programs that use subcommands, similar to git or rbenv. It allows developers to structure their CLI tools with separate, standalone executables for each subcommand, supporting any scripting language. The framework handles autocompletion, self-documentation, and shell integration automatically.
Developers and system administrators who need to build or maintain command-line tools with multiple subcommands, especially those who want language flexibility and built-in features like autocompletion.
Sub provides a convention-based, language-agnostic approach to building CLI tools, eliminating boilerplate for subcommand management, documentation, and autocompletion while encouraging modular, reusable scripts.
a delicious way to organize programs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows subcommands in any scripting language like bash, Ruby, or Python, enabling teams to use preferred tools without language lock-in, as shown in the README's examples.
Provides automatic subcommand discovery and opt-in argument completion via a --complete flag, reducing manual shell integration work, detailed in the autocompletion section.
Magic comments automatically generate usage and help text, simplifying documentation with examples like 'Summary:' and 'Help:' blocks in subcommands.
Enforces a standard directory structure (e.g., bin, libexec) and naming, minimizing configuration and encouraging modular, reusable scripts as per the philosophy.
The main executable is implemented in bash, limiting cross-platform compatibility and requiring bash availability, which may not suit all development environments.
Each subcommand runs as a separate process, introducing performance overhead that can be noticeable in tools with frequent invocations or high-throughput needs.
Setup requires cloning, running prepare.sh, and modifying shell profiles, which is more involved than using package managers or integrated CLI frameworks.