feat: Updates cli documentation for utils commands.

This commit is contained in:
2024-12-09 11:43:31 -05:00
parent 357914ba93
commit a8d35fed37
3 changed files with 24 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
import ArgumentParser
import CliClient
import CliDoc
import Dependencies
struct GenerateConfigurationCommand: AsyncParsableCommand {
@@ -9,18 +10,23 @@ struct GenerateConfigurationCommand: AsyncParsableCommand {
static let configuration = CommandConfiguration(
commandName: commandName,
abstract: createAbstract("Generate a local configuration file."),
discussion: """
\("NOTE:".yellow) If a directory is not supplied then a configuration file will be created
discussion: Discussion {
VStack {
Note {
"""
If a directory is not supplied then a configuration file will be created
at \("'~/.config/hpa-playbook/config'".yellow).
\("Example:".yellow)
\("Create a directory and generate the configuration file.".green)
$ mkdir -p ~/.config/hpa-playbook
$ hpa generate-config --path ~/.config/hpa-playbook
"""
"""
}
VStack {
"EXAMPLE:".yellow.bold
"Create a directory and generate the configuration".green
ShellCommand("mkdir -p ~/.config/hpa-playbook")
ShellCommand("hpa generate-config --path ~/.config/hpa-playbook")
}
}
.separator(.newLine(count: 2))
}
)
@Option(