API & CLI Specs

Command Reference

Detailed specifications for building custom CLI commands, interactive menus, and utilizing core framework utilities.

01 // BaseCommand API

class BaseCommand

The abstract base class for all Clingy commands.

Attribute / Method Type Description
name str CLI command name (e.g., "greet")
help str Short help text shown in --help
execute(args) -> bool Command logic execution. Returns True on success.
get_menu_tree() -> MenuNode REQUIRED: Defines the interactive menu structure.

03 // Logger Utilities

log_success(msg)

Prints a green success message with a checkmark.

log_error(msg)

Prints a red error message with an X.

log_warning(msg)

Prints a yellow warning message.

log_info(msg)

Prints a cyan informational message.