diff --git a/cli/app/backup.go b/cli/app/backup.go index a8196803..daff4231 100644 --- a/cli/app/backup.go +++ b/cli/app/backup.go @@ -26,6 +26,8 @@ var backupAllServicesFlag = &cli.BoolFlag{ var appBackupCommand = &cli.Command{ Name: "backup", + Usage: "Backup an app", + Aliases: []string{"b"}, Flags: []cli.Flag{backupAllServicesFlag}, ArgsUsage: "", Action: func(c *cli.Context) error { diff --git a/cli/app/check.go b/cli/app/check.go index aa41d2ed..a519a203 100644 --- a/cli/app/check.go +++ b/cli/app/check.go @@ -14,6 +14,8 @@ import ( var appCheckCommand = &cli.Command{ Name: "check", + Usage: "Check if app is configured correctly", + Aliases: []string{"c"}, ArgsUsage: "", Action: func(c *cli.Context) error { appName := c.Args().First() diff --git a/cli/app/config.go b/cli/app/config.go index 91303a46..0a201875 100644 --- a/cli/app/config.go +++ b/cli/app/config.go @@ -13,8 +13,9 @@ import ( ) var appConfigCommand = &cli.Command{ - Name: "config", - Usage: "edit app environment config", + Name: "config", + Aliases: []string{"c"}, + Usage: "Edit app config", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/cp.go b/cli/app/cp.go index 4cc5a57b..33178751 100644 --- a/cli/app/cp.go +++ b/cli/app/cp.go @@ -19,8 +19,9 @@ import ( var appCpCommand = &cli.Command{ Name: "cp", + Aliases: []string{"c"}, ArgsUsage: " ", - Usage: "copy files to/from running service container", + Usage: "Copy files to/from a running app service", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/deploy.go b/cli/app/deploy.go index 332b5e5c..79d22675 100644 --- a/cli/app/deploy.go +++ b/cli/app/deploy.go @@ -13,8 +13,9 @@ import ( ) var appDeployCommand = &cli.Command{ - Name: "deploy", - Usage: "Deploy an app", + Name: "deploy", + Aliases: []string{"d"}, + Usage: "Deploy an app", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/logs.go b/cli/app/logs.go index 50260e6a..0936765e 100644 --- a/cli/app/logs.go +++ b/cli/app/logs.go @@ -60,8 +60,9 @@ func stackLogs(stackName string, client *dockerClient.Client) { var appLogsCommand = &cli.Command{ Name: "logs", + Aliases: []string{"l"}, ArgsUsage: "[]", - Usage: "tail app logs", + Usage: "Tail app logs", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/new.go b/cli/app/new.go index e017d5b7..1132b35f 100644 --- a/cli/app/new.go +++ b/cli/app/new.go @@ -67,6 +67,7 @@ on your $PATH. var appNewCommand = &cli.Command{ Name: "new", Usage: "Create a new app", + Aliases: []string{"n"}, Description: appNewDescription, Flags: []cli.Flag{ newAppServerFlag, diff --git a/cli/app/ps.go b/cli/app/ps.go index f19e05a0..0aace8e6 100644 --- a/cli/app/ps.go +++ b/cli/app/ps.go @@ -17,7 +17,9 @@ import ( ) var appPsCommand = &cli.Command{ - Name: "ps", + Name: "ps", + Usage: "Check app status", + Aliases: []string{"p"}, Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/remove.go b/cli/app/remove.go index 56f6615d..53d6ab7e 100644 --- a/cli/app/remove.go +++ b/cli/app/remove.go @@ -29,7 +29,7 @@ var VolumesFlag = &cli.BoolFlag{ var appRemoveCommand = &cli.Command{ Name: "remove", Usage: "Remove an already undeployed app", - Aliases: []string{"rm", "delete"}, + Aliases: []string{"rm"}, Flags: []cli.Flag{ VolumesFlag, internal.ForceFlag, diff --git a/cli/app/restore.go b/cli/app/restore.go index b98d1680..30a97401 100644 --- a/cli/app/restore.go +++ b/cli/app/restore.go @@ -26,6 +26,8 @@ var restoreAllServicesFlag = &cli.BoolFlag{ var appRestoreCommand = &cli.Command{ Name: "restore", + Usage: "Restore an app from a backup", + Aliases: []string{"r"}, Flags: []cli.Flag{restoreAllServicesFlag}, ArgsUsage: " []", Action: func(c *cli.Context) error { diff --git a/cli/app/rollback.go b/cli/app/rollback.go index 0c21e758..bd7dca09 100644 --- a/cli/app/rollback.go +++ b/cli/app/rollback.go @@ -4,5 +4,7 @@ import "github.com/urfave/cli/v2" var appRollbackCommand = &cli.Command{ Name: "rollback", + Usage: "Roll an app back to a previous version", + Aliases: []string{"b"}, ArgsUsage: "[]", } diff --git a/cli/app/run.go b/cli/app/run.go index 391925de..e37e66d6 100644 --- a/cli/app/run.go +++ b/cli/app/run.go @@ -36,8 +36,9 @@ var appRunCommand = &cli.Command{ noTTYFlag, userFlag, }, + Aliases: []string{"r"}, ArgsUsage: " ...", - Usage: "run a command in a service container", + Usage: "Run a command in a service container", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/secret.go b/cli/app/secret.go index e0cbc943..b9dc2762 100644 --- a/cli/app/secret.go +++ b/cli/app/secret.go @@ -27,6 +27,7 @@ var allSecretsFlag = &cli.BoolFlag{ var appSecretGenerateCommand = &cli.Command{ Name: "generate", + Aliases: []string{"g"}, Usage: "Generate secrets", ArgsUsage: " ", Flags: []cli.Flag{allSecretsFlag, internal.PassFlag}, @@ -85,6 +86,7 @@ var appSecretGenerateCommand = &cli.Command{ var appSecretInsertCommand = &cli.Command{ Name: "insert", + Aliases: []string{"i"}, Usage: "Insert secret", Flags: []cli.Flag{internal.PassFlag}, ArgsUsage: " ", @@ -268,6 +270,7 @@ var appSecretLsCommand = &cli.Command{ var appSecretCommand = &cli.Command{ Name: "secret", + Aliases: []string{"s"}, Usage: "Manage app secrets", ArgsUsage: "", Subcommands: []*cli.Command{ diff --git a/cli/app/undeploy.go b/cli/app/undeploy.go index 844d9ad6..68c041d5 100644 --- a/cli/app/undeploy.go +++ b/cli/app/undeploy.go @@ -13,8 +13,14 @@ import ( ) var appUndeployCommand = &cli.Command{ - Name: "undeploy", - Usage: "Undeploy an app", + Name: "undeploy", + Aliases: []string{"u"}, + Usage: "Undeploy an app", + Description: ` +This does not destroy any of the application data. However, you should remain +vigilant, as your swarm installation will consider any previously attached +volumes as eligiblef or pruning once undeployed. +`, Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/version.go b/cli/app/version.go index f644b1d1..2264f341 100644 --- a/cli/app/version.go +++ b/cli/app/version.go @@ -42,8 +42,9 @@ func parseVersionLabel(label string) (string, string) { } var appVersionCommand = &cli.Command{ - Name: "version", - Usage: "show version of all services in app", + Name: "version", + Aliases: []string{"v"}, + Usage: "Show version of all services in app", Action: func(c *cli.Context) error { appName := c.Args().First() if appName == "" { diff --git a/cli/app/volume.go b/cli/app/volume.go index 17728d48..0aa03098 100644 --- a/cli/app/volume.go +++ b/cli/app/volume.go @@ -63,7 +63,7 @@ var appVolumeListCommand = &cli.Command{ var appVolumeRemoveCommand = &cli.Command{ Name: "remove", Usage: "remove volume(s) associated with an app", - Aliases: []string{"rm", "delete"}, + Aliases: []string{"rm"}, Flags: []cli.Flag{ internal.ForceFlag, }, @@ -105,7 +105,8 @@ var appVolumeRemoveCommand = &cli.Command{ var appVolumeCommand = &cli.Command{ Name: "volume", - Usage: "List or remove volumes associated with app", + Aliases: []string{"v"}, + Usage: "Manage app volumes", ArgsUsage: "", Subcommands: []*cli.Command{ appVolumeListCommand, diff --git a/cli/server/add.go b/cli/server/add.go index 2d0ab7ac..ec1ad54a 100644 --- a/cli/server/add.go +++ b/cli/server/add.go @@ -10,8 +10,9 @@ import ( var serverAddCommand = &cli.Command{ Name: "add", - Usage: "Add a new server, reachable on .", - ArgsUsage: " [] []", + Usage: "Add a new server, reachable on .", + Aliases: []string{"a"}, + ArgsUsage: " [] []", Description: "[], [] SSH connection details", Action: func(c *cli.Context) error { argLen := c.Args().Len() diff --git a/cli/server/init.go b/cli/server/init.go index 9e571149..f54af290 100644 --- a/cli/server/init.go +++ b/cli/server/init.go @@ -18,6 +18,7 @@ import ( var serverInitCommand = &cli.Command{ Name: "init", Usage: "Initialise server for deploying apps", + Aliases: []string{"i"}, HideHelp: true, ArgsUsage: "", Description: ` diff --git a/cli/server/remove.go b/cli/server/remove.go index d1abb6d1..8955d90d 100644 --- a/cli/server/remove.go +++ b/cli/server/remove.go @@ -10,9 +10,13 @@ import ( ) var serverRemoveCommand = &cli.Command{ - Name: "remove", - Aliases: []string{"rm", "delete"}, - Usage: "Remove a locally-defined server", + Name: "remove", + Aliases: []string{"rm"}, + Usage: "Remove a server", + Description: ` +This does not destroy the actual server. It simply removes it from Abra +internal bookkeeping so that it is not managed any more. +`, HideHelp: true, Action: func(c *cli.Context) error { server := c.Args().First()