#633·cli

feat: add Examples sections on high-traffic commands

Author: margaretjguCreated Sep 14, 2026Updated Sep 28, 2026
Labelsenhancement

Generated --help is schema descriptions only. That is correct for 200+ generated endpoints and wrong for the commands people actually run first.

Hand-author Examples (commander addHelpText) on a short list, not the full tree:

  • elastic config context add / list / current-context set
  • elastic status
  • elastic stack es search, indices create, indices delete, cat indices
  • elastic cloud serverless projects create (and the --save-as path)
  • elastic docs search

Keep examples copy-pasteable. One happy path, one --json, one --dry-run where it mutates.

Acceptance: each listed command's --help has an Examples block. Tests assert the strings are present so codegen cannot wipe them.