package cli import ( "fmt" "github.com/urfave/cli/v2" ) var serverListCommand = &cli.Command{ Name: "list", Aliases: []string{"ls"}, Usage: "List locally-defined servers.", ArgsUsage: emptyArgsUsage, HideHelp: true, } var serverAddCommand = &cli.Command{ Name: "add", Usage: "Add a server, reachable on .", ArgsUsage: " [] []", Description: "[], [] SSH connection details", } var serverNewCommand = &cli.Command{ Name: "new", Usage: "Creates a VPS from a provider in your terminal!", Description: "Use a provider plugin to create an actual new server resource (VPS or otherwise) which can then be used to house a new Co-op Cloud installation.", ArgsUsage: "", HideHelp: true, } var serverRemoveCommand = &cli.Command{ Name: "remove", Aliases: []string{"rm"}, Usage: "Remove server ", HideHelp: true, } var serverInitCommand = &cli.Command{ Name: "init", Usage: "Set up a server for Docker swarm", HideHelp: true, ArgsUsage: "", Description: `This initialisation explicitly chooses the "single host swarm" mode which uses the default IPv4 address as the advertising address. This can be re-configured later for more advanced use cases. POWERED BY docker swarm init docker network create ...`, } var serverAppsCommand = &cli.Command{ Name: "apps", Usage: `Alias for "abra app ls --server "`, HideHelp: true, ArgsUsage: " ", // Removes "[arguments]" from help. Empty str's are ignored Flags: []cli.Flag{ &cli.BoolFlag{ Name: "status", Value: false, }, }, } // Reminder: The list commands are in is the order they appear in the help menu var ServerCommand = &cli.Command{ Name: "server", ArgsUsage: "", Usage: "Interact with the servers hosting your Coop-Cloud apps", HideHelp: true, Subcommands: []*cli.Command{ serverNewCommand, serverInitCommand, serverAddCommand, serverListCommand, serverRemoveCommand, serverAppsCommand, }, Action: func(c *cli.Context) error { fmt.Println("server"); return nil }, }