fleet/cmd/fleetctl/fleetctl.go
Zach Wasserman d621650b78
Initial implementation of agent update management (#516)
This PR contains the initial implementation of the fleetctl updates commands, along with documentation on using this to self-host an agent update server.

Co-authored-by: Noah Talerman <noahtal@umich.edu>
Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
2021-03-26 10:46:51 -07:00

55 lines
950 B
Go

package main
import (
"math/rand"
"time"
eefleetctl "github.com/fleetdm/fleet/ee/fleetctl"
"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(),
eefleetctl.UpdatesCommand(),
}
app.RunAndExitOnError()
}