fleet/cmd/fleetctl/fleetctl.go
Zachary Wasserman 6dbc3bc77a
Implement fleetctl goquery (#2186)
- Update fleet APIs to support necessary operations in goquery
- Implement support for goquery in fleetctl
2020-01-23 21:27:20 -08:00

58 lines
1.0 KiB
Go

package main
import (
"math/rand"
"time"
"github.com/kolide/kit/version"
"github.com/urfave/cli"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
func main() {
app := cli.NewApp()
app.Name = "fleetctl"
app.Usage = "CLI for operating Kolide Fleet"
app.Version = version.Version().Version
cli.VersionPrinter = func(c *cli.Context) {
version.PrintFull()
}
app.Commands = []cli.Command{
applyCommand(),
deleteCommand(),
setupCommand(),
loginCommand(),
logoutCommand(),
queryCommand(),
cli.Command{
Name: "get",
Usage: "Get/list resources",
Subcommands: []cli.Command{
getQueriesCommand(),
getPacksCommand(),
getLabelsCommand(),
getOptionsCommand(),
getHostsCommand(),
getEnrollSecretCommand(),
getAppConfigCommand(),
},
},
cli.Command{
Name: "config",
Usage: "Modify how and which Fleet server to connect to",
Subcommands: []cli.Command{
configSetCommand(),
configGetCommand(),
},
},
convertCommand(),
goqueryCommand(),
}
app.RunAndExitOnError()
}