ruvnet / ruvnet/ruflo

standardize command line help output for --help

Open
#345 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
72.7k
Forks
8.6k
Avg merge
2d 23h
Merged PRs (30d)
83

Description

All help output displayed to the user from the command line when using the `--help` switch must be standardized for commands and subcommands. Accepted unix/linux conventions must be used. Help text must never be markdown style with bold, colors, emojis, glyphs, tips or narrative. Help must output a consitent columnar format. All command line switches with multiple parameter choices must indicate their default value. The distinction between global options and subcommand specific options must be apparent.

Incorrect parameters passed by the user must display a helpful, context specific error message showing valid parameters. For example:

```
claude-flow hive-mind spawn --queen-type monarch

Error: monarch is not a valid queen type. Valid options are strategic,tactical,adaptive.
```

The following examples demonstrate desired behavior. Proper syntax is indicated first. Display is columnar with defaults indicated. Commands and their subcommands have context specific help. Global options are shown.

granted

```
❯ granted --help
NAME:
granted - https://granted.dev

USAGE:
granted [global options] command [command options] [arguments...]

VERSION:
0.36.0

COMMANDS:
browser View the web browser that Granted uses to open cloud consoles
settings Manage Granted settings
completion Add autocomplete to your granted cli installation
token Deprecated: Use 'sso-tokens' instead
sso-tokens Manage AWS SSO tokens
uninstall Remove all Granted configuration
sso Manage your local AWS configuration file from information available in AWS SSO
credentials Manage secure IAM credentials
credential-process Exports AWS session credentials for use with AWS CLI credential_process
registry Manage Profile Registries
console Generate an AWS console URL using credentials in the environment or with a credential process.
login Log in to Glide [deprecated]
experimental, exp
cache Manage your cached credentials that are stored in secure storage
auth Manage OIDC authentication for Granted
request Request access to a role
doctor Run diagnostics locally to help debug common issues relating to granted and aws
rds Granted RDS plugin
common-fate, cf Interact with your Common Fate deployment
eks Granted EKS plugin
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--verbose Log debug messages (default: false)
--aws-config-file value
--help, -h show help
--version, -v print the version
❯ granted sso --help
NAME:
granted sso - Manage your local AWS configuration file from information available in AWS SSO

USAGE:
granted sso command [command options] [arguments...]

COMMANDS:
generate Prints an AWS configuration file to stdout with profiles from accounts and roles available in AWS SSO
populate Populate your local AWS configuration file with profiles from accounts and roles available in AWS SSO
login Log in via AWS SSO interactive credential process
help, h Shows a list of commands or help for one command

OPTIONS:
--help, -h show help
❯ granted sso populate --help
NAME:
granted sso populate - Populate your local AWS configuration file with profiles from accounts and roles available in AWS SSO

USAGE:
granted [global options] sso populate [command options] [sso-start-url]

OPTIONS:
--config value Specify the SSO config section ([SSO.name]) (default: "default")
--prefix value Specify a prefix for all generated profile names
--sso-region value Specify the SSO region
--sso-scope value [ --sso-scope value ] Specify the SSO scopes
--source value [ --source value ] The sources to load AWS profiles from (default: "aws-sso")
--prune Remove any generated profiles with the 'common_fate_generated_from' key which no longer exist (default: false)
--profile-template value Specify profile name template (default: "{{ .AccountName }}/{{ .RoleName }}")
--no-credential-process Generate profiles without the Granted credential-process integration (default: false)
--help, -h show help
```

az

