Skip to main content

Module cli

Module cli 

Expand description

CLI interface

StructsΒ§

Args
Cross-platform cluster SSH tool
CLIArgsCommand
Default implementation of ArgsCommand trait
CLIConfigManager
Default implementation of ConfigManager trait
CLIEnvironment
Default implementation of Environment trait
CLIInput
Default implementation of Input trait that reads from stdin
CLILoggerInitializer
Default implementation of LoggerInitializer trait
CLIOutput
Default implementation of Output trait that writes to stdout/stderr
MainEntrypoint
Main Entrypoint struct

EnumsΒ§

Commands πŸ”’
The command CLI subcommand

TraitsΒ§

ArgsCommand
Trait for Args operations to enable mocking in tests
ConfigManager
Trait for configuration management to enable dependency injection and testing
Entrypoint
Trait defining the entrypoint functions of the different subcommands
Environment
Trait for environment operations to enable dependency injection and testing
Input
Trait for reading input to enable dependency injection and testing
LoggerInitializer
Trait for logger initialization to enable mocking in tests
Output
Trait for writing output to enable dependency injection and testing

FunctionsΒ§

build_generate_config πŸ”’
Build the config emitted by generate-config. A set ssh_config_path both prepends -F <path> to client.arguments and sets client.ssh_config_path; non-empty arguments replace the default <user>@<host> placeholder.
execute_parsed_command πŸ”’
Execute the interactively entered command, rejecting any subcommand.
handle_special_commands πŸ”’
Handle special commands that don’t need full parsing
main
The main entrypoint
read_user_input πŸ”’
Read user input from stdin
run_generate_config πŸ”’
Write the generated config to output_path (or default_config_path) and print its absolute path to output; error if hosts is empty or the write fails.
run_interactive_mode πŸ”’
Run the interactive mode loop for GUI launches
show_interactive_prompt πŸ”’
Display the interactive mode prompt and instructions