falcon-cli v0.2.0 Release Notes
This is a major upgrade featuring a comprehensive revamp of the codebase with improved architecture and enhanced functionality.
Core Improvements
- Router Refactoring: Complete rewrite of
router.rsfor enhanced readability and logical flow - Enhanced Generics: Added generic type support to
cli_get_option(),cli_display_table(), andcli_display_array()for greater flexibility and usability - Request Architecture: Introduced
request.rsand theCliRequeststruct, providing streamlined parameter and flag validation with simplified access to command arguments and flags - Command Trait Enhancement: Modified the
CliCommandtrait'sprocess()function to accept a singleCliRequestinstance instead of multiple parameters, and now returnsanyhow::Result<()>for improved error propagation
New Features
- Text Editor Integration: Added
cli_text_editor()function for in-CLI text editing capabilities - Progress Bar Support: Added
cli_progress_bar()function for visual progress tracking - Application Metadata: Added
app_name()andversion_message()methods toCliRouterfor better application identification. When version is defined, users can use-vor--versionflags to display version information - Global Flags: Introduced support for global flags via
CliRouter::global()function. These flags are excluded from command-specific arguments and are displayed in the main help screen when runningapp help
Macro Updates
- Output Macros: Updated macros where
cli_send!()now outputs without a newline, whilecli_sendln!()outputs with a newline - Logging Integration: Added five new macros for standard log levels:
cli_error!(),cli_info!(),cli_warn!(),cli_trace!(), andcli_debug!() - Optional Logging Feature: When the "log" feature is enabled, log level macros execute both display to stdout and the corresponding
log::LEVEL()function, enabling unified logging and display functionality