Skip to content

Commit ba8ce6e

Browse files
committed
feat(prompts): enhance CLI argument parsing documentation with modern expectations and additional libraries
1 parent ab351a9 commit ba8ce6e

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/prompts/dev.implement-cli-args-parsing.prompt.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ Use it for context and evaluate each CLI against the CLI Contract Baseline:
102102
- Document exit codes and diagnostic behaviour in README and help output.
103103
- Describe mutually exclusive options, default value sources, and configuration precedence.
104104

105+
### Modern `--help` expectations 🧾
106+
107+
- Provide a structured layout: name + one-line summary, usage, commands, grouped options, examples, environment variables, config files, and exit codes.
108+
- Use subtle colour only as hints: headings and command names bold/bright, placeholders dim, one accent colour for required or warnings.
109+
- Keep typography readable: 2-space indentation, wrapped descriptions at 80–100 columns, clean alignment for narrow terminals.
110+
- Ensure colour is optional: detect TTY, respect `NO_COLOR` and `TERM=dumb`, and offer `--color=auto|always|never` (or `--no-color`).
111+
- Prefer examples that show common flows and safe dry-runs; include output format examples when applicable.
112+
105113
### Validation and errors 🚦
106114

107115
- Validate inputs early and return clear, actionable errors.
@@ -173,6 +181,7 @@ Use it for context and evaluate each CLI against the CLI Contract Baseline:
173181
- [ ] Argument parsing and flag rules
174182
- [ ] Modern parser defaults
175183
- [ ] Help and documentation
184+
- [ ] Modern `--help` expectations
176185
- [ ] Validation and errors
177186
- [ ] Stdout and stderr semantics
178187
- [ ] Developer ergonomics
@@ -184,5 +193,5 @@ Use it for context and evaluate each CLI against the CLI Contract Baseline:
184193

185194
---
186195

187-
> **Version**: 1.0.3
188-
> **Last Amended**: 2026-02-08
196+
> **Version**: 1.0.4
197+
> **Last Amended**: 2026-02-09

docs/adr/Tech_Radar.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- [Type checking](ADR-001c_Python_Type_Checking.md): `mypy`
88
- [Testing](ADR-001d_Python_Testing_Tooling.md): `pytest`
99
- [Logging](ADR-001e_Python_Logging.md): `structlog` or `Powertools for AWS Lambda`
10-
- [CLI argument parsing](ADR-001f_Python_CLI_Argument_Parsing.md): `typer`
10+
- [CLI argument parsing](ADR-001f_Python_CLI_Argument_Parsing.md): `typer` + `rich`
1111

1212
## TypeScript tech stack
1313

@@ -16,7 +16,7 @@
1616
- [Type checking](ADR-002c_TypeScript_Type_Checking.md): `tsc`
1717
- [Testing](ADR-002d_TypeScript_Testing_Tooling.md): `vitest`
1818
- [Logging](ADR-002e_TypeScript_Logging.md): `winston` or `Powertools for AWS Lambda`
19-
- [CLI argument parsing](ADR-002f_TypeScript_CLI_Argument_Parsing.md): `commander`
19+
- [CLI argument parsing](ADR-002f_TypeScript_CLI_Argument_Parsing.md): `commander` + `chalk`
2020

2121
## Go tech stack
2222

@@ -25,7 +25,7 @@
2525
- [Type checking](ADR-003c_Go_Static_Analysis_and_Type_Checking.md): `staticcheck`
2626
- [Testing](ADR-003d_Go_Testing_Tooling.md): `go test`
2727
- [Logging](ADR-003e_Go_Logging.md): `zap`
28-
- [CLI argument parsing](ADR-003f_Go_CLI_Argument_Parsing.md): `cobra`
28+
- [CLI argument parsing](ADR-003f_Go_CLI_Argument_Parsing.md): `cobra` + `fatih/color`
2929

3030
## Rust tech stack
3131

@@ -34,11 +34,13 @@
3434
- [Type checking](ADR-004c_Rust_Type_Checking.md): `cargo check`
3535
- [Testing](ADR-004d_Rust_Testing_Tooling.md): `cargo test`
3636
- [Logging](ADR-004e_Rust_Logging.md): `tracing`
37-
- [CLI argument parsing](ADR-004f_Rust_CLI_Argument_Parsing.md): `clap`
37+
- [CLI argument parsing](ADR-004f_Rust_CLI_Argument_Parsing.md): `clap` (built-in styling)
38+
39+
Note: The `+` libraries (`rich`, `chalk`, `fatih/color`) provide colourful, well-formatted CLI output including styled `--help` text, progress bars, and terminal colours. They support TTY detection, `NO_COLOR`, and `--color=auto|always|never` flags.
3840

3941
Note: Selecting any default tool above still requires an ADR that compares and assesses at least two or three popular alternatives using the [ADR template](./ADR-nnn_Any_Decision_Record_Template.md).
4042

4143
---
4244

43-
> **Version**: 1.2.0
44-
> **Last Amended**: 2026-02-08
45+
> **Version**: 1.2.1
46+
> **Last Amended**: 2026-02-09

0 commit comments

Comments
 (0)