Module cli
Expand description
CLI interface
StructsΒ§
- Args
- Cross-platform cluster SSH tool
- CLIArgs
Command - Default implementation of ArgsCommand trait
- CLIConfig
Manager - Default implementation of ConfigManager trait
- CLIEnvironment
- Default implementation of Environment trait
- CLIInput
- Default implementation of Input trait that reads from stdin
- CLILogger
Initializer - Default implementation of LoggerInitializer trait
- CLIOutput
- Default implementation of Output trait that writes to stdout/stderr
- Main
Entrypoint - Main Entrypoint struct
EnumsΒ§
- Commands π
- The
commandCLI subcommand
TraitsΒ§
- Args
Command - Trait for Args operations to enable mocking in tests
- Config
Manager - 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
- Logger
Initializer - 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 setssh_config_pathboth prepends-F <path>toclient.argumentsand setsclient.ssh_config_path; non-emptyargumentsreplace 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(ordefault_config_path) and print its absolute path tooutput; error ifhostsis 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