Skip to content

# falcon-cli v0.2.0 Release Notes

Latest

Choose a tag to compare

@mdizak mdizak released this 05 Oct 18:04
· 4 commits to main since this release

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.rs for enhanced readability and logical flow
  • Enhanced Generics: Added generic type support to cli_get_option(), cli_display_table(), and cli_display_array() for greater flexibility and usability
  • Request Architecture: Introduced request.rs and the CliRequest struct, providing streamlined parameter and flag validation with simplified access to command arguments and flags
  • Command Trait Enhancement: Modified the CliCommand trait's process() function to accept a single CliRequest instance instead of multiple parameters, and now returns anyhow::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() and version_message() methods to CliRouter for better application identification. When version is defined, users can use -v or --version flags 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 running app help

Macro Updates

  • Output Macros: Updated macros where cli_send!() now outputs without a newline, while cli_sendln!() outputs with a newline
  • Logging Integration: Added five new macros for standard log levels: cli_error!(), cli_info!(), cli_warn!(), cli_trace!(), and cli_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