Skip to content

Commit

Permalink
More consistent help commands
Browse files Browse the repository at this point in the history
- Align some wording
- Remove periods
- Fix some bad spacing

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 committed Jun 2, 2024
1 parent 17e6205 commit fedb572
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 88 deletions.
14 changes: 7 additions & 7 deletions apps/cnquery/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
func init() {
rootCmd.AddCommand(RunCmd)

RunCmd.Flags().StringP("command", "c", "", "MQL query to executed in the shell.")
RunCmd.Flags().Bool("parse", false, "Parse the query and return the logical structure.")
RunCmd.Flags().Bool("ast", false, "Parse the query and return the abstract syntax tree (AST).")
RunCmd.Flags().Bool("info", false, "Parse the query and provide information about it.")
RunCmd.Flags().BoolP("json", "j", false, "Run the query and return the object in a JSON structure.")
RunCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID.")
RunCmd.Flags().StringP("command", "c", "", "MQL query to executed in the shell")
RunCmd.Flags().Bool("parse", false, "Parse the query and return the logical structure")
RunCmd.Flags().Bool("ast", false, "Parse the query and return the abstract syntax tree (AST)")
RunCmd.Flags().Bool("info", false, "Parse the query and provide information about it")
RunCmd.Flags().BoolP("json", "j", false, "Run the query and return the object in a JSON structure")
RunCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID")

RunCmd.Flags().String("llx", "", "Generate the executable code bundle and save it to the specified file.")
RunCmd.Flags().String("llx", "", "Generate the executable code bundle and save it to the specified file")
RunCmd.Flags().MarkHidden("llx")
RunCmd.Flags().String("use-llx", "", "Run the code specified in the code bundle on disk")
_ = RunCmd.Flags().MarkHidden("use-llx")
Expand Down
26 changes: 13 additions & 13 deletions apps/cnquery/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,41 @@ func init() {
rootCmd.AddCommand(scanCmd)

_ = scanCmd.Flags().StringP("output", "o", "compact", "Set output format: "+reporter.AllFormats())
_ = scanCmd.Flags().BoolP("json", "j", false, "Run the query and return the object in a JSON structure.")
_ = scanCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID.")
_ = scanCmd.Flags().BoolP("json", "j", false, "Run the query and return the object in a JSON structure")
_ = scanCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID")

_ = scanCmd.Flags().String("inventory-file", "", "Set the path to the inventory file.")
_ = scanCmd.Flags().String("inventory-template", "", "Set the path to the inventory template.")
_ = scanCmd.Flags().String("inventory-file", "", "Set the path to the inventory file")
_ = scanCmd.Flags().String("inventory-template", "", "Set the path to the inventory template")
_ = scanCmd.Flags().MarkHidden("inventory-template")

_ = scanCmd.Flags().Bool("inventory-format-ansible", false, "Set the inventory format to Ansible.")
_ = scanCmd.Flags().Bool("inventory-format-ansible", false, "Set the inventory format to Ansible")
// "inventory-ansible" is deprecated, use "inventory-format-ansible" instead
_ = scanCmd.Flags().Bool("inventory-ansible", false, "Set the inventory format to Ansible.")
_ = scanCmd.Flags().Bool("inventory-ansible", false, "Set the inventory format to Ansible")
_ = scanCmd.Flags().MarkDeprecated("inventory-ansible", "use --inventory-format-ansible")
_ = scanCmd.Flags().MarkHidden("inventory-ansible")

_ = scanCmd.Flags().Bool("inventory-format-domainlist", false, "Set the inventory format to domain list.")
_ = scanCmd.Flags().Bool("inventory-format-domainlist", false, "Set the inventory format to domain list")
// "inventory-domainlist" is deprecated, use "inventory-format-domainlist" instead
_ = scanCmd.Flags().Bool("inventory-domainlist", false, "Set the inventory format to domain list.")
_ = scanCmd.Flags().Bool("inventory-domainlist", false, "Set the inventory format to domain list")
_ = scanCmd.Flags().MarkDeprecated("inventory-domainlist", "use --inventory-format-domainlist")
_ = scanCmd.Flags().MarkHidden("inventory-domainlist")

// bundles, packs & incognito mode
_ = scanCmd.Flags().Bool("incognito", false, "Run in incognito mode. Do not report scan results to Mondoo Platform.")
_ = scanCmd.Flags().StringSlice("querypack", nil, "Set the query packs to execute. This requires `querypack-bundle`. You can specify multiple UIDs.")
_ = scanCmd.Flags().Bool("incognito", false, "Run in incognito mode. Do not report scan results to Mondoo Platform")
_ = scanCmd.Flags().StringSlice("querypack", nil, "Set the query packs to execute. This requires `querypack-bundle`. You can specify multiple UIDs")
_ = scanCmd.Flags().StringSliceP("querypack-bundle", "f", nil, "Path to local query pack file")
// flag completion command
_ = scanCmd.RegisterFlagCompletionFunc("querypack", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return getQueryPacksForCompletion(), cobra.ShellCompDirectiveDefault
})
_ = scanCmd.Flags().String("asset-name", "", "User-override for the asset name")
_ = scanCmd.Flags().StringToString("annotation", nil, "Add an annotation to the asset.") // user-added, editable
_ = scanCmd.Flags().StringToString("annotation", nil, "Add an annotation to the asset") // user-added, editable
_ = scanCmd.Flags().StringToString("props", nil, "Custom values for properties")
_ = scanCmd.Flags().String("trace-id", "", "Trace identifier")

// v6 should make detect-cicd and category flag public
_ = scanCmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If detected, set the asset category to 'cicd'.")
_ = scanCmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.")
_ = scanCmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If detected, set the asset category to 'cicd'")
_ = scanCmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'")
_ = scanCmd.Flags().MarkHidden("category")
}

