feat: add temporal options command and declutter help output#1061
feat: add temporal options command and declutter help output#1061chaptersix wants to merge 3 commits into
Conversation
Hide global and connection flags from help output, replacing them with a hint to the new `temporal options` command. This follows the kubectl pattern where `kubectl options` lists global flags. Changes: - Add `temporal options` command with grouped tables for global and connection options, showing flag, env var, config key, and description - Hide root persistent flags from root help output - Hide client option flags from subcommand help via `hide-from-help` option set attribute and generated `HideFlags()` methods - Add `implied-env` and `config-key` annotations to generated flag descriptions so env vars and config keys are discoverable - Add `Description()` methods to option sets, driven from YAML - Shorten option descriptions to remove info now shown in table columns
|
if it's not already, make this experimental. we'll iterate on it. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f17d16e4c6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // If there is an implied env var or config key, append to desc | ||
| desc := o.Description | ||
| if o.ImpliedEnv != "" { | ||
| desc += fmt.Sprintf(" Env: %s.", o.ImpliedEnv) |
There was a problem hiding this comment.
Stop advertising unsupported env-file variable
This now appends every implied-env to user-facing help, which makes --env-file show Env: TEMPORAL_ENV_FILE, but that variable is never consumed when selecting the deprecated env config file: preprocessOptions only prefetches --env-file from Args and otherwise falls back to the default path, and a repo-wide search shows no TEMPORAL_ENV_FILE lookup. Users following temporal options will set this env var and still have the CLI read the default env file, potentially using the wrong saved environment.
Useful? React with 👍 / 👎.
Summary
temporal optionscommand (kubectl-style) that displays global and connection flags in a table with env var and config key columns--helpand connection flags from subcommand--help, replacing them with a hint totemporal optionshide-from-help,config-key, andDescription()support to the option set YAML spec and code generatorBefore
After
Test plan
go build ./cmd/temporalgo test ./internal/temporalcli/ -run TestHelptemporal --helpno longer shows global flagstemporal workflow --helpno longer shows connection flagstemporal workflow list --helpshows only command-specific flagstemporal optionsdisplays both tables with correct env/config columns