-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the help descriptions for commands #845
Conversation
I think something might be off. I suspect “tf” is an alias. If it is an alias, we should instead say “Alias for ‘terraform’ commands” |
yes that is true. Updating the help content |
📝 Walkthrough📝 WalkthroughThe pull request updates the short and long descriptions for various commands in the Atmos CLI to provide clearer and more meaningful information about their functionalities. This change aims to enhance the user experience by replacing vague descriptions with specific details that better represent what each command does. The alterations do not affect the underlying logic or control flow of the commands. Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (6)
🧰 Additional context used📓 Learnings (1)examples/quick-start-advanced/Dockerfile (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (1)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (19)
cmd/atlantis.go (1)
7-7
: Consider updating the command comment and Long description for consistencyThe command comment "atlantisCmd executes Atlantis commands" and Long description could be updated to match the specificity of the Short description.
-// atlantisCmd executes Atlantis commands +// atlantisCmd handles generation and management of Atlantis configurations var atlantisCmd = &cobra.Command{ Use: "atlantis", Short: "Generate and manage Atlantis configurations", - Long: `This command executes Atlantis integration commands`, + Long: `This command provides functionality to generate and manage Atlantis configurations for Terraform workflow automation`,Also applies to: 11-11
cmd/vendor.go (1)
7-7
: Align comment and Long description with the new Short descriptionFor consistency, consider updating the command comment and Long description to match the improved specificity.
-// vendorCmd executes 'atmos vendor' CLI commands +// vendorCmd manages external dependencies for components and stacks var vendorCmd = &cobra.Command{ Use: "vendor", Short: "Manage external dependencies for components or stacks", - Long: `This command executes 'atmos vendor' CLI commands`, + Long: `This command helps manage external dependencies required by your components and stacks, ensuring proper versioning and availability`,Also applies to: 11-11
cmd/validate.go (1)
11-11
: Consider expanding the Long descriptionWhile the Short description now provides excellent detail, the Long description could be more informative.
- Long: `This command validates stacks and components`, + Long: `This command performs validation of stacks and components using Open Policy Agent (OPA) policies and JSON Schema definitions to ensure configuration correctness`,cmd/terraform_generate.go (1)
10-11
: Excellent battle-ready descriptions, commander! 🛡️The updated descriptions are clear and informative. However, consider adding a brief mention of what types of configuration files are generated to make it even more helpful.
Consider enhancing the Long description like this:
-Long: "This command generates various configuration files for Terraform components in Atmos.", +Long: "This command generates various configuration files (e.g., backend configs, provider configs) for Terraform components in Atmos.",cmd/describe_config.go (1)
14-15
: Good improvement in clarity, but consider adding format options to help text!The updated descriptions are more precise and technical. However, consider enhancing the Long description to mention the available format options (json|yaml) since this is an important feature of the command.
Consider updating the Long description to include format information:
- Long: "This command displays the final, deep-merged CLI configuration after combining all relevant configuration files.", + Long: "This command displays the final, deep-merged CLI configuration after combining all relevant configuration files. The output can be formatted as JSON or YAML using the --format (-f) flag.",cmd/validate_stacks.go (1)
15-16
: LGTM! Clear and informative descriptions.The updated descriptions effectively communicate the command's purpose. The Short description is concise yet informative, while the Long description provides additional context about validation and compliance.
Consider adding an example of what constitutes a valid stack manifest in the Long description to make it even more helpful.
cmd/version.go (1)
18-20
: Update Long description to match Short description's completeness.While the new Short description excellently captures both version display and update checking functionality, the Long description could be more comprehensive.
Consider updating the Long description to match:
- Long: `This command prints the CLI version`, + Long: `This command displays the installed Atmos CLI version and checks GitHub for available updates`,cmd/terraform_generate_backend.go (1)
14-15
: Enhance Long description with backend configuration details.The Short description is now clear and specific. However, the Long description could be more informative about what a backend configuration is and why it's important.
Consider updating the Long description to be more educational:
- Long: `This command generates the backend config for a terraform component: atmos terraform generate backend <component> -s <stack>`, + Long: `This command generates the backend configuration for a Terraform component, which defines where and how the Terraform state is stored (e.g., S3, local, etc.). Usage: atmos terraform generate backend <component> -s <stack>`,cmd/helmfile_generate_varfile.go (1)
14-15
: Strong improvement in command descriptions!The new descriptions are more precise and avoid redundant command syntax. They clearly communicate the purpose of generating a varfile specifically for Atmos Helmfile components.
Consider also updating the flag descriptions in
init()
to follow the same clear style:- helmfileGenerateVarfileCmd.PersistentFlags().StringP("stack", "s", "", "atmos helmfile generate varfile <component> -s <stack>") - helmfileGenerateVarfileCmd.PersistentFlags().StringP("file", "f", "", "atmos helmfile generate varfile <component> -s <stack> -f <file>") + helmfileGenerateVarfileCmd.PersistentFlags().StringP("stack", "s", "", "Stack name for the Helmfile component") + helmfileGenerateVarfileCmd.PersistentFlags().StringP("file", "f", "", "Output file path for the generated varfile")cmd/terraform_generate_varfile.go (1)
14-15
: Excellent parallel improvements to Terraform command!The updated descriptions maintain consistency with the Helmfile command style while being specific to Terraform components.
Consider applying the same clear style to flag descriptions:
- terraformGenerateVarfileCmd.PersistentFlags().StringP("stack", "s", "", "atmos terraform generate varfile <component> -s <stack>") - terraformGenerateVarfileCmd.PersistentFlags().StringP("file", "f", "", "atmos terraform generate varfile <component> -s <stack> -f <file>") + terraformGenerateVarfileCmd.PersistentFlags().StringP("stack", "s", "", "Stack name for the Terraform component") + terraformGenerateVarfileCmd.PersistentFlags().StringP("file", "f", "", "Output file path for the generated varfile")cmd/vendor_diff.go (1)
14-15
: Clear improvements to vendor diff descriptions, but consider implementation status!The new descriptions effectively communicate the command's intended purpose. However, since this command is not yet implemented (as noted in the init function), consider reflecting this in the help text.
Suggest the following updates:
- Short: "Show differences in vendor configurations or dependencies", - Long: "This command compares and displays the differences in vendor-specific configurations or dependencies.", + Short: "[Not yet implemented] Show differences in vendor configurations or dependencies", + Long: "[Not yet implemented] This command will compare and display the differences in vendor-specific configurations or dependencies.",Also consider updating the flag descriptions to match the improved style:
- vendorDiffCmd.PersistentFlags().StringP("component", "c", "", "atmos vendor diff --component <component>") - vendorDiffCmd.PersistentFlags().StringP("stack", "s", "", "atmos vendor diff --stack <stack>") + vendorDiffCmd.PersistentFlags().StringP("component", "c", "", "Component to compare vendor configurations") + vendorDiffCmd.PersistentFlags().StringP("stack", "s", "", "Stack to compare vendor configurations")cmd/workflow.go (1)
14-14
: Strong improvement in the Short description!The new description "Run automated workflows for infrastructure and operations" provides a clearer picture of the command's purpose and scope.
Consider updating the Long description to be as descriptive as the Short description, perhaps: "Execute automated workflows that orchestrate infrastructure and operational tasks. Workflows can be customized using YAML configuration files."
cmd/describe_dependents.go (1)
15-16
: Clear and precise description update!The new descriptions effectively communicate the command's purpose. The Short description is concise yet informative, while the Long description provides additional context without being redundant.
Consider documenting in the Long description that both "dependents" and "dependants" spellings are supported as aliases, as this might be helpful for users.
cmd/vendor_pull.go (1)
14-15
: Excellent clarity improvement in descriptions!The new descriptions effectively communicate the command's purpose and benefits.
Consider enhancing the Long description to mention the supported configuration types: "Pull and update vendor-specific configurations or dependencies (such as Terraform modules or Helmfile charts) to ensure the project has the latest required resources."
cmd/list_components.go (1)
18-19
: Strong improvement in command description, warrior! 💪The new descriptions are clear, action-oriented, and accurately reflect the command's capabilities. They effectively communicate both the primary purpose (listing components) and the optional filtering functionality.
For maximum clarity, consider adding the word "specific" before "stacks" in the Long description to match the style of the Short description:
- Long: "This command lists all Atmos components, with the option to filter by specific stacks.", + Long: "This command lists all Atmos components, with the option to filter by specific stacks.",cmd/describe_component.go (1)
14-15
: Excellent clarity improvement, commander! 🎯The new descriptions effectively communicate that this command shows configuration details. The Short description is particularly strong and action-oriented.
Consider simplifying the Long description to match the more direct tone used in other commands:
- Long: `The 'describe component' command displays the configuration of a specified Atmos component within a designated Atmos stack.`, + Long: `This command shows the configuration of an Atmos component within a specific stack.`,cmd/helmfile.go (1)
19-19
: Consider expanding the description to include common operationsThe new description is more meaningful, but could be even more helpful by mentioning common operations. Consider:
"Manage Helmfile-based Kubernetes deployments (e.g., sync, diff, apply)"cmd/terraform.go (1)
19-19
: Add alias information to the descriptionBased on the PR discussion, consider updating the description to:
"Execute Terraform commands (e.g., plan, apply, destroy) using Atmos stack configurations (alias: tf)"cmd/atlantis_generate_repo_config.go (1)
Line range hint
31-31
: Consider enhancing the--output-path
flag description, brave CLI warrior!The current description only shows usage example. Consider adding a brief explanation of what the flag does.
- atlantisGenerateRepoConfigCmd.PersistentFlags().String("output-path", "", "atmos atlantis generate repo-config --output-path ./atlantis.yaml --config-template config-1 --project-template project-1") + atlantisGenerateRepoConfigCmd.PersistentFlags().String("output-path", "", "Path where the generated Atlantis configuration file will be saved\nExample: atmos atlantis generate repo-config --output-path ./atlantis.yaml --config-template config-1 --project-template project-1")
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (37)
cmd/atlantis.go
(1 hunks)cmd/atlantis_generate.go
(1 hunks)cmd/atlantis_generate_repo_config.go
(1 hunks)cmd/aws.go
(1 hunks)cmd/aws_eks.go
(1 hunks)cmd/aws_eks_update_kubeconfig.go
(1 hunks)cmd/completion.go
(1 hunks)cmd/describe.go
(1 hunks)cmd/describe_affected.go
(1 hunks)cmd/describe_component.go
(1 hunks)cmd/describe_config.go
(1 hunks)cmd/describe_dependents.go
(1 hunks)cmd/describe_stacks.go
(1 hunks)cmd/describe_workflows.go
(1 hunks)cmd/docs.go
(1 hunks)cmd/helmfile.go
(1 hunks)cmd/helmfile_generate.go
(1 hunks)cmd/helmfile_generate_varfile.go
(1 hunks)cmd/list.go
(1 hunks)cmd/list_components.go
(1 hunks)cmd/list_stacks.go
(1 hunks)cmd/pro.go
(1 hunks)cmd/terraform.go
(1 hunks)cmd/terraform_generate.go
(1 hunks)cmd/terraform_generate_backend.go
(1 hunks)cmd/terraform_generate_backends.go
(1 hunks)cmd/terraform_generate_varfile.go
(1 hunks)cmd/terraform_generate_varfiles.go
(1 hunks)cmd/validate.go
(1 hunks)cmd/validate_component.go
(1 hunks)cmd/validate_stacks.go
(1 hunks)cmd/vendor.go
(1 hunks)cmd/vendor_diff.go
(1 hunks)cmd/vendor_pull.go
(1 hunks)cmd/version.go
(1 hunks)cmd/workflow.go
(1 hunks)internal/tui/templates/templater.go
(2 hunks)
✅ Files skipped from review due to trivial changes (9)
- cmd/completion.go
- cmd/aws.go
- cmd/helmfile_generate.go
- cmd/pro.go
- cmd/aws_eks_update_kubeconfig.go
- cmd/validate_component.go
- cmd/describe_affected.go
- cmd/describe_stacks.go
- cmd/describe_workflows.go
🔇 Additional comments (14)
cmd/atlantis.go (1)
10-10
: Excellent improvement to the command description!
The new description "Generate and manage Atlantis configurations" provides much clearer context about the command's purpose.
cmd/vendor.go (1)
10-10
: Great clarity in the new description!
The updated description "Manage external dependencies for components or stacks" clearly communicates the command's purpose.
cmd/validate.go (1)
10-10
: Excellent specificity in the new description!
The updated description clearly communicates both the purpose and the validation methods (OPA policies and JSON schemas).
cmd/describe.go (1)
10-10
: Strong improvement in command description, warrior! 💪
The new description "Show details about Atmos configurations and components" is clear, specific, and accurately represents the command's purpose. This is a significant improvement over the previous cyclic description.
cmd/atlantis_generate.go (1)
10-11
: Victory! These descriptions are worthy of the halls of Valhalla! 🏆
The updated descriptions excellently communicate both the purpose (Atlantis automation) and the broader context (Terraform workflow integration). The progression from Short to Long description provides a perfect balance of quick understanding and detailed explanation.
cmd/list.go (1)
9-12
: Strong improvement in command description clarity!
The updated descriptions are precise and informative. The Short description clearly states what the command does, while the Long description effectively explains its purpose and benefits.
cmd/aws_eks.go (1)
9-16
: Excellent enhancement of EKS command documentation!
The updated descriptions provide clear context about EKS functionality, and the inclusion of documentation links adds valuable reference material. The changes align perfectly with the previous review suggestions.
cmd/list_stacks.go (1)
18-19
: Well-crafted descriptions that maintain consistency, strategist! 🛡️
The new descriptions effectively mirror the structure used in the list_components.go command, creating a consistent pattern across the CLI. They clearly communicate both the primary listing functionality and the component-based filtering option.
cmd/terraform_generate_varfiles.go (1)
14-15
: LGTM! Clear and well-structured descriptions
The updated descriptions are precise and maintain good differentiation between Short and Long formats. The terminology is consistent with Atmos conventions.
cmd/terraform_generate_backends.go (1)
14-15
: Strong improvement in command descriptions!
The updated descriptions are more precise and informative:
- Short description clearly states the purpose: "Generate backend configurations for all Terraform components"
- Long description provides additional context about the environment
cmd/docs.go (1)
25-25
: Excellent clarity improvement in docs command description!
The updated description "Open Atmos documentation or display component-specific docs" is more precise and better reflects the command's dual functionality.
internal/tui/templates/templater.go (2)
37-40
: Well-structured implementation of custom help messages!
The map implementation provides a clean way to manage custom help descriptions. The 'tf' command description correctly reflects its nature as an alias, addressing the previous discussion in PR comments.
55-57
: Verify custom help message implementation
The implementation looks correct, but let's verify that it properly handles all commands.
✅ Verification successful
Custom help messages implementation is minimal but correct
The implementation correctly handles the defined custom help messages, which are currently only set for two commands:
help
: Display help information for Atmos commandstf
: Alias for 'terraform' commands
While the codebase has many commands, having only these two custom messages is valid as they represent special cases - the help command and an alias. Other commands appear to use their standard help messages defined in their respective command definitions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that all commands with custom help messages are properly handled
# Search for command definitions that might need custom help messages
rg -l "var \w+Cmd = &cobra\.Command{" cmd/
Length of output: 166
Script:
#!/bin/bash
# Let's fix the regex and search for command definitions
rg "var \w+Cmd = &cobra.Command\{"
# Also search for the customHelpShortMessage map definition
rg "customHelpShortMessage\s*:?="
# And check the actual command registration
ast-grep --pattern 'rootCmd.AddCommand($$$)'
Length of output: 2568
Script:
#!/bin/bash
# Let's examine the content of customHelpShortMessage map to see which commands are covered
rg -A 10 "var customHelpShortMessage = map\[string\]string\{" internal/tui/templates/templater.go
# Also check how commands are registered to ensure we're using correct command names
rg "AddCommand\(" cmd/
Length of output: 3053
cmd/atlantis_generate_repo_config.go (1)
14-15
: Strong improvement in command descriptions, warrior! 💪
The new descriptions are clear, concise, and accurately represent the command's purpose. The changes align well with the PR's objective of providing more meaningful help content.
Let's verify consistency with other Atlantis commands:
✅ Verification successful
The previous regex had escaping issues. Let's try with a more precise pattern to find Atlantis-related command definitions and their descriptions. This will help us verify consistency across command descriptions.
Well done, warrior! The command descriptions show excellent consistency! 🛡️
The updated descriptions align perfectly with the command hierarchy:
- Root command (
atlantis
): Sets the broad scope for Atlantis configuration management - Subcommand (
generate
): Focuses on the configuration generation aspect - Leaf command (
repo-config
): Precisely describes its specific purpose
The new descriptions maintain a clear, hierarchical structure while avoiding the previous cyclic references, making the command's purpose crystal clear to users.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for consistency in Atlantis-related command descriptions
# Search for all Atlantis-related command definitions
rg -A 5 'var atlantis.*Cmd = &cobra\.Command{'
Length of output: 184
Script:
#!/bin/bash
# Let's fix the regex and search for Cobra command definitions
rg -A 5 'var\s+atlantis\w*Cmd\s*=\s*&cobra\.Command\{'
# Also search for other Atlantis-related command descriptions
rg 'Short:\s+".*[Aa]tlantis.*"' -A 1
Length of output: 2360
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6967b3d
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
These changes were released in v1.141.0. |
what
We have updated the help strings of the commands
why
Previously the help descriptions metioned a cyclic description.
Example:
So we had to improve the descriptions.
Example:
references
issue: https://linear.app/cloudposse/issue/DEV-2823/atmos-commands-should-describe-what-they-do
parent issue: https://linear.app/cloudposse/issue/DEV-2740/atmos-help-should-show-meaningful-descriptions-of-commands
Summary by CodeRabbit
Summary by CodeRabbit
Release Notes
New Features
Documentation Updates
atlantisCmd
,awsCmd
,describeCmd
,validateCmd
,vendorCmd
, and many others to better reflect their purposes.Chores