fleet/cmd/fleetctl/fleetctl.go
Zach Wasserman 4cfcb1b084
Upgrade fleetctl github.com/urfave/cli to v2 (#471)
This is intended to upgrade to the new API without changing fleetctl
functionality.
2021-03-12 16:42:38 -08:00

52 lines
868 B
Go

package main
import (
"math/rand"
"time"
"github.com/kolide/kit/version"
"github.com/urfave/cli/v2"
)
const (
defaultFileMode = 0600
)
func init() {
rand.Seed(time.Now().UnixNano())
}
func main() {
app := cli.NewApp()
app.Name = "fleetctl"
app.Usage = "CLI for operating Fleet"
app.Version = version.Version().Version
cli.VersionPrinter = func(c *cli.Context) {
version.PrintFull()
}
app.Commands = []*cli.Command{
applyCommand(),
deleteCommand(),
setupCommand(),
loginCommand(),
logoutCommand(),
queryCommand(),
getCommand(),
&cli.Command{
Name: "config",
Usage: "Modify Fleet server connection settings",
Subcommands: []*cli.Command{
configSetCommand(),
configGetCommand(),
},
},
convertCommand(),
goqueryCommand(),
userCommand(),
debugCommand(),
previewCommand(),
}
app.RunAndExitOnError()
}