Expand description
hyperlane-cli
A command-line tool for Hyperlane framework.
Re-exports§
Macros§
- output_
macro - Macro for outputting colored text to the terminal.
- println_
error - Prints an error message with red background and white text.
- println_
success - Prints a success message with green background and white text.
- println_
warning - Prints a warning message with yellow background and white text.
Structs§
- Args
- Parsed command line arguments
- Color
Contrast - Provides utilities for calculating and ensuring color contrast ratios.
- Color
Output - Represents a colored text output with formatting options.
- Color
Output Builder - Builder pattern for constructing ColorOutput configurations.
- Color
Output List - Represents a list of ColorOutput configurations for sequential execution.
- Color
Output List Builder - Builder pattern for constructing ColorOutputList configurations.
- Logger
- Custom logger implementation for the hyperlane-cli.
- NewProject
Config - Configuration for creating a new project
- Task
- Represents a collection of text tasks to be executed sequentially.
- Template
Config - Configuration for template generation
- Text
- Configurable text display with color, background and style options.
Enums§
- Color
- Predefined color constants for easy text formatting.
- Color
Type - Represents different types of colors that can be used for text formatting.
- Command
Type - Available commands
- Display
Type - Specifies whether color applies to text or background.
- Model
SubType - Model subtypes for organizing data structures
- NewError
- Errors that can occur during project creation
- Template
Error - Errors that can occur during template generation
- Template
Type - Types of template components that can be generated
Constants§
- COMMON_
YEAR - Day count of every month in a common (non-leap) year.
- DAYS
- Abbreviated English weekday names, indexed by weekday number.
- LANG_
AR_ SA_ LOCALE - POSIX locale string of the Arabic (Saudi Arabia) UTF-8 encoding.
- LANG_
AR_ SA_ NAME - Human-readable name of the Arabic (Saudi Arabia) locale.
- LANG_
DE_ DE_ LOCALE - POSIX locale string of the German (Germany) UTF-8 encoding.
- LANG_
DE_ DE_ NAME - Human-readable name of the German (Germany) locale.
- LANG_
ENV_ VAR - Environment variable holding the locale of the current session.
- LANG_
EN_ US_ LOCALE - POSIX locale string of the English (United States) UTF-8 encoding.
- LANG_
EN_ US_ NAME - Human-readable name of the English (United States) locale.
- LANG_
ES_ ES_ LOCALE - POSIX locale string of the Spanish (Spain) UTF-8 encoding.
- LANG_
ES_ ES_ NAME - Human-readable name of the Spanish (Spain) locale.
- LANG_
FI_ FI_ LOCALE - POSIX locale string of the Finnish (Finland) UTF-8 encoding.
- LANG_
FI_ FI_ NAME - Human-readable name of the Finnish (Finland) locale.
- LANG_
FR_ FR_ LOCALE - POSIX locale string of the French (France) UTF-8 encoding.
- LANG_
FR_ FR_ NAME - Human-readable name of the French (France) locale.
- LANG_
HI_ IN_ LOCALE - POSIX locale string of the Hindi (India) UTF-8 encoding.
- LANG_
HI_ IN_ NAME - Human-readable name of the Hindi (India) locale.
- LANG_
IT_ IT_ LOCALE - POSIX locale string of the Italian (Italy) UTF-8 encoding.
- LANG_
IT_ IT_ NAME - Human-readable name of the Italian (Italy) locale.
- LANG_
JA_ JP_ LOCALE - POSIX locale string of the Japanese (Japan) UTF-8 encoding.
- LANG_
JA_ JP_ NAME - Human-readable name of the Japanese (Japan) locale.
- LANG_
KO_ KR_ LOCALE - POSIX locale string of the Korean (South Korea) UTF-8 encoding.
- LANG_
KO_ KR_ NAME - Human-readable name of the Korean (South Korea) locale.
- LANG_
NL_ NL_ LOCALE - POSIX locale string of the Dutch (Netherlands) UTF-8 encoding.
- LANG_
NL_ NL_ NAME - Human-readable name of the Dutch (Netherlands) locale.
- LANG_
PT_ PT_ LOCALE - POSIX locale string of the Portuguese (Portugal) UTF-8 encoding.
- LANG_
PT_ PT_ NAME - Human-readable name of the Portuguese (Portugal) locale.
- LANG_
RU_ RU_ LOCALE - POSIX locale string of the Russian (Russia) UTF-8 encoding.
- LANG_
RU_ RU_ NAME - Human-readable name of the Russian (Russia) locale.
- LANG_
SV_ SE_ LOCALE - POSIX locale string of the Swedish (Sweden) UTF-8 encoding.
- LANG_
SV_ SE_ NAME - Human-readable name of the Swedish (Sweden) locale.
- LANG_
TH_ TH_ LOCALE - POSIX locale string of the Thai (Thailand) UTF-8 encoding.
- LANG_
TH_ TH_ NAME - Human-readable name of the Thai (Thailand) locale.
- LANG_
VI_ VN_ LOCALE - POSIX locale string of the Vietnamese (Vietnam) UTF-8 encoding.
- LANG_
VI_ VN_ NAME - Human-readable name of the Vietnamese (Vietnam) locale.
- LANG_
ZH_ CN_ LOCALE - POSIX locale string of the Chinese (China) UTF-8 encoding.
- LANG_
ZH_ CN_ NAME - Human-readable name of the Chinese (China) locale.
- LEAP_
YEAR - Day count of every month in a leap year.
- MONTHS
- Abbreviated English month names, indexed by month number minus one.
Traits§
- Color
Display - Trait for converting colors to their ANSI escape sequences.
Functions§
- __
println_ text - Prints a colored, timestamped block to the terminal.
- calculate_
time - Calculates the current year, month, day, hour, minute, second, millisecond and microsecond.
- color256_
bg_ color - Generates color code for background colors in 256 colors.
- color256_
fg_ color - Generates color code for foreground colors in 256 colors.
- compute_
date - Computes the year, month, and day from days since Unix epoch (1970-01-01).
- date
- Gets the current day, without the time.
- day
- Gets the current day.
- execute_
new - Execute new command to create a project from template
- execute_
template - Execute template generation
- execute_
watch - Execute watch command using notify crate to monitor file changes and re-run cargo run when source files are modified.
- from_
env_ var - Gets the time zone offset from the system environment variable.
- gmt
- Gets the current date and time in GMT format.
- hour
- Gets the current hour.
- is_
leap_ year - Determines if a year is a leap year.
- micros
- Gets the current timestamp in microseconds.
- millis
- Gets the current timestamp in milliseconds.
- minute
- Gets the current minute.
- month
- Gets the current month.
- output
- Executes the output operation with the given formatting.
- output_
list - Executes a sequence of output operations.
- parse_
args - Parse command line arguments
- print_
help - Print help message
- print_
version - Print version
- rgb_
bg_ color - Generates color code for true color background colors.
- rgb_
fg_ color - Generates color code for true color foreground colors.
- second
- Gets the current second.
- time
- Gets the current time, including the date and time.
- time_
micros - Gets the current time with microseconds, including the date and time.
- time_
millis - Gets the current time with milliseconds, including the date and time.
- timestamp
- Gets the current timestamp in seconds since Unix epoch.
- timestamp_
micros - Gets the current timestamp in microseconds since Unix epoch.
- timestamp_
millis - Gets the current timestamp in milliseconds since Unix epoch.
- year
- Gets the current year.