@flowscripter/dynamic-cli-framework 1.1.6 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/.github/workflows/release-bun-library.yml +1 -0
  2. package/README/core-commands.md +40 -0
  3. package/README/core-service-providers.md +198 -0
  4. package/README/development.md +60 -0
  5. package/README/implementation-details.md +474 -0
  6. package/README/key-concepts.md +751 -0
  7. package/README.md +12 -1413
  8. package/bun.lock +22 -18
  9. package/index.ts +97 -1
  10. package/package.json +8 -7
  11. package/src/api/BaseCLIFeatureOptions.ts +10 -0
  12. package/src/api/CLIConfig.ts +5 -0
  13. package/src/api/RunResult.ts +16 -0
  14. package/src/api/argument/Argument.ts +24 -0
  15. package/src/api/service/ServiceProvider.ts +3 -3
  16. package/src/api/service/core/ArgumentPrompterService.ts +10 -0
  17. package/src/api/service/core/AsciiBannerGeneratorService.ts +44 -7
  18. package/src/api/service/core/CompletionService.ts +36 -0
  19. package/src/api/service/core/DataDumpGeneratorService.ts +27 -0
  20. package/src/api/service/core/ImagePrinterService.ts +26 -0
  21. package/src/api/service/core/KeyValueService.ts +22 -5
  22. package/src/api/service/core/PrinterService.ts +127 -1
  23. package/src/api/service/core/PrompterService.ts +49 -0
  24. package/src/api/service/core/SecretService.ts +27 -0
  25. package/src/api/service/core/ShutdownService.ts +17 -1
  26. package/src/api/service/core/Table.ts +85 -0
  27. package/src/api/service/core/TableGeneratorService.ts +38 -0
  28. package/src/api/service/core/TreePrinterService.ts +11 -0
  29. package/src/cli/BaseCLI.ts +116 -44
  30. package/src/cli/DefaultRuntimeCLI.ts +10 -18
  31. package/src/command/CompletionCommand.ts +179 -0
  32. package/src/command/MultiCommandCliHelpCommand.ts +18 -2
  33. package/src/command/SingleCommandCliHelpCommand.ts +10 -1
  34. package/src/launcher.ts +16 -58
  35. package/src/runtime/command/CommandValidator.ts +3 -3
  36. package/src/runtime/runner.ts +102 -30
  37. package/src/runtime/scanner.ts +18 -15
  38. package/src/runtime/values/argumentValueValidation.ts +49 -5
  39. package/src/runtime/values/globalCommandValuePopulation.ts +1 -1
  40. package/src/runtime/values/subCommandValuePopulation.ts +9 -8
  41. package/src/service/argumentPrompter/ArgumentPrompterServiceProvider.ts +34 -0
  42. package/src/service/argumentPrompter/DefaultArgumentPrompterService.ts +330 -0
  43. package/src/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.ts +1 -1
  44. package/src/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.ts +254 -17
  45. package/src/service/banner/BannerServiceProvider.ts +2 -2
  46. package/src/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.ts +85 -0
  47. package/src/service/chiselAsciiBannerGenerator/chisel.flf.json +3 -0
  48. package/src/service/completion/CompletionServiceProvider.ts +212 -0
  49. package/src/service/completion/DefaultCompletionService.ts +364 -0
  50. package/src/service/completion/shell/ShellHandler.ts +16 -0
  51. package/src/service/completion/shell/bash.ts +47 -0
  52. package/src/service/completion/shell/fish.ts +43 -0
  53. package/src/service/completion/shell/powershell.ts +66 -0
  54. package/src/service/completion/shell/zsh.ts +50 -0
  55. package/src/service/configuration/ConfigurationServiceProvider.ts +138 -42
  56. package/src/service/configuration/DefaultKeyValueService.ts +53 -7
  57. package/src/service/configuration/DefaultSecretService.ts +85 -0
  58. package/src/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.ts +41 -0
  59. package/src/service/dataDumpGenerator/DefaultDataDumpGeneratorService.ts +80 -0
  60. package/src/service/imagePrinter/DefaultImagePrinterService.ts +23 -0
  61. package/src/service/imagePrinter/ImagePrinterServiceProvider.ts +32 -0
  62. package/src/service/prettyPrinter/PrettyPrinterServiceProvider.ts +1 -1
  63. package/src/service/printer/DefaultPrinterService.ts +147 -27
  64. package/src/service/printer/PrinterServiceProvider.ts +7 -7
  65. package/src/service/printer/command/NoHyperlinksCommand.ts +40 -0
  66. package/src/service/printer/terminal/Progress.ts +21 -4
  67. package/src/service/printer/terminal/Spinner.ts +32 -8
  68. package/src/service/printer/terminal/Theme.ts +1 -1
  69. package/src/service/prompter/DefaultPrompterService.ts +87 -0
  70. package/src/service/prompter/PrompterServiceProvider.ts +36 -0
  71. package/src/service/prompter/command/NoPromptCommand.ts +40 -0
  72. package/src/service/prompter/prompt/PromptContext.ts +47 -0
  73. package/src/service/prompter/prompt/promptAcknowledge.ts +28 -0
  74. package/src/service/prompter/prompt/promptMultiSelect.ts +99 -0
  75. package/src/service/prompter/prompt/promptOpenUrl.ts +97 -0
  76. package/src/service/prompter/prompt/promptSingleSelect.ts +102 -0
  77. package/src/service/prompter/prompt/promptText.ts +107 -0
  78. package/src/service/prompter/prompt/promptToggle.ts +28 -0
  79. package/src/service/shutdown/DefaultShutdownService.ts +13 -0
  80. package/src/service/shutdown/ShutdownServiceProvider.ts +28 -9
  81. package/src/service/shutdown/ShutdownState.ts +5 -0
  82. package/src/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.ts +1 -1
  83. package/src/service/tableGenerator/DefaultTableGeneratorService.ts +415 -0
  84. package/src/service/tableGenerator/TableGeneratorServiceProvider.ts +43 -0
  85. package/src/service/treePrinter/DefaultTreePrinterService.ts +49 -0
  86. package/src/service/treePrinter/TreePrinterServiceProvider.ts +40 -0
  87. package/src/terminal/Ansi.ts +27 -0
  88. package/src/terminal/ImageRenderer.ts +199 -0
  89. package/src/terminal/KeyReader.ts +23 -0
  90. package/src/terminal/PngDecoder.ts +143 -0
  91. package/src/{service/printer/terminal → terminal}/Styler.ts +3 -0
  92. package/src/{service/printer/terminal → terminal}/Terminal.ts +1 -0
  93. package/src/terminal/TtyKeyReader.ts +83 -0
  94. package/src/terminal/TtyStyler.ts +78 -0
  95. package/src/{service/printer/terminal → terminal}/TtyTerminal.ts +9 -1
  96. package/src/terminal/supportsHyperlinks.ts +110 -0
  97. package/src/util/configHelper.ts +2 -2
  98. package/src/util/envVarHelper.ts +2 -2
  99. package/src/util/helpHelper.ts +66 -122
  100. package/src/util/logger.ts +16 -14
  101. package/src/util/runnerHelper.ts +1 -1
  102. package/tests/cli/BaseCLI.test.ts +50 -54
  103. package/tests/command/CompletionCommand.test.ts +68 -0
  104. package/tests/command/UsageCommand.test.ts +3 -2
  105. package/tests/command/VersionCommand.test.ts +3 -2
  106. package/tests/fixtures/Context.ts +9 -2
  107. package/tests/fixtures/util.ts +1 -1
  108. package/tests/runtime/parser.test.ts +9 -7
  109. package/tests/runtime/registry/DefaultServiceProviderRegistry.test.ts +3 -3
  110. package/tests/runtime/values/argumentValueValidation.test.ts +193 -0
  111. package/tests/service/argumentPrompter/ArgumentPrompterServiceProvider.test.ts +47 -0
  112. package/tests/service/argumentPrompter/DefaultArgumentPrompterService.test.ts +754 -0
  113. package/tests/service/asciiBannerGenerator/AsciiBannerGeneratorServiceProvider.test.ts +5 -4
  114. package/tests/service/asciiBannerGenerator/DefaultAsciiBannerGeneratorService.test.ts +163 -3
  115. package/tests/service/asciiBannerGenerator/__snapshots__/DefaultAsciiBannerGeneratorService.test.ts.snap +1 -1
  116. package/tests/service/banner/BannerServiceProvider.test.ts +8 -4
  117. package/tests/service/chiselAsciiBannerGenerator/ChiselFontAsciiBannerGeneratorService.test.ts +52 -0
  118. package/tests/service/completion/CompletionServiceProvider.test.ts +404 -0
  119. package/tests/service/completion/DefaultCompletionService.test.ts +278 -0
  120. package/tests/service/completion/shell/bash.test.ts +73 -0
  121. package/tests/service/completion/shell/fish.test.ts +62 -0
  122. package/tests/service/completion/shell/powershell.test.ts +59 -0
  123. package/tests/service/completion/shell/zsh.test.ts +60 -0
  124. package/tests/service/configuration/ConfigurationServiceProvider.test.ts +24 -12
  125. package/tests/service/configuration/DefaultKeyValueService.test.ts +118 -16
  126. package/tests/service/configuration/DefaultSecretService.test.ts +148 -0
  127. package/tests/service/configuration/command/ConfigCommand.test.ts +29 -0
  128. package/tests/service/configuration/command/DumpConfigCommand.test.ts +60 -0
  129. package/tests/service/dataDumpGenerator/DataDumpGeneratorServiceProvider.test.ts +57 -0
  130. package/tests/service/dataDumpGenerator/DefaultDataDumpGeneratorService.test.ts +217 -0
  131. package/tests/service/imagePrinter/DefaultImagePrinterService.test.ts +96 -0
  132. package/tests/service/imagePrinter/ImagePrinterServiceProvider.test.ts +17 -0
  133. package/tests/service/prettyPrinter/DefaultPrettyPrinterService.test.ts +2 -2
  134. package/tests/service/prettyPrinter/PrettyPrinterServiceProvider.test.ts +5 -4
  135. package/tests/service/printer/DefaultPrinterService.test.ts +233 -2
  136. package/tests/service/printer/PrinterServiceProvider.test.ts +6 -5
  137. package/tests/service/printer/command/DarkModeCommand.test.ts +83 -0
  138. package/tests/service/printer/command/LogLevelCommand.test.ts +7 -5
  139. package/tests/service/printer/command/NoColorCommand.test.ts +83 -0
  140. package/tests/service/printer/command/NoHyperlinksCommand.test.ts +89 -0
  141. package/tests/service/printer/terminal/Progress.test.ts +64 -4
  142. package/tests/service/printer/terminal/Spinner.test.ts +44 -3
  143. package/tests/service/prompter/DefaultPrompterService.test.ts +615 -0
  144. package/tests/service/prompter/PrompterServiceProvider.test.ts +47 -0
  145. package/tests/service/prompter/command/NoPromptCommand.test.ts +58 -0
  146. package/tests/service/shutdown/ShutdownServiceProvider.test.ts +4 -2
  147. package/tests/service/syntaxHighlighter/DefaultSyntaxHighlighterService.test.ts +3 -2
  148. package/tests/service/syntaxHighlighter/SyntaxHighlighterServiceProvider.test.ts +5 -4
  149. package/tests/service/tableGenerator/DefaultTableGeneratorService.test.ts +363 -0
  150. package/tests/service/tableGenerator/TableGeneratorServiceProvider.test.ts +47 -0
  151. package/tests/service/treePrinter/DefaultTreePrinterService.test.ts +144 -0
  152. package/tests/service/treePrinter/TreePrinterServiceProvider.test.ts +55 -0
  153. package/tests/terminal/ImageRenderer.test.ts +161 -0
  154. package/tests/terminal/PngDecoder.test.ts +223 -0
  155. package/tests/terminal/supportsHyperlinks.test.ts +149 -0
  156. package/tests/util/configHelper.test.ts +4 -4
  157. package/tests/util/logger.test.ts +23 -1
  158. package/tsconfig.json +31 -0
  159. package/src/service/printer/terminal/Ansi.ts +0 -10
  160. package/src/service/printer/terminal/TtyStyler.ts +0 -39
