Skip to content

Commit

Permalink
Merge pull request #14 from kaytu-io/fix/update-command-description
Browse files Browse the repository at this point in the history
Fix/update command description
  • Loading branch information
ADorigi authored Sep 16, 2024
2 parents 6207f41 + 405126a commit 1f81d32
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 27 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
# checkctl
# checkctl

CLI for opengovernance

## List of Commands

- configure
- get benchmarks
- get compliance-summary-for-benchmark
- get compliance-summary-for-integration
- get controls
- get jobs
- get job-details
- run compliance
- run discovery

13 changes: 7 additions & 6 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ import (
// configureCmd represents the configure command
var configureCmd = &cobra.Command{
Use: "configure",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Short: "Configuration for checkctl",
Long: `Configuration for checkctl
For interactive mode:
checkctl configure
For non-interactive mode:
checktl configure --api-key <<api-key>> --app-endpoint https://path.to.app.endpoint --output json
`,

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
RunE: func(cmd *cobra.Command, args []string) error {

var configuration *config.Configuration
Expand Down
12 changes: 5 additions & 7 deletions cmd/get/benchmarks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import (
// benchmarksCmd represents the benchmarks command
var benchmarksCmd = &cobra.Command{
Use: "benchmarks",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Short: "Get information on all benchmarks",
Long: `Get information on all benchmarks
Example usage:
checkctl get benchmarks --page-number 1 --page-size 20 --output json
`,
RunE: func(cmd *cobra.Command, args []string) error {
client := &http.Client{}
configuration, err := config.ReadConfigFile()
Expand Down
12 changes: 5 additions & 7 deletions cmd/get/controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import (
// controlsCmd represents the controls command
var controlsCmd = &cobra.Command{
Use: "controls",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Short: "Get information for all controls",
Long: `Get information for all controls
Example usage:
checkctl get controls --page-number 1 --page-size 20 --output json
`,
RunE: func(cmd *cobra.Command, args []string) error {
client := &http.Client{}
configuration, err := config.ReadConfigFile()
Expand Down
37 changes: 31 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,38 @@ import (
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "checkctl",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:
Short: "CLI for opengovernance",
Long: `CLI for opengovernance
Examples:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Configure checkctl:
checkctl configure
Run Discovery on one account:
checkctl run discovery --integration id_name=account4
Run discovery on all accounts:
checkctl run discovery --integration id_name=".*account.*"
Run Discovery on all accounts with "prod" in name:
checkctl run discovery --integration id_name=".*prod.*"
Run Compliance Benchmark for a given benchmark ID:
checkctl run compliance --benchmark-id aws_audit_manager_control_tower
Run Compliance Benchmark on a list of Integrations:
checkctl run compliance --benchmark-id aws_audit_manager_control_tower --integration id_name="account1" --integration id_name="account2"
Get Compliance Summary for an Integration
go run . get compliance-summary-for-integration --benchmark-id aws_audit_manager_control_tower --integration id_name=account3
Get Compliance Summary for a Benchmark
go run . get compliance-summary-for-benchmark --benchmark-id aws_audit_manager_control_tower
Get details of job with given id and type:
get job-details --job-id 301 --job-type compliance
`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
Expand Down

0 comments on commit 1f81d32

Please sign in to comment.