```
❯ az --help

Group
az

Subgroups:
account : Manage Azure subscription information.
acr : Manage private registries with Azure Container Registries.
ad : Manage Microsoft Entra ID (formerly known as Azure Active
Directory, Azure AD, AAD) entities needed for Azure role-based
access control (Azure RBAC) through Microsoft Graph API.
advisor : Manage Azure Advisor.
afd : Manage Azure Front Door Standard/Premium.
aks : Manage Azure Kubernetes Services.
ams : Manage Azure Media Services resources.
apim : Manage Azure API Management services.
appconfig : Manage App Configurations.
appservice : Manage App Service plans.
aro : Manage Azure Red Hat OpenShift clusters.
backup : Manage Azure Backups.
batch : Manage Azure Batch.
bicep : Bicep CLI command group.
billing : Manage Azure Billing.
bot : Manage Microsoft Azure Bot Service.
cache : Commands to manage CLI objects cached using the `--defer`
argument.
capacity : Manage capacity.
cdn : Manage Azure Content Delivery Networks (CDNs).
cloud : Manage registered Azure clouds.
cognitiveservices : Manage Azure Cognitive Services accounts.
compute-fleet [Preview] : Manage for Azure Compute Fleet.
compute-recommender [Preview] : Manage sku/zone/region recommender info for compute resources.
config [Experimental] : Manage Azure CLI configuration.
connection : Commands to manage Service Connector local connections which
allow local environment to connect Azure Resource. If you want
to manage connection for compute service, please run 'az
webapp/containerapp/spring connection'.
consumption [Preview] : Manage consumption of Azure resources.
container : Manage Azure Container Instances.
containerapp : Manage Azure Container Apps.
cosmosdb : Manage Azure Cosmos DB database accounts.
data-boundary : Data boundary operations.
databoxedge [Preview] : Manage device with databoxedge.
deployment : Manage Azure Resource Manager template deployment at
subscription scope.
deployment-scripts : Manage deployment scripts at subscription or resource group
scope.
disk : Manage Azure Managed Disks.
disk-access : Manage disk access resources.
disk-encryption-set : Disk Encryption Set resource.
dls [Preview] : Manage Data Lake Store accounts and filesystems.
dms : Manage Azure Data Migration Service (classic) instances.
eventgrid : Manage Azure Event Grid topics, domains, domain topics, system
topics partner topics, event subscriptions, system topic event
subscriptions and partner topic event subscriptions.
eventhubs : Eventhubs.
extension : Manage and update CLI extensions.
feature : Manage resource provider features.
functionapp : Manage function apps. To install the Azure Functions Core tools
see https://github.com/Azure/azure-functions-core-tools.
group : Manage resource groups and template deployments.
hdinsight : Manage HDInsight resources.
identity : Manage Managed Identity.
image : Manage custom virtual machine images.
iot : Manage Internet of Things (IoT) assets.
keyvault : Manage KeyVault keys, secrets, and certificates.
lab [Preview] : Manage azure devtest labs.
lock : Manage Azure locks.
logicapp : Manage logic apps.
managed-cassandra : Azure Managed Cassandra.
managedapp : Manage template solutions provided and maintained by Independent
Software Vendors (ISVs).
managedservices : Manage the registration assignments and definitions in Azure.
maps : Manage Azure Maps.
mariadb : Manage Azure Database for MariaDB servers.
monitor : Manage the Azure Monitor Service.
mysql : Manage Azure Database for MySQL servers.
netappfiles : Manage Azure NetApp Files (ANF) Resources.
network : Manage Azure Network resources.
policy : Manage resource policies.
postgres : Manage Azure Database for PostgreSQL servers.
ppg : Manage Proximity Placement Groups.
private-link : Private-link association CLI command group.
provider : Manage resource providers.
redis : Manage dedicated Redis caches for your Azure applications.
relay : Manage Azure Relay Service namespaces, WCF relays, hybrid
connections, and rules.
resource : Manage Azure resources.
resourcemanagement : Resourcemanagement CLI command group.
restore-point : Manage restore point with res.
role : Manage Azure role-based access control (Azure RBAC).
search : Manage Azure Search services, admin keys and query keys.
security : Manage your security posture with Microsoft Defender for Cloud.
servicebus : Servicebus.
sf : Manage and administer Azure Service Fabric clusters.
sig : Manage shared image gallery.
signalr : Manage Azure SignalR Service.
snapshot : Manage point-in-time copies of managed disks, native blobs, or
other snapshots.
sql : Manage Azure SQL Databases and Data Warehouses.
sshkey : Manage ssh public key with vm.
stack : A deployment stack is a native Azure resource type that enables
you to perform operations on a resource collection as an atomic
unit.
staticwebapp : Manage static apps.
storage : Manage Azure Cloud Storage resources.
synapse : Manage and operate Synapse Workspace, Spark Pool, SQL Pool.
tag : Tag Management on a resource.
term [Experimental] : Manage marketplace agreement with marketplaceordering.
ts : Manage template specs at subscription or resource group scope.
vm : Manage Linux or Windows virtual machines.
vmss : Manage groupings of virtual machines in an Azure Virtual Machine
Scale Set (VMSS).
webapp : Manage web apps.

Commands:
configure : Manage Azure CLI configuration. This command is interactive.
feedback : Send feedback to the Azure CLI Team.
find : I'm an AI robot, my advice is based on our Azure documentation
as well as the usage patterns of Azure CLI and Azure ARM users.
Using me improves Azure products and documentation.
interactive [Preview] : Start interactive mode. Installs the Interactive extension if
not installed already.
login : Log in to Azure.
logout : Log out to remove access to Azure subscriptions.
rest : Invoke a custom request.
survey : Take Azure CLI survey.
upgrade [Preview] : Upgrade Azure CLI and extensions.
version : Show the versions of Azure CLI modules and extensions in JSON
format by default or format configured by --output.

To search AI knowledge base for examples, use: az find "az "

❯ az vm --help

Group
az vm : Manage Linux or Windows virtual machines.

Subgroups:
application : Manage applications for VM.
availability-set : Group resources into availability sets.
boot-diagnostics : Troubleshoot the startup of an Azure Virtual Machine. Use this
feature to troubleshoot boot failures for custom or platform images.
diagnostics : Configure the Azure Virtual Machine diagnostics extension.
disk : Manage the managed data disks attached to a VM.
encryption : Manage encryption of VM disks.
extension : Manage extensions on VMs.
host : Manage Dedicated Hosts for Virtual Machines.
identity : Manage service identities of a VM.
image : Information on available virtual machine images.
monitor : Manage monitor aspect for a vm.
nic : Manage network interfaces. See also `az network nic`.
run-command : Manage run commands on a Virtual Machine.
secret : Manage VM secrets.
unmanaged-disk : Manage the unmanaged data disks attached to a VM.
user : Manage user accounts for a VM.

Commands:
assess-patches : Assess patches on a VM.
auto-shutdown : Manage auto-shutdown for VM.
capture : Capture information for a stopped VM.
convert : Convert a VM with unmanaged disks to use managed disks.
create : Create an Azure Virtual Machine.
deallocate : Deallocate a VM so that computing resources are no longer allocated
(charges no longer apply). The status will change from 'Stopped' to
'Stopped (Deallocated)'.
delete : Delete operation to delete a virtual machine.
generalize : Mark a VM as generalized, allowing it to be imaged for multiple
deployments.
get-instance-view : Get instance information about a VM.
install-patches : Install patches on a VM.
list : List details of Virtual Machines.
list-ip-addresses : List IP addresses associated with a VM.
list-sizes [Deprecated] : List available sizes for VMs.
list-skus : Get details for compute-related resource SKUs.
list-usage : List available usage resources for VMs.
list-vm-resize-options : List available resizing options for VMs.
open-port : Opens a VM to inbound traffic on specified ports.
perform-maintenance : The operation to perform maintenance on a virtual machine.
reapply : Reapply VMs.
redeploy : Redeploy an existing VM.
reimage : Reimage (upgrade the operating system) a virtual machine.
resize : Update a VM's size.
restart : Restart VMs.
show : Get the details of a VM.
simulate-eviction : Simulate the eviction of a Spot VM.
start : Start a stopped VM.
stop : Power off (stop) a running VM.
update : Update the properties of a VM.
wait : Place the CLI in a waiting state until a condition of the VM is met.

To search AI knowledge base for examples, use: az find "az vm"

❯ az vm start --help

Command
az vm start : Start a stopped VM.

Arguments
--no-wait : Do not wait for the long-running operation to finish. Allowed values: 0,
1, f, false, n, no, t, true, y, yes.

Resource Id Arguments
--ids : One or more resource IDs (space-delimited). It should be a complete
resource ID containing all information of 'Resource Id' arguments. You
should provide either --ids or other 'Resource Id' arguments.
--name --vm-name -n : The name of the Virtual Machine. You can configure the default using `az
configure --defaults vm=`.
--resource-group -g : Name of resource group. You can configure the default group using `az
configure --defaults group=`.
--subscription : Name or ID of subscription. You can configure the default subscription
using `az account set -s NAME_OR_ID`.

Global Arguments
--debug : Increase logging verbosity to show all debug logs.
--help -h : Show this help message and exit.
--only-show-errors : Only show errors, suppressing warnings.
--output -o : Output format. Allowed values: json, jsonc, none, table, tsv, yaml,
yamlc. Default: json.
--query : JMESPath query string. See http://jmespath.org/ for more information and
examples.
--verbose : Increase logging verbosity. Use --debug for full debug logs.

Examples
Start a stopped VM.
az vm start -g MyResourceGroup -n MyVm

Start all VMs in a resource group.
az vm start --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv)

Start a stopped VM.
az vm start --name MyVm --no-wait --resource-group MyResourceGroup

To search AI knowledge base for examples, use: az find "az vm start"
```