Expand Down
4 changes: 2 additions & 2 deletions apps/cnquery/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
func init() {
rootCmd.AddCommand(shellCmd)

shellCmd.Flags().StringP("command", "c", "", "MQL query to executed in the shell.")
shellCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID.")
shellCmd.Flags().StringP("command", "c", "", "MQL query to executed in the shell")
shellCmd.Flags().String("platform-id", "", "Select a specific target asset by providing its platform ID")
shellCmd.Flags().StringToString("annotations", nil, "Specify annotations for this run")
_ = shellCmd.Flags().MarkHidden("annotations")
}
Expand Down
10 changes: 5 additions & 5 deletions providers/atlassian/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,31 @@ For SCIM, you receive both the token and the directory-id from Atlassian when yo
Long: "admin-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide Atlassian admin API token (used for Atlassian admin).",
Desc: "Atlassian admin API token (used for Atlassian admin)",
},
{
Long: "host",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide Atlassian hostname (e.g. https://example.atlassian.net).",
Desc: "Atlassian hostname (e.g. https://example.atlassian.net)",
},
{
Long: "user",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide Atlassian user name (e.g. [email protected]).",
Desc: "Atlassian user name (e.g. [email protected])",
},
{
Long: "user-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide Atlassian user API token (used for Jira / Confluence).",
Desc: "Atlassian user API token (used for Jira / Confluence)",
},
{
Long: "scim-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide Atlassian SCIM API token (used for SCIM).",
Desc: "Atlassian SCIM API token (used for SCIM)",
},
},
},
Expand Down
16 changes: 8 additions & 8 deletions providers/azure/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,56 +46,56 @@ var Config = plugin.Provider{
Long: "tenant-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Directory (tenant) ID of the service principal.",
Desc: "Directory (tenant) ID of the service principal",
Option: plugin.FlagOption_Hidden,
},
{
Long: "client-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Application (client) ID of the service principal.",
Desc: "Application (client) ID of the service principal",
Option: plugin.FlagOption_Hidden,
},
{
Long: "client-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Secret for application.",
Desc: "Secret for application",
Option: plugin.FlagOption_Hidden,
},
{
Long: "certificate-path",
Type: plugin.FlagType_String,
Default: "",
Desc: "Path (in PKCS #12/PFX or PEM format) to the authentication certificate.",
Desc: "Path (in PKCS #12/PFX or PEM format) to the authentication certificate",
Option: plugin.FlagOption_Hidden,
},
{
Long: "certificate-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Passphrase for the authentication certificate file.",
Desc: "Passphrase for the authentication certificate file",
Option: plugin.FlagOption_Hidden,
},
{
Long: "subscription",
Type: plugin.FlagType_String,
Default: "",
Desc: "ID of the Azure subscription to scan.",
Desc: "ID of the Azure subscription to scan",
Option: plugin.FlagOption_Hidden,
},
{
Long: "subscriptions",
Type: plugin.FlagType_String,
Default: "",
Desc: "Comma-separated list of Azure subscriptions to include.",
Desc: "Comma-separated list of Azure subscriptions to include",
Option: plugin.FlagOption_Hidden,
},
{
Long: "subscriptions-exclude",
Type: plugin.FlagType_String,
Default: "",
Desc: "Comma-separated list of Azure subscriptions to exclude.",
Desc: "Comma-separated list of Azure subscriptions to exclude",
Option: plugin.FlagOption_Hidden,
},
},
Expand Down
4 changes: 2 additions & 2 deletions providers/equinix/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Config = plugin.Provider{
Name: "equinix",
Use: "equinix [org <org id>] [project <project-id>] [--token <token>]",
Short: "an Equinix Metal organization",
Long: `equinix is designed for querying resources within a specified
Long: `equinix is designed for querying resources within a specified
project or organization on the Equinix Metal platform.
Available Commands:
Expand All @@ -35,7 +35,7 @@ If the PACKET_AUTH_TOKEN environment variable is set, the token flag is not requ
Long: "token",
Type: plugin.FlagType_String,
Default: "",
Desc: " Specifies the Equinix API token for authenticating the user",
Desc: "The Equinix API token for authenticating the user",
},
},
},
Expand Down
14 changes: 7 additions & 7 deletions providers/github/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,43 @@ var Config = plugin.Provider{
Long: "token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide GitHub personal access token.",
Desc: "GitHub personal access token",
},
{
Long: "repos-exclude",
Type: plugin.FlagType_String,
Default: "",
Desc: "Filter out repositories matching these names.",
Desc: "Filter out repositories matching these names",
},
{
Long: "repos",
Type: plugin.FlagType_String,
Default: "",
Desc: "Only include repositories with matching names.",
Desc: "Only include repositories with matching names",
},
{
Long: "app-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "GitHub App ID.",
Desc: "GitHub App ID",
},
{
Long: "app-installation-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "GitHub App installation ID.",
Desc: "GitHub App installation ID",
},
{
Long: "app-private-key",
Type: plugin.FlagType_String,
Default: "",
Desc: "GitHub App private key file path.",
Desc: "GitHub App private key file path",
},
{
Long: "enterprise-url",
Type: plugin.FlagType_String,
Default: "",
Desc: "GitHub Enterprise URL.",
Desc: "GitHub Enterprise URL",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion providers/gitlab/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var Config = plugin.Provider{
Long: "token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Provide GitLab personal access token.",
Desc: "GitLab personal access token",
},
{
Long: "group",
Expand Down
4 changes: 2 additions & 2 deletions providers/ipmi/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ firmware (BIOS or UEFI), and operating system.
Long: "ask-pass",
Type: plugin.FlagType_Bool,
Default: "false",
Desc: "Prompt for connection password.",
Desc: "Prompt for connection password",
ConfigEntry: "-",
},
{
Long: "password",
Short: "p",
Type: plugin.FlagType_String,
Default: "",
Desc: "Set the connection password for IPMI connection.",
Desc: "Set the connection password for IPMI connection",
Option: plugin.FlagOption_Password,
ConfigEntry: "-",
},
Expand Down
6 changes: 3 additions & 3 deletions providers/k8s/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ var Config = plugin.Provider{
Long: "context",
Type: plugin.FlagType_String,
Default: "",
Desc: "Target a Kubernetes context.",
Desc: "Target a Kubernetes context",
},
{
Long: "namespaces-exclude",
Type: plugin.FlagType_String,
Default: "",
Desc: "Filter out Kubernetes objects in the matching namespaces.",
Desc: "Filter out Kubernetes objects in the matching namespaces",
},
{
Long: "namespaces",
Type: plugin.FlagType_String,
Default: "",
Desc: "Only include Kubernetes object in the matching namespaces.",
Desc: "Only include Kubernetes object in the matching namespaces",
},
{
Long: "container-proxy",
Expand Down
14 changes: 7 additions & 7 deletions providers/ms365/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,43 @@ var Config = plugin.Provider{
Long: "tenant-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Directory (tenant) ID of the service principal.",
Desc: "Directory (tenant) ID of the service principal",
},
{
Long: "client-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Application (client) ID of the service principal.",
Desc: "Application (client) ID of the service principal",
},
{
Long: "organization",
Type: plugin.FlagType_String,
Default: "",
Desc: "The organization to be scanned.",
Desc: "The organization to be scanned",
},
{
Long: "sharepoint-url",
Type: plugin.FlagType_String,
Default: "",
Desc: "The sharepoint URL to be scanned.",
Desc: "The sharepoint URL to be scanned",
},
{
Long: "client-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Secret for application.",
Desc: "Secret for application",
},
{
Long: "certificate-path",
Type: plugin.FlagType_String,
Default: "",
Desc: "Path (in PKCS #12/PFX or PEM format) to the authentication certificate.",
Desc: "Path (in PKCS #12/PFX or PEM format) to the authentication certificate",
},
{
Long: "certificate-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Passphrase for the authentication certificate file.",
Desc: "Passphrase for the authentication certificate file",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion providers/network/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var Config = plugin.Provider{
Long: "insecure",
Type: plugin.FlagType_Bool,
Default: "",
Desc: "Disable TLS/SSL verification.",
Desc: "Disable TLS/SSL verification",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion providers/okta/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var Config = plugin.Provider{
Long: "organization",
Type: plugin.FlagType_String,
Default: "",
Desc: "Specify the Okta organization to scan",
Desc: "The Okta organization to scan",
},
{
Long: "token",
Expand Down
Loading

0 comments on commit fedb572

Please sign in to comment.