Skip to content

Commit 5ee5d98

Browse files
authored
Merge pull request #135 from StackVista/STAC-24007
STAC-24007: Remove repetitions from Usage descriptions
2 parents 47844d8 + ebe4c2d commit 5ee5d98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+77
-80
lines changed

AGENTS.md

Lines changed: 5 additions & 7 deletions

cmd/context/context_delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type DeleteArgs struct {
1616
func DeleteCommand(cli *di.Deps) *cobra.Command {
1717
args := &DeleteArgs{}
1818
cmd := &cobra.Command{
19-
Use: "delete --name NAME",
19+
Use: "delete",
2020
Short: "Delete a saved context from the CLI configuration",
2121
Long: "Delete a connection context from the CLI configuration file. The currently active context cannot be deleted; switch to a different context first.",
2222
Example: `# delete an unused context

cmd/context/context_save.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type SaveArgs struct {
3030
func SaveCommand(cli *di.Deps) *cobra.Command {
3131
args := &SaveArgs{}
3232
cmd := &cobra.Command{
33-
Use: "save --url URL {--api-token TOKEN | --service-token TOKEN}",
33+
Use: "save",
3434
Short: "Save a connection context to the CLI configuration",
3535
Long: `Save a connection context to the CLI configuration file. The context stores the server URL and authentication credentials. After saving, this context becomes the current active context.`,
3636
Example: `# save a context with an API token

cmd/context/context_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type SetArgs struct {
1616
func SetCommand(cli *di.Deps) *cobra.Command {
1717
args := &SetArgs{}
1818
cmd := &cobra.Command{
19-
Use: "set --name NAME",
19+
Use: "set",
2020
Short: "Set the active context to use for CLI commands",
2121
Long: "Set the active connection context. All subsequent CLI commands will use this context's server URL and credentials.",
2222
Example: `# switch to the production context

cmd/context/context_validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ValidateArgs struct {
1414
func ValidateCommand(cli *di.Deps) *cobra.Command {
1515
args := &ValidateArgs{}
1616
cmd := &cobra.Command{
17-
Use: "validate [--name NAME]",
17+
Use: "validate",
1818
Short: "Validate that a context can connect to the server",
1919
Long: "Validate a connection context by attempting to connect to the SUSE Observability server. Validates the current context if no name is specified.",
2020
Example: `# validate the current context

cmd/dashboard/dashboard_apply.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type ApplyArgs struct {
2121
func DashboardApplyCommand(cli *di.Deps) *cobra.Command {
2222
args := &ApplyArgs{}
2323
cmd := &cobra.Command{
24-
Use: "apply --file FILE",
24+
Use: "apply",
2525
Short: "Create or update a dashboard from a YAML file",
2626
Long: "Create or update a dashboard from a YAML file. If the YAML contains an 'id' field, the existing dashboard is updated; otherwise a new dashboard is created.",
2727
Example: `# create a new dashboard from file

cmd/dashboard/dashboard_clone.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ type CloneArgs struct {
2222
func DashboardCloneCommand(cli *di.Deps) *cobra.Command {
2323
args := &CloneArgs{}
2424
cmd := &cobra.Command{
25-
Use: "clone {--id ID | --identifier URN} --name NAME",
25+
Use: "clone",
2626
Short: "Clone an existing dashboard to create a new copy",
2727
Long: "Clone an existing dashboard to create a new copy with a different name. Optionally set a new description and scope for the cloned dashboard.",
2828
Example: `# clone a dashboard by ID
2929
sts dashboard clone --id 123456789 --name My Dashboard Copy
3030
3131
# clone a dashboard as private
32-
sts dashboard clone --identifier urn:stackpack:my-dashboard --name Private Copy --scope privateDashboard`,
32+
sts dashboard clone --identifier urn:stackpack:my-dashboard --name "Private Copy" --scope privateDashboard`,
3333
RunE: cli.CmdRunEWithApi(RunDashboardCloneCommand(args)),
3434
}
3535

cmd/dashboard/dashboard_delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type DeleteArgs struct {
1919
func DashboardDeleteCommand(cli *di.Deps) *cobra.Command {
2020
args := &DeleteArgs{}
2121
cmd := &cobra.Command{
22-
Use: "delete {--id ID | --identifier URN}",
22+
Use: "delete",
2323
Short: "Delete a dashboard permanently",
2424
Long: "Delete a dashboard by its ID or identifier. Only user-owned dashboards can be deleted.",
2525
Example: `# delete a dashboard by ID

cmd/dashboard/dashboard_describe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type DescribeArgs struct {
2121
func DashboardDescribeCommand(cli *di.Deps) *cobra.Command {
2222
args := &DescribeArgs{}
2323
cmd := &cobra.Command{
24-
Use: "describe {--id ID | --identifier URN}",
24+
Use: "describe",
2525
Short: "Export a dashboard definition in YAML format",
2626
Long: "Export the full dashboard definition in YAML format. Output can be printed to stdout or saved to a file for backup or migration purposes.",
2727
Example: `# describe a dashboard by ID

cmd/dashboard/dashboard_edit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type EditArgs struct {
2121
func DashboardEditCommand(cli *di.Deps) *cobra.Command {
2222
args := &EditArgs{}
2323
cmd := &cobra.Command{
24-
Use: "edit {--id ID | --identifier URN}",
24+
Use: "edit",
2525
Short: "Edit a dashboard interactively in your default editor",
2626
Long: "Edit a dashboard interactively. Opens the dashboard YAML in the editor defined by your EDITOR environment variable. Changes are applied when you save and close the editor.",
2727
Example: `# edit a dashboard by ID

0 commit comments

Comments
 (0)