class

Bootstrap::CLI

Inherits Reference < Object

Base CLI registry with shared helpers for busybox-style dispatch.

Class methods

aliases

Additional command aliases for this class.

Source
command_line

Return the primary CLI command name for this class.

Source
command_line_override

Optional override for the derived command line name.

Source
command_lines

Return all command line entries handled by this class.

Source
dispatch(argv : Array(String)) : Tuple(String, Array(String))

Selects a command name based on the executable name or the first argument when invoked via the canonical name.

Source
help_entries

Help entries for this command and its aliases.

Source
invoked_name(default : String = "bq2") : String

Returns the basename of the invoked executable, falling back to default when it cannot be resolved (e.g., when Process.executable_path is nil).

Source
parse(args : Array(String), banner : String, &block : OptionParser -> ) : Tuple(OptionParser, Array(String), Bool)

Builds an OptionParser with a common -h/--help toggle and returns the parser plus the parsed args array so callers can inspect remaining args.

Source
register(klass : CLI.class) : Nil

Register a CLI class for every declared command line entry.

Source
registry

Return the registry mapping of command names to CLI classes.

Source
run(_args : Array(String), _command_name : String) : Int32

Run the command with the provided args and command name.

Source
run(argv = ARGV) : Int32

Dispatch a CLI invocation to the registered command class.

Source
run_help(exit_code : Int32 = 0) : Int32

Print the shared help output.

Source
run_install

Create CLI symlinks in ./bin for registered commands that are exposed as symlinks (excluding default/flag-only entries).

Source
summary

One-line summary for help output.

Source