@@ -8,6 +8,7 @@ permissions:
8
8
  pull-requests: write
9
9
  id-token: write
10
10
  pages: write
11
+ packages: write
11
12
  jobs:
12
13
  call-release-bun-library:
13
14
  uses: flowscripter/.github/.github/workflows/release-bun-library.yml@v1
@@ -0,0 +1,40 @@
1
+ # Core Commands
2
+
3
+ The core `Command` implementations provided with the framework are:
4
+
5
+ ## `MultiCommandCliHelpGlobalCommand`
6
+
7
+ Implementation of multi-command CLI help. Some examples:
8
+
9
+ - `myCli --help`
10
+ - `myCli -h`
11
+ - `myCli --help <command>`
12
+ - `myCli -h <command>`
13
+
14
+ ## `MultiCommandCliHelpSubCommand`
15
+
16
+ Implementation of multi-command CLI help. Some examples:
17
+
18
+ - `myCli help`
19
+ - `myCli help <command>`
20
+
21
+ ## `SingleCommandCliHelpGlobalCommand`
22
+
23
+ Implementation of single (default) command CLI help. Some examples:
24
+
25
+ - `myCli --help`
26
+ - `myCli -h`
27
+
28
+ ## `SingleCommandCliHelpSubCommand`
29
+
30
+ Implementation of single (default) command CLI help. An example:
31
+
32
+ - `myCli help`
33
+
34
+ ## `UsageCommand`
35
+
36
+ Implementation which prints basic CLI usage instructions.
37
+
38
+ ## `VersionCommand`
39
+
40
+ Implementation which prints the version of the CLI.
@@ -0,0 +1,198 @@
1
+ # Core Service Providers
2
+
3
+ The core `ServiceProvider` implementations (and the service and `Command`
4
+ implementations they provide) built into the framework are:
5
+
6
+ ## `AsciiBannerGeneratorServiceProvider`
7
+
8
+ Provides:
9
+
10
+ - `AsciiBannerGeneratorService` allowing messages to be rendered using ASCII
11
+ banner [FIGlet](http://www.figlet.org) fonts. The FIGlet "standard" font is
12
+ provided by default and other fonts can be added on demand by commands.
13
+ Supports color effects (fixed, gradient, rainbow) applied independently to the
14
+ message foreground, sub-message foreground and background in both horizontal
15
+ and vertical directions.
16
+ - A `ChiselFontAsciiBannerGeneratorService` variant is also provided with a
17
+ built-in "chisel" FIGlet font and support for ANSI color remapping via
18
+ `ChiselBannerColors`.
19
+
20
+ ## `BannerServiceProvider`
21
+
22
+ On initialisation this uses the `PrinterService` to output the CLI name in ASCII
23
+ banner text together with the CLI description, version and optional sub-message
24
+ (from `CLIConfig.subMessage`).
25
+
26
+ Provides:
27
+
28
+ - `NoBannerCommand` allowing banner printing to be disabled via the argument
29
+ `--no-banner` or the env var `NO_BANNER`.
30
+
31
+ ## `CompletionServiceProvider`
32
+
33
+ Provides:
34
+
35
+ - `CompletionService` allowing shell auto-completion support for Bash, Zsh,
36
+ Fish, and PowerShell. Completions are dynamic (callback-based) rather than
37
+ static scripts, so they reflect the current set of registered commands
38
+ including dynamically discovered plugins.
39
+ - `CompletionGroupCommand` (`completions`) with two sub-commands:
40
+ - `completions:integration` installs shell completion integration by adding a
41
+ bootstrap script to the shell configuration file (e.g. `~/.bashrc`,
42
+ `~/.zshrc`, `~/.config/fish/config.fish`, or the PowerShell profile). Takes
43
+ a required `shell` positional argument and an optional `--config-path`
44
+ option.
45
+ - `completions:complete` generates completions for shell integration. This is
46
+ invoked by the shell's completion mechanism and returns completions in the
47
+ format expected by that shell.
48
+ - On first run, if both `PrompterService` and `KeyValueService` are available,
49
+ prompts the user to enable auto-completion.
50
+
51
+ NOTE: This service is opt-in. Enable via `completionEnabled` flag on `BaseCLI`,
52
+ `DefaultRuntimeCLI`, or the launcher functions.
53
+
54
+ ## `ConfigurationServiceProvider`
55
+
56
+ Provides:
57
+
58
+ - `KeyValueService` allowing the storage and retrieval of key value pairs scoped
59
+ to the current `Command` or service being executed. The values are persisted
60
+ to the CLI configuration file.
61
+ - `ConfigCommand` allowing the default location of the configuration file to be
62
+ overridden via the argument `--config` or the env var `CONFIG_LOCATION`.
63
+ - `DumpConfigCommand` a global command which dumps the full CLI configuration to
64
+ stdout via `--dump-config`.
65
+
66
+ ## `DataDumpGeneratorServiceProvider`
67
+
68
+ Provides:
69
+
70
+ - `DataDumpGeneratorService` allowing rendering of binary data as a hex dump or
71
+ ASCII dump. Supports configurable bytes per group, groups per row, spacing
72
+ between groups, and byte-range-based color schemes for visual differentiation
73
+ of byte value ranges.
74
+
75
+ ## `ImagePrinterServiceProvider`
76
+
77
+ Provides:
78
+
79
+ - `ImagePrinterService` allowing rendering of images and animated GIFs in the
80
+ terminal. Images are rendered from a `Uint8Array` buffer with configurable
81
+ width as a percentage of the terminal width. GIF detection is automatic based
82
+ on file magic bytes.
83
+
84
+ ## `PrettyPrinterServiceProvider`
85
+
86
+ Provides:
87
+
88
+ - `PrettyPrinterService` allowing pretty printing of structured data and source
89
+ code. JSON pretty printing is provided by default and other data or language
90
+ formats can be added on demand by commands.
91
+
92
+ ## `PrinterServiceProvider`
93
+
94
+ Provides:
95
+
96
+ - `DefaultPrinterService` allowing foreground and background color output to
97
+ stdout, stderr, management of log levels and widgets such as a spinner and
98
+ progress bars. Background colors include theme-based variants (primary,
99
+ secondary, emphasised, selected) and named colors (yellow, orange, red,
100
+ magenta, violet, blue, cyan, green) as well as arbitrary hex colors. Printing
101
+ hyperlinks is supported.
102
+ - `DarkModeCommand` which allows dark or light mode to be enabled via the
103
+ argument `--dark-mode` or the env var `DARK_MODE`.
104
+ - `NoColorCommand` which allows color output to be disabled via the argument
105
+ `--no-color` or the env var `NO_COLOR`.
106
+ - `NoHyperlinksCommand` which allows hyperlink output to be disabled via the
107
+ argument `--no-hyperlinks` or the env var `NO_HYPERLINKS`.
108
+ - `LogLevelCommand` which allows the log level to be set via the argument
109
+ `--log-level` or the env var `LOG_LEVEL`.
110
+
111
+ ## `PrompterServiceProvider`
112
+
113
+ Provides:
114
+
115
+ - `PrompterService` allowing interactive user input via the terminal. Supports
116
+ five prompt types: single select (scrollable list), multi select (checkboxes),
117
+ acknowledge (Yes/No), toggle (True/False), and text entry (with masking for
118
+ secrets). Configurable via `PrompterServiceConfig` for prompt characters,
119
+ checkbox characters, list colors, and scroll window size.
120
+ - `NoPromptCommand` which allows interactive prompting to be disabled via the
121
+ argument `--no-prompt` or the env var `NO_PROMPT`.
122
+
123
+ ## `ArgumentPrompterServiceProvider`
124
+
125
+ Provides:
126
+
127
+ - `ArgumentPrompterService` which automatically prompts the user for missing
128
+ mandatory arguments when all parse errors are of type `MISSING_VALUE`. Derives
129
+ the appropriate prompt type from the argument definition: boolean arguments
130
+ become toggle prompts, arguments with allowable values become single select
131
+ prompts, and other arguments become text entry prompts. Handles complex
132
+ options by prompting for each nested property and array/vararg arguments by
133
+ repeating prompts with an "add another?" confirmation.
134
+
135
+ NOTE: Both services are opt-in. Enable via `prompterEnabled` and
136
+ `argumentPrompterEnabled` flags on `BaseCLI`, `DefaultRuntimeCLI`, or the
137
+ launcher functions. `argumentPrompterEnabled` requires `prompterEnabled`.
138
+
139
+ ## `ShutdownServiceProvider`
140
+
141
+ Provides:
142
+
143
+ - `ShutdownService` allowing registration of callbacks for CLI shutdown.
144
+
145
+ Handles SIGINT (Ctrl-C) and SIGTERM signals:
146
+
147
+ - **Normal mode** (default): A single SIGINT triggers graceful shutdown (running
148
+ all registered shutdown listeners) then exits with code 130.
149
+ - **Long-running mode**: Commands can opt in via `enterLongRunningMode()`. In
150
+ this mode, the first SIGINT sets a cooperative `isShutdownRequested` flag that
151
+ the command can poll. A third SIGINT forces graceful shutdown and exit.
152
+ - **SIGTERM**: Always triggers immediate graceful shutdown and exits with code
153
+ 143.
154
+
155
+ Cooperative cancellation pattern which can be used in a long running command:
156
+
157
+ ```typescript
158
+ shutdownService.enterLongRunningMode();
159
+ while (!shutdownService.isShutdownRequested) {
160
+ // do work
161
+ }
162
+ shutdownService.leaveLongRunningMode();
163
+ ```
164
+
165
+ ## `SyntaxHighlighterServiceProvider`
166
+
167
+ Provides:
168
+
169
+ - `SyntaxHighlighterService` allowing ANSI based color highlighting of
170
+ structured data and source code. JSON highlighting is provided by default and
171
+ other data or language formats can be added on demand by commands.
172
+
173
+ Note that the `SyntaxHighlighterService` has no effect if the
174
+ `DefaultPrinterService` is configured to disable color output.
175
+
176
+ ## `TableGeneratorServiceProvider`
177
+
178
+ Provides:
179
+
180
+ - `TableGeneratorService` allowing rendering of tabular data using Unicode
181
+ box-drawing characters. Tables are defined using a `Table` class with
182
+ configurable rows, columns, and cells. Supports column flex-weight layout (CSS
183
+ flex-grow/shrink semantics), per-column/row/cell alignment (left, center,
184
+ right), configurable border colors, cell padding, and automatic word-wrapping
185
+ of cell contents. String width measurement uses `Bun.stringWidth` for correct
186
+ handling of CJK characters and emoji.
187
+
188
+ NOTE: This service is automatically registered by `BaseCLI` with priority 70 and
189
+ is used internally for help text rendering with proper column wrapping.
190
+
191
+ ## `TreePrinterServiceProvider`
192
+
193
+ Provides:
194
+
195
+ - `TreePrinterService` allowing rendering of tree structures using Unicode
196
+ box-drawing characters. Trees are defined using `TreeNode` objects with a
197
+ `label` and optional `children` (which can be nested `TreeNode` objects or
198
+ plain strings). Node labels are colored using the `PrinterService`.
@@ -0,0 +1,60 @@
1
+ # Development
2
+
3
+ Install dependencies:
4
+
5
+ `bun install`
6
+
7
+ Test:
8
+
9
+ `bun test`
10
+
11
+ **NOTE**: The following tasks use Deno as it excels at these and Bun does not
12
+ currently provide such functionality:
13
+
14
+ Format:
15
+
16
+ `deno fmt`
17
+
18
+ Lint:
19
+
20
+ `deno lint index.ts src/ tests/`
21
+
22
+ Generate HTML API Documentation:
23
+
24
+ `deno doc --html --name=template-bun-library index.ts`
25
+
26
+ ### Debug Logging
27
+
28
+ Internal framework logging can be enabled by setting the
29
+ `DYNAMIC_CLI_FRAMEWORK_DEBUG` environment variable.
30
+
31
+ The logging implementation will look for an object conforming to the `Logger`
32
+ interface and use it if found. If not found, a simple logging implementation
33
+ using the `console` object will be used.
34
+
35
+ ### Command and Service Validation
36
+
37
+ By default, commands and services that are built into the CLI or provided by
38
+ already installed plugins are not validated as they are loaded. The only
39
+ validation that takes place is for commands or services provided by plugins
40
+ BEFORE they are installed.
41
+
42
+ When using `launcher.ts` runtime validation of all commands and services can be
43
+ forced by defining the `DYNAMIC_CLI_FRAMEWORK_VALIDATE_ALL` environment
44
+ variable.
45
+
46
+ Command validation includes:
47
+
48
+ - ensuring multiple commands in the CLI do not have duplicate names or short
49
+ aliases.
50
+ - command options for each command do not include duplicate names or short
51
+ aliases.
52
+ - default values for options have the type specified by the option.
53
+ - default values for options match an allowable value if specified by the
54
+ option.
55
+ - default array values for options are specified only for array options.
56
+ - command options for each command do not include duplicate names or short
57
+ aliases.
58
+ - only the last positional for a command is defined as a vararg.
59
+ - default values for complex options match the nested property hierarchy.
60
+ - paths to nested properties of complex options are unique.