A robust DSL for writing command line interfaces in the Crystal programming language.
Admiral.cr is a DSL for creating command-line interfaces in Crystal. It provides macros and abstractions to define commands, flags, arguments, and subcommands with type safety and auto-generated help. It solves the problem of building maintainable, feature-rich CLIs without manual parsing boilerplate.
Crystal developers building command-line tools, utilities, or applications that require complex argument parsing and subcommand structures.
Developers choose Admiral.cr for its seamless integration with Crystal's type system, reducing runtime errors and offering a declarative, intuitive API for CLI definition. Its focus on type safety and built-in features like auto-help and version flags accelerates development.
A robust DSL for writing command line interfaces written in Crystal.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Flags and arguments are defined with Crystal types like UInt32 or custom types via constructors, catching errors during compilation rather than runtime, as shown in the typed flags examples.
Supports nested commands via register_sub_command macro, making it easy to organize complex CLIs hierarchically, demonstrated in the sub-commands section with planetary and municipal examples.
Automatically creates help text with descriptions for flags and arguments using define_help, reducing manual boilerplate and ensuring consistency, as illustrated in the command help section.
Allows overriding default naming (e.g., underscore to hyphen), supports short/long flags, enumerable values, and custom types, per the additional flag options with description, default, and required settings.
The README's todo list explicitly marks bash and zsh completion as not implemented, which is a standard feature in mature CLI libraries and limits user convenience.
The project acknowledges it's not 'Fully Tested' in the todo list, potentially affecting reliability and bug detection for production-critical applications.
Tied exclusively to Crystal, it's unsuitable for multi-language projects, and Crystal's smaller ecosystem may limit third-party integrations or community support compared to languages like Go or Rust.