influxdata / influxdata/influxdb

Investigate grouping options together in CLI help text

Open
#20,706 0 comments 0 reactions 0 assignees View on GitHub
area/2.x area/cli area/documentation
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Many of our CLI commands (especially `influxd run` and `influxd upgrade`) take a large number of options. Options were often added organically over time, without a consistent naming scheme, so it can end up being difficult for users to know which options are related to one another and how they relate.

A common technique I've seen in other CLI programs is to group options into categories within the help-text. For example, in `influxd upgrade` we could have groups for "Inputs" and "Outputs". `cobra` doesn't have built-in support for that functionality, but from spf13/cobra#1327 it sounds like there are enough customization hooks for us to roll our own solution.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the CLI help implementation for `influxd run` and `influxd upgrade`, then review Cobra's customization hooks described in spf13/cobra#1327. Define related option groups such as "Inputs" and "Outputs", and verify that the generated help text presents those categories consistently for commands with many options.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.