brew

```
❯ brew --help
Example usage:
brew search TEXT|/REGEX/
brew info [FORMULA|CASK...]
brew install FORMULA|CASK...
brew update
brew upgrade [FORMULA|CASK...]
brew uninstall FORMULA|CASK...
brew list [FORMULA|CASK...]

Troubleshooting:
brew config
brew doctor
brew install --verbose --debug FORMULA|CASK

Contributing:
brew create URL [--no-fetch]
brew edit [FORMULA|CASK...]

Further help:
brew commands
brew help [COMMAND]
man brew
https://docs.brew.sh
❯ brew install --help
Usage: brew install [options] formula|cask [...]

Install a formula or cask. Additional options specific to a formula may be
appended to the command.

Unless $HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is set, brew upgrade or brew
reinstall will be run for outdated dependents and dependents with broken
linkage, respectively.

Unless $HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run
for the installed formulae or, every 30 days, for all formulae.

Unless $HOMEBREW_NO_INSTALL_UPGRADE is set, brew install formula will
upgrade formula if it is already installed but outdated.

-d, --debug If brewing fails, open an interactive
debugging session with access to IRB or a
shell inside the temporary build directory.
--display-times Print install times for each package at the
end of the run. Enabled by default if
$HOMEBREW_DISPLAY_INSTALL_TIMES is set.
-f, --force Install formulae without checking for
previously installed keg-only or non-migrated
versions. When installing casks, overwrite
existing files (binaries and symlinks are
excluded, unless originally from the same
cask).
-v, --verbose Print the verification and post-install
steps.
-n, --dry-run Show what would be installed, but do not
actually install anything.
--ask Ask for confirmation before downloading and
installing formulae. Print download and
install sizes of bottles and dependencies.
Enabled by default if $HOMEBREW_ASK is set.
--formula, --formulae Treat all named arguments as formulae.
--ignore-dependencies An unsupported Homebrew development option to
skip installing any dependencies of any kind.
If the dependencies are not already present,
the formula will have issues. If you're not
developing Homebrew, consider adjusting your
PATH rather than using this option.
--only-dependencies Install the dependencies with specified
options but do not install the formula
itself.
--cc Attempt to compile using the specified
compiler, which should be the name of the
compiler's executable, e.g. gcc-9 for GCC
9. In order to use LLVM's clang, specify
llvm_clang. To use the Apple-provided
clang, specify clang. This option will only
accept compilers that are provided by
Homebrew or bundled with macOS. Please do not
file issues if you encounter errors while
using this option.
-s, --build-from-source Compile formula from source even if a
bottle is provided. Dependencies will still
be installed from bottles if they are
available.
--force-bottle Install from a bottle if it exists for the
current or newest version of macOS, even if
it would not normally be used for
installation.
--include-test Install testing dependencies required to run
brew test formula.
--HEAD If formula defines it, install the HEAD
version, aka. main, trunk, unstable, master.
--fetch-HEAD Fetch the upstream repository to detect if
the HEAD installation of the formula is
outdated. Otherwise, the repository's HEAD
will only be checked for updates when a new
stable or development version has been
released.
--keep-tmp Retain the temporary files created during
installation.
--debug-symbols Generate debug symbols on build. Source will
be retained in a cache directory.
--build-bottle Prepare the formula for eventual bottling
during installation, skipping any
post-install steps.
--skip-post-install Install but skip any post-install steps.
--skip-link Install but skip linking the keg into the
prefix.
--as-dependency Install but mark as installed as a dependency
and not installed on request.
--bottle-arch Optimise bottles for the specified
architecture rather than the oldest
architecture supported by the version of
macOS the bottles are built on.
-i, --interactive Download and patch formula, then open a
shell. This allows the user to run
./configure --help and otherwise determine
how to turn the software package into a
Homebrew package.
-g, --git Create a Git repository, useful for creating
patches to the software.
--overwrite Delete files that already exist in the prefix
while linking.
--cask, --casks Treat all named arguments as casks.
--[no-]binaries Disable/enable linking of helper executables
(default: enabled). Enabled by default if
$HOMEBREW_CASK_OPTS_BINARIES is set.
--require-sha Require all casks to have a checksum. Enabled
by default if
$HOMEBREW_CASK_OPTS_REQUIRE_SHA is set.
--[no-]quarantine Disable/enable quarantining of downloads
(default: enabled). Enabled by default if
$HOMEBREW_CASK_OPTS_QUARANTINE is set.
--adopt Adopt existing artifacts in the destination
that are identical to those being installed.
Cannot be combined with --force.
--skip-cask-deps Skip installing cask dependencies.
--zap For use with brew reinstall --cask. Remove
all files associated with a cask. May remove
files which are shared between applications.
--appdir Target location for Applications (default:
/Applications).
--keyboard-layoutdir Target location for Keyboard Layouts
(default: /Library/Keyboard Layouts).
--colorpickerdir Target location for Color Pickers (default:
~/Library/ColorPickers).
--prefpanedir Target location for Preference Panes
(default: ~/Library/PreferencePanes).
--qlplugindir Target location for Quick Look Plugins
(default: ~/Library/QuickLook).
--mdimporterdir Target location for Spotlight Plugins
(default: ~/Library/Spotlight).
--dictionarydir Target location for Dictionaries (default:
~/Library/Dictionaries).
--fontdir Target location for Fonts (default:
~/Library/Fonts).
--servicedir Target location for Services (default:
~/Library/Services).
--input-methoddir Target location for Input Methods (default:
~/Library/Input Methods).
--internet-plugindir Target location for Internet Plugins
(default: ~/Library/Internet Plug-Ins).
--audio-unit-plugindir Target location for Audio Unit Plugins
(default:
~/Library/Audio/Plug-Ins/Components).
--vst-plugindir Target location for VST Plugins (default:
~/Library/Audio/Plug-Ins/VST).
--vst3-plugindir Target location for VST3 Plugins (default:
~/Library/Audio/Plug-Ins/VST3).
--screen-saverdir Target location for Screen Savers (default:
~/Library/Screen Savers).
--language Comma-separated list of language codes to
prefer for cask installation. The first
matching language is used, otherwise it
reverts to the cask's default language. The
default value is the language of your system.
-q, --quiet Make some output more quiet.
-h, --help Show this message.
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the command-line entry points that handle `--help` for commands and subcommands, then compare their output with the Granted and Azure CLI examples in the issue. Map the global and subcommand-specific options, defaults, and invalid-parameter errors before defining consistent output and verification criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, developer-experience
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.