@intentsolutionsio/cli-ux-tester 3.1.0

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.
@@ -0,0 +1,1003 @@
1
+ # CLI UX Test Scenarios
2
+
3
+ Common testing scenarios for evaluating command-line interface usability.
4
+
5
+ ## Scenario 1: First-Time User
6
+
7
+ **Context**: A developer encounters your CLI for the first time.
8
+
9
+ **Test Flow**:
10
+
11
+ ```bash
12
+ # What happens when they just run the command?
13
+ command
14
+
15
+ # Can they find help?
16
+ command --help
17
+ command help
18
+
19
+ # Can they discover the version?
20
+ command --version
21
+ ```
22
+
23
+ **Evaluate**:
24
+
25
+ - Does the tool explain itself?
26
+ - Is help easy to find?
27
+ - Are next steps clear?
28
+ - Is there a getting started guide?
29
+
30
+ **Good Example**:
31
+
32
+ ```bash
33
+ $ mytool
34
+
35
+ mytool - A tool for doing awesome things
36
+
37
+ Usage: mytool <command> [options]
38
+
39
+ Commands:
40
+ init Initialize a new project
41
+ build Build the project
42
+ deploy Deploy to production
43
+
44
+ Get started: mytool init
45
+ For help: mytool --help
46
+ ```
47
+
48
+ **Bad Example**:
49
+
50
+ ```bash
51
+ $ mytool
52
+ Error: missing required argument
53
+ ```
54
+
55
+ ## Scenario 2: Missing Required Arguments
56
+
57
+ **Context**: User runs command without required arguments.
58
+
59
+ **Test Flow**:
60
+
61
+ ```bash
62
+ # No arguments
63
+ command
64
+
65
+ # Some but not all arguments
66
+ command arg1
67
+
68
+ # Wrong argument types
69
+ command --flag=invalid
70
+ ```
71
+
72
+ **Evaluate**:
73
+
74
+ - Error message specificity
75
+ - Suggested corrections
76
+ - Example usage shown
77
+ - Exit code is non-zero
78
+
79
+ **Good Example**:
80
+
81
+ ```bash
82
+ $ deploy
83
+
84
+ Error: Missing required argument: <environment>
85
+
86
+ Usage: deploy <environment> [options]
87
+
88
+ Examples:
89
+ deploy staging
90
+ deploy production --tag v1.2.3
91
+
92
+ For more information: deploy --help
93
+ ```
94
+
95
+ ## Scenario 3: Invalid Flag or Option
96
+
97
+ **Context**: User provides an unrecognized flag.
98
+
99
+ **Test Flow**:
100
+
101
+ ```bash
102
+ command --invalid-flag
103
+ command -x
104
+ command --typo
105
+ ```
106
+
107
+ **Evaluate**:
108
+
109
+ - Does it suggest similar valid flags?
110
+ - Does it show available flags?
111
+ - Is the error clear about what's invalid?
112
+
113
+ **Good Example**:
114
+
115
+ ```bash
116
+ $ build --optimze
117
+
118
+ Error: Unknown option '--optimze'
119
+
120
+ Did you mean '--optimize'?
121
+
122
+ Available options:
123
+ --optimize Enable optimizations
124
+ --verbose Show detailed output
125
+ --output Specify output directory
126
+
127
+ For more information: build --help
128
+ ```
129
+
130
+ ## Scenario 4: File Not Found
131
+
132
+ **Context**: User references a non-existent file.
133
+
134
+ **Test Flow**:
135
+
136
+ ```bash
137
+ command nonexistent.txt
138
+ command --config missing.yml
139
+ command --input /path/does/not/exist
140
+ ```
141
+
142
+ **Evaluate**:
143
+
144
+ - Shows the path that was checked
145
+ - Suggests alternatives if applicable
146
+ - Explains what file is needed and why
147
+
148
+ **Good Example**:
149
+
150
+ ```bash
151
+ $ process --config app.yml
152
+
153
+ Error: Configuration file not found: 'app.yml'
154
+
155
+ Searched in:
156
+ ./app.yml
157
+ ~/.config/myapp/app.yml
158
+ /etc/myapp/app.yml
159
+
160
+ To create a default config: myapp init --config
161
+ For more help: myapp --help
162
+ ```
163
+
164
+ ## Scenario 5: Permission Denied
165
+
166
+ **Context**: User lacks permissions for an operation.
167
+
168
+ **Test Flow**:
169
+
170
+ ```bash
171
+ command /protected/file
172
+ command --output /system/file
173
+ sudo command # If applicable
174
+ ```
175
+
176
+ **Evaluate**:
177
+
178
+ - Clear about permission issue
179
+ - Suggests solution (sudo, chmod, etc.)
180
+ - Explains why permission is needed
181
+
182
+ **Good Example**:
183
+
184
+ ```bash
185
+ $ install --global
186
+
187
+ Error: Permission denied to write to '/usr/local/bin'
188
+
189
+ This command requires elevated privileges.
190
+ Try: sudo install --global
191
+
192
+ Or install locally: install --user
193
+ ```
194
+
195
+ ## Scenario 6: Interactive Prompts
196
+
197
+ **Context**: Tool uses interactive prompts for input.
198
+
199
+ **Test Flow**:
200
+
201
+ ```bash
202
+ # Run interactive command
203
+ command interactive-task
204
+
205
+ # Test with yes/no prompts
206
+ # Test with text input
207
+ # Test with selection menus
208
+ ```
209
+
210
+ **Evaluate**:
211
+
212
+ - Prompts are clear
213
+ - Default values shown
214
+ - Can skip with flags for automation
215
+ - Ctrl+C exits gracefully
216
+
217
+ **Good Example**:
218
+
219
+ ```bash
220
+ $ init
221
+
222
+ ? Project name: (my-project) █
223
+ ? Use TypeScript? (Y/n) Y
224
+ ? Install dependencies? (Y/n) Y
225
+
226
+ ✓ Created project 'my-project'
227
+ ✓ Installed dependencies
228
+
229
+ Next steps:
230
+ cd my-project
231
+ npm start
232
+ ```
233
+
234
+ ## Scenario 7: Long-Running Operations
235
+
236
+ **Context**: Command takes significant time to complete.
237
+
238
+ **Test Flow**:
239
+
240
+ ```bash
241
+ # Run operation that takes >2 seconds
242
+ command long-task
243
+
244
+ # Check for progress indication
245
+ # Test cancellation (Ctrl+C)
246
+ ```
247
+
248
+ **Evaluate**:
249
+
250
+ - Progress indicator present
251
+ - Estimated time shown
252
+ - Can be cancelled gracefully
253
+ - Final summary shown
254
+
255
+ **Good Example**:
256
+
257
+ ```bash
258
+ $ build
259
+
260
+ Building project...
261
+ [████████████████████████░░░░] 87% (43/50 files)
262
+ Estimated time remaining: 3s
263
+
264
+ ✓ Build complete in 27s
265
+ Output: dist/
266
+ Size: 2.3 MB
267
+ ```
268
+
269
+ ## Scenario 8: Error Recovery
270
+
271
+ **Context**: Operation fails partway through.
272
+
273
+ **Test Flow**:
274
+
275
+ ```bash
276
+ # Trigger partial failure
277
+ command complex-task # That fails midway
278
+
279
+ # Check state after failure
280
+ # Try to resume or rollback
281
+ ```
282
+
283
+ **Evaluate**:
284
+
285
+ - Clear about what failed
286
+ - State of partial completion
287
+ - How to recover or retry
288
+ - Rollback if destructive
289
+
290
+ **Good Example**:
291
+
292
+ ```bash
293
+ $ deploy production
294
+
295
+ Deploying to production...
296
+ ✓ Built assets
297
+ ✓ Uploaded to CDN
298
+ ✗ Database migration failed: Connection timeout
299
+
300
+ Error: Deployment partially complete
301
+
302
+ Completed:
303
+ ✓ Build (commit abc123)
304
+ ✓ CDN upload
305
+
306
+ Failed:
307
+ ✗ Database migration
308
+
309
+ To retry: deploy production --resume
310
+ To rollback: deploy rollback
311
+ ```
312
+
313
+ ## Scenario 9: Configuration Files
314
+
315
+ **Context**: Tool uses configuration files.
316
+
317
+ **Test Flow**:
318
+
319
+ ```bash
320
+ # Run without config
321
+ command
322
+
323
+ # Create config
324
+ command init --config
325
+
326
+ # Run with config
327
+ command --config custom.yml
328
+
329
+ # Invalid config
330
+ echo "invalid: ][" > bad.yml
331
+ command --config bad.yml
332
+ ```
333
+
334
+ **Evaluate**:
335
+
336
+ - Config file location is clear
337
+ - Config format is documented
338
+ - Validation errors are helpful
339
+ - Can generate default config
340
+
341
+ **Good Example**:
342
+
343
+ ```bash
344
+ $ run --config myconfig.yml
345
+
346
+ Error: Invalid configuration file 'myconfig.yml'
347
+
348
+ Line 5: Unexpected token ']['
349
+
350
+ Expected format:
351
+ server:
352
+ port: 3000
353
+ host: localhost
354
+
355
+ To generate a default config: run init --config
356
+ For config docs: https://docs.example.com/config
357
+ ```
358
+
359
+ ## Scenario 10: Output Formats
360
+
361
+ **Context**: Tool provides multiple output formats.
362
+
363
+ **Test Flow**:
364
+
365
+ ```bash
366
+ # Default output
367
+ command list
368
+
369
+ # Different formats
370
+ command list --format json
371
+ command list --format yaml
372
+ command list --format table
373
+ command list --format csv
374
+ ```
375
+
376
+ **Evaluate**:
377
+
378
+ - Default format is human-readable
379
+ - Machine-readable formats available
380
+ - Format flag is consistent
381
+ - Output is valid in specified format
382
+
383
+ **Good Example**:
384
+
385
+ ```bash
386
+ # Human-readable default
387
+ $ list
388
+ Users:
389
+ - Alice (admin)
390
+ - Bob (user)
391
+ - Carol (user)
392
+
393
+ # Machine-readable
394
+ $ list --format json
395
+ {"users":[{"name":"Alice","role":"admin"},{"name":"Bob","role":"user"}]}
396
+
397
+ # Formatted JSON
398
+ $ list --format json --pretty
399
+ {
400
+ "users": [
401
+ {"name": "Alice", "role": "admin"},
402
+ {"name": "Bob", "role": "user"}
403
+ ]
404
+ }
405
+ ```
406
+
407
+ ## Scenario 11: Piping and Redirection
408
+
409
+ **Context**: Tool used in shell pipelines.
410
+
411
+ **Test Flow**:
412
+
413
+ ```bash
414
+ # As input receiver
415
+ cat file.txt | command process
416
+
417
+ # As output producer
418
+ command generate | grep pattern
419
+
420
+ # Both
421
+ cat input.txt | command transform | grep result
422
+
423
+ # Output redirection
424
+ command > output.txt
425
+ command 2> errors.txt
426
+ command > output.txt 2>&1
427
+ ```
428
+
429
+ **Evaluate**:
430
+
431
+ - Respects stdin/stdout/stderr
432
+ - Buffering is appropriate
433
+ - Exit codes work correctly
434
+ - Progress indicators disabled in pipes
435
+
436
+ **Good Example**:
437
+
438
+ ```bash
439
+ # Interactive when TTY
440
+ $ transform data.txt
441
+ Processing... [████████] 100%
442
+ ✓ Done
443
+
444
+ # Silent in pipes
445
+ $ transform data.txt | grep success
446
+ success: 42 records processed
447
+ ```
448
+
449
+ ## Scenario 12: Dry Run Mode
450
+
451
+ **Context**: User wants to preview changes.
452
+
453
+ **Test Flow**:
454
+
455
+ ```bash
456
+ # Dry run
457
+ command dangerous-operation --dry-run
458
+ command dangerous-operation --whatif
459
+ command dangerous-operation --preview
460
+
461
+ # Check nothing actually changed
462
+ ```
463
+
464
+ **Evaluate**:
465
+
466
+ - Dry run flag exists
467
+ - Shows what would happen
468
+ - No side effects occur
469
+ - Clear about simulation
470
+
471
+ **Good Example**:
472
+
473
+ ```bash
474
+ $ delete --pattern "*.tmp" --dry-run
475
+
476
+ Dry run mode: No files will be deleted
477
+
478
+ Would delete:
479
+ cache/temp1.tmp (2.3 MB)
480
+ cache/temp2.tmp (1.1 MB)
481
+ logs/debug.tmp (5.2 MB)
482
+
483
+ Total: 3 files, 8.6 MB
484
+
485
+ To execute: delete --pattern "*.tmp"
486
+ ```
487
+
488
+ ## Scenario 13: Tab Completion
489
+
490
+ **Context**: User expects tab completion in shell.
491
+
492
+ **Test Flow**:
493
+
494
+ ```bash
495
+ # Install completions
496
+ command completion install
497
+
498
+ # Test completion
499
+ command <TAB>
500
+ command subcommand --<TAB>
501
+ ```
502
+
503
+ **Evaluate**:
504
+
505
+ - Completion is available
506
+ - Installation is documented
507
+ - Completes commands
508
+ - Completes flags
509
+ - Completes file paths where relevant
510
+
511
+ ## Scenario 14: Verbosity Levels
512
+
513
+ **Context**: User wants more or less output detail.
514
+
515
+ **Test Flow**:
516
+
517
+ ```bash
518
+ # Quiet mode
519
+ command --quiet
520
+ command -q
521
+
522
+ # Verbose mode
523
+ command --verbose
524
+ command -v
525
+
526
+ # Debug mode
527
+ command --debug
528
+ ```
529
+
530
+ **Evaluate**:
531
+
532
+ - Multiple verbosity levels
533
+ - Quiet suppresses all but essential
534
+ - Verbose shows helpful details
535
+ - Debug shows technical details
536
+
537
+ **Good Example**:
538
+
539
+ ```bash
540
+ # Default
541
+ $ build
542
+ ✓ Build complete
543
+
544
+ # Verbose
545
+ $ build --verbose
546
+ Compiling src/main.ts
547
+ Compiling src/utils.ts
548
+ Bundling...
549
+ Minifying...
550
+ ✓ Build complete in 2.3s
551
+
552
+ # Debug
553
+ $ build --debug
554
+ [DEBUG] Config loaded from: ./config.yml
555
+ [DEBUG] Node version: 18.0.0
556
+ [DEBUG] Compiling src/main.ts
557
+ [DEBUG] AST parsed: 245 nodes
558
+ [DEBUG] Output size: 125 KB
559
+ ✓ Build complete in 2.3s
560
+ ```
561
+
562
+ ## Scenario 15: Version Compatibility
563
+
564
+ **Context**: Tool versions change over time.
565
+
566
+ **Test Flow**:
567
+
568
+ ```bash
569
+ # Check version
570
+ command --version
571
+
572
+ # Check for updates
573
+ command update --check
574
+
575
+ # Migrate from old version
576
+ ```
577
+
578
+ **Evaluate**:
579
+
580
+ - Version clearly displayed
581
+ - Breaking changes documented
582
+ - Migration guides available
583
+ - Backward compatibility noted
584
+
585
+ ## Scenario 16: Configuration Precedence
586
+
587
+ **Context**: Configuration from multiple sources (flags, env vars, files).
588
+
589
+ **Test Flow**:
590
+
591
+ ```bash
592
+ # Test precedence order
593
+ echo "value: file" > .config
594
+ export TOOL_VALUE=env
595
+ command --value=flag
596
+
597
+ # Verify flag wins over env var
598
+ command --value=flag
599
+
600
+ # Verify env var wins over config file
601
+ unset TOOL_VALUE
602
+ export TOOL_VALUE=env
603
+ command
604
+
605
+ # Verify config file is used as fallback
606
+ unset TOOL_VALUE
607
+ command
608
+ ```
609
+
610
+ **Evaluate**:
611
+
612
+ - Precedence order: flags > env vars > project config > user config > system config
613
+ - Each level documented
614
+ - Easy to debug which config is active
615
+ - Config source shown in verbose mode
616
+
617
+ **Good Example**:
618
+
619
+ ```bash
620
+ $ mytool deploy --verbose
621
+ Using configuration from:
622
+ --env flag: production (from command line)
623
+ API_KEY: *** (from environment variable)
624
+ timeout: 30s (from ~/.mytool/config.yml)
625
+ ```
626
+
627
+ ## Scenario 17: Exit Codes
628
+
629
+ **Context**: Shell scripts rely on meaningful exit codes.
630
+
631
+ **Test Flow**:
632
+
633
+ ```bash
634
+ # Success
635
+ command successful-operation
636
+ echo $? # Should be 0
637
+
638
+ # General error
639
+ command error-operation
640
+ echo $? # Should be 1
641
+
642
+ # Invalid arguments
643
+ command --invalid-flag
644
+ echo $? # Should be 2
645
+
646
+ # Use in shell scripts
647
+ command1 && command2 # Run command2 only if command1 succeeds
648
+ command1 || command2 # Run command2 only if command1 fails
649
+ ```
650
+
651
+ **Evaluate**:
652
+
653
+ - 0 = success
654
+ - 1 = general error
655
+ - 2 = misuse (invalid arguments)
656
+ - 126 = command cannot execute
657
+ - 127 = command not found
658
+ - 130 = terminated by Ctrl-C
659
+ - Custom codes documented for specific errors
660
+
661
+ **Good Example**:
662
+
663
+ ```bash
664
+ $ mytool validate file.txt
665
+ Error: Invalid file format
666
+ $ echo $?
667
+ 3
668
+
669
+ # From documentation:
670
+ # Exit Codes:
671
+ # 0 - Success
672
+ # 1 - General error
673
+ # 2 - Invalid arguments
674
+ # 3 - Validation failed
675
+ # 4 - Network error
676
+ ```
677
+
678
+ ## Scenario 18: Environment Variable Support
679
+
680
+ **Context**: Standard environment variables affect behavior.
681
+
682
+ **Test Flow**:
683
+
684
+ ```bash
685
+ # Test NO_COLOR
686
+ NO_COLOR=1 command
687
+ export NO_COLOR=1
688
+ command
689
+
690
+ # Test DEBUG
691
+ DEBUG=1 command --verbose
692
+
693
+ # Test tool-specific vars
694
+ MYTOOL_API_KEY=secret command
695
+ MYTOOL_TIMEOUT=60 command
696
+ ```
697
+
698
+ **Evaluate**:
699
+
700
+ - NO_COLOR disables colors
701
+ - DEBUG enables debug output
702
+ - EDITOR used for editing operations
703
+ - PAGER used for long output
704
+ - HTTP_PROXY, HTTPS_PROXY respected
705
+ - Tool-specific vars use UPPERCASE_WITH_UNDERSCORES
706
+ - Environment variables documented
707
+
708
+ **Good Example**:
709
+
710
+ ```bash
711
+ $ NO_COLOR=1 mytool status
712
+ Status: running # No colors
713
+
714
+ $ DEBUG=1 mytool deploy
715
+ [DEBUG] Loading config from ~/.mytool/config.yml
716
+ [DEBUG] API endpoint: https://api.example.com
717
+ [DEBUG] Request: POST /deploy
718
+ Deploying...
719
+ ```
720
+
721
+ ## Scenario 19: Context Awareness
722
+
723
+ **Context**: Tool detects and adapts to project context.
724
+
725
+ **Test Flow**:
726
+
727
+ ```bash
728
+ # In empty directory
729
+ cd /tmp/empty
730
+ command init
731
+
732
+ # In Node.js project
733
+ cd node-project/
734
+ command init # Should detect package.json
735
+
736
+ # In Git repository
737
+ cd git-repo/
738
+ command deploy # Should detect branch, commit
739
+
740
+ # In Python project
741
+ cd python-project/
742
+ command init # Should detect requirements.txt or pyproject.toml
743
+ ```
744
+
745
+ **Evaluate**:
746
+
747
+ - Detects project type (package.json, Cargo.toml, go.mod, etc.)
748
+ - Detects Git repository and current branch
749
+ - Adapts defaults based on context
750
+ - Explains what was detected
751
+ - Provides override flags if detection is wrong
752
+
753
+ **Good Example**:
754
+
755
+ ```bash
756
+ $ cd my-node-app/
757
+ $ mytool init
758
+ ✓ Detected Node.js project (package.json)
759
+ ✓ Detected Git repository (branch: main)
760
+
761
+ Initializing with defaults:
762
+ Runtime: Node.js 18
763
+ Package manager: npm
764
+ Deploy branch: main
765
+
766
+ To customize: mytool init --interactive
767
+ ```
768
+
769
+ ## Scenario 20: Grep-Parseable Output
770
+
771
+ **Context**: Output used in shell pipelines and scripts.
772
+
773
+ **Test Flow**:
774
+
775
+ ```bash
776
+ # Test table output is grep-friendly
777
+ command list | grep "pattern"
778
+ command list | awk '{print $2}'
779
+ command list | cut -f1
780
+
781
+ # Check for decorative borders
782
+ command list # Should not have === or box-drawing characters
783
+
784
+ # Verify one row per entry
785
+ command list | wc -l # Should match number of items
786
+ ```
787
+
788
+ **Evaluate**:
789
+
790
+ - No decorative borders or box-drawing characters
791
+ - One row per entry (no wrapped rows)
792
+ - Consistent column alignment
793
+ - Predictable delimiters
794
+ - Header row can be identified or skipped
795
+
796
+ **Good Example**:
797
+
798
+ ```bash
799
+ # Good: Clean, parseable
800
+ $ mytool list
801
+ NAME STATUS PORT
802
+ api-server running 3000
803
+ db-server stopped 5432
804
+ cache running 6379
805
+
806
+ $ mytool list | grep running | awk '{print $1}'
807
+ api-server
808
+ cache
809
+
810
+ # Bad: Decorative borders
811
+ $ badtool list
812
+ +------------+---------+------+
813
+ | NAME | STATUS | PORT |
814
+ +------------+---------+------+
815
+ | api-server | running | 3000 |
816
+ +------------+---------+------+
817
+ ```
818
+
819
+ ## Scenario 21: TTY Detection & Non-Interactive Mode
820
+
821
+ **Context**: Tool behaves differently in interactive vs script mode.
822
+
823
+ **Test Flow**:
824
+
825
+ ```bash
826
+ # Interactive (TTY)
827
+ command deploy
828
+ # Should show prompts, colors, progress
829
+
830
+ # Non-interactive (pipe)
831
+ echo "yes" | command deploy
832
+ # Should not prompt, no colors
833
+
834
+ # Explicit non-interactive
835
+ command deploy --no-input
836
+ command deploy --yes
837
+
838
+ # In script
839
+ cat script.sh
840
+ #!/bin/bash
841
+ command deploy --env production --no-input
842
+ ```
843
+
844
+ **Evaluate**:
845
+
846
+ - Detects when stdin is a TTY
847
+ - Prompts only when interactive
848
+ - --no-input flag disables all prompts
849
+ - Colors disabled in pipes (or when NO_COLOR set)
850
+ - Progress indicators disabled in non-TTY
851
+ - All required data accepted via flags
852
+
853
+ **Good Example**:
854
+
855
+ ```bash
856
+ # Interactive
857
+ $ mytool deploy
858
+ ? Select environment: (Use arrow keys)
859
+ ❯ development
860
+ staging
861
+ production
862
+
863
+ # Non-interactive
864
+ $ mytool deploy --env production --no-input
865
+ Deploying to production...
866
+ ✓ Deployed successfully
867
+
868
+ # In pipe (auto-detected)
869
+ $ echo "config" | mytool setup
870
+ Processing stdin input...
871
+ ✓ Setup complete
872
+ ```
873
+
874
+ ## Scenario 22: Next-Step Suggestions
875
+
876
+ **Context**: After completing operations, users need guidance.
877
+
878
+ **Test Flow**:
879
+
880
+ ```bash
881
+ # After init
882
+ command init
883
+
884
+ # After deploy
885
+ command deploy
886
+
887
+ # After error
888
+ command broken-operation
889
+
890
+ # After completion
891
+ command complete-task
892
+ ```
893
+
894
+ **Evaluate**:
895
+
896
+ - Suggests logical next steps
897
+ - Provides example commands
898
+ - Links to relevant documentation
899
+ - Context-aware suggestions
900
+ - Not overwhelming (3-5 suggestions max)
901
+
902
+ **Good Example**:
903
+
904
+ ```bash
905
+ $ mytool init
906
+ ✓ Project initialized
907
+
908
+ Next steps:
909
+ 1. Configure API key: mytool config:set API_KEY=xxx
910
+ 2. Deploy to staging: mytool deploy --env staging
911
+ 3. View logs: mytool logs --follow
912
+
913
+ Learn more: https://docs.mytool.dev/quickstart
914
+
915
+ $ mytool deploy
916
+ ✓ Deployed to production
917
+
918
+ View your app: https://myapp.production.com
919
+ View logs: mytool logs --env production
920
+ Monitor: mytool status --watch
921
+ Rollback: mytool rollback
922
+ ```
923
+
924
+ ## Scenario 23: Root Command Patterns
925
+
926
+ **Context**: Root topic commands should list items, not require subcommands.
927
+
928
+ **Test Flow**:
929
+
930
+ ```bash
931
+ # Test root topic
932
+ command config # Should list all config
933
+ command apps # Should list all apps
934
+ command users # Should list all users
935
+
936
+ # Anti-pattern to check for
937
+ command config:list # Redundant - should not exist
938
+ command apps:list # Redundant - should not exist
939
+ ```
940
+
941
+ **Evaluate**:
942
+
943
+ - Root topic lists items by default
944
+ - No redundant `:list` or `list` subcommand needed
945
+ - Consistent across all topics
946
+ - Matches user expectations (like `heroku config`)
947
+
948
+ **Good Example**:
949
+
950
+ ```bash
951
+ # Good pattern
952
+ $ mytool config
953
+ API_KEY: ***hidden***
954
+ TIMEOUT: 30s
955
+ REGION: us-east-1
956
+
957
+ $ mytool config:set KEY=value
958
+ ✓ Set KEY=value
959
+
960
+ # Bad pattern (avoid)
961
+ $ badtool config
962
+ Error: Missing subcommand
963
+
964
+ Usage: badtool config [list|set|get|delete]
965
+ ```
966
+
967
+ ## Testing Template
968
+
969
+ Use this template for each scenario:
970
+
971
+ ```markdown
972
+ ## Scenario: [Name]
973
+
974
+ **Commands Executed**:
975
+ [actual commands run]
976
+
977
+ **Observed Behavior**:
978
+ [what happened]
979
+
980
+ **Expected Behavior**:
981
+ [what should happen]
982
+
983
+ **Rating**: ___/5
984
+
985
+ **Issues**:
986
+
987
+ - [specific issue 1]
988
+ - [specific issue 2]
989
+
990
+ **Recommendations**:
991
+
992
+ - [specific improvement 1]
993
+ - [specific improvement 2]
994
+ ```
995
+
996
+ ## Summary
997
+
998
+ After testing all relevant scenarios:
999
+
1000
+ 1. **Most Common Issues**: [patterns observed]
1001
+ 2. **Best Aspects**: [what works well]
1002
+ 3. **Priority Fixes**: [top 3 improvements needed]
1003
+ 4. **Overall Usability**: ___/5