docs: short aliases [ci skip]

This commit is contained in:
decentral1se 2021-09-05 01:34:56 +02:00
parent a3a66ef972
commit 317be4cc01
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
19 changed files with 53 additions and 20 deletions

View File

@ -26,6 +26,8 @@ var backupAllServicesFlag = &cli.BoolFlag{
var appBackupCommand = &cli.Command{ var appBackupCommand = &cli.Command{
Name: "backup", Name: "backup",
Usage: "Backup an app",
Aliases: []string{"b"},
Flags: []cli.Flag{backupAllServicesFlag}, Flags: []cli.Flag{backupAllServicesFlag},
ArgsUsage: "<service>", ArgsUsage: "<service>",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {

View File

@ -14,6 +14,8 @@ import (
var appCheckCommand = &cli.Command{ var appCheckCommand = &cli.Command{
Name: "check", Name: "check",
Usage: "Check if app is configured correctly",
Aliases: []string{"c"},
ArgsUsage: "<service>", ArgsUsage: "<service>",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()

View File

@ -13,8 +13,9 @@ import (
) )
var appConfigCommand = &cli.Command{ var appConfigCommand = &cli.Command{
Name: "config", Name: "config",
Usage: "edit app environment config", Aliases: []string{"c"},
Usage: "Edit app config",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -19,8 +19,9 @@ import (
var appCpCommand = &cli.Command{ var appCpCommand = &cli.Command{
Name: "cp", Name: "cp",
Aliases: []string{"c"},
ArgsUsage: "<src> <dst>", ArgsUsage: "<src> <dst>",
Usage: "copy files to/from running service container", Usage: "Copy files to/from a running app service",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -13,8 +13,9 @@ import (
) )
var appDeployCommand = &cli.Command{ var appDeployCommand = &cli.Command{
Name: "deploy", Name: "deploy",
Usage: "Deploy an app", Aliases: []string{"d"},
Usage: "Deploy an app",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -60,8 +60,9 @@ func stackLogs(stackName string, client *dockerClient.Client) {
var appLogsCommand = &cli.Command{ var appLogsCommand = &cli.Command{
Name: "logs", Name: "logs",
Aliases: []string{"l"},
ArgsUsage: "[<service>]", ArgsUsage: "[<service>]",
Usage: "tail app logs", Usage: "Tail app logs",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -67,6 +67,7 @@ on your $PATH.
var appNewCommand = &cli.Command{ var appNewCommand = &cli.Command{
Name: "new", Name: "new",
Usage: "Create a new app", Usage: "Create a new app",
Aliases: []string{"n"},
Description: appNewDescription, Description: appNewDescription,
Flags: []cli.Flag{ Flags: []cli.Flag{
newAppServerFlag, newAppServerFlag,

View File

@ -17,7 +17,9 @@ import (
) )
var appPsCommand = &cli.Command{ var appPsCommand = &cli.Command{
Name: "ps", Name: "ps",
Usage: "Check app status",
Aliases: []string{"p"},
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -29,7 +29,7 @@ var VolumesFlag = &cli.BoolFlag{
var appRemoveCommand = &cli.Command{ var appRemoveCommand = &cli.Command{
Name: "remove", Name: "remove",
Usage: "Remove an already undeployed app", Usage: "Remove an already undeployed app",
Aliases: []string{"rm", "delete"}, Aliases: []string{"rm"},
Flags: []cli.Flag{ Flags: []cli.Flag{
VolumesFlag, VolumesFlag,
internal.ForceFlag, internal.ForceFlag,

View File

@ -26,6 +26,8 @@ var restoreAllServicesFlag = &cli.BoolFlag{
var appRestoreCommand = &cli.Command{ var appRestoreCommand = &cli.Command{
Name: "restore", Name: "restore",
Usage: "Restore an app from a backup",
Aliases: []string{"r"},
Flags: []cli.Flag{restoreAllServicesFlag}, Flags: []cli.Flag{restoreAllServicesFlag},
ArgsUsage: "<service> [<backup file>]", ArgsUsage: "<service> [<backup file>]",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {

View File

@ -4,5 +4,7 @@ import "github.com/urfave/cli/v2"
var appRollbackCommand = &cli.Command{ var appRollbackCommand = &cli.Command{
Name: "rollback", Name: "rollback",
Usage: "Roll an app back to a previous version",
Aliases: []string{"b"},
ArgsUsage: "[<version>]", ArgsUsage: "[<version>]",
} }

View File

@ -36,8 +36,9 @@ var appRunCommand = &cli.Command{
noTTYFlag, noTTYFlag,
userFlag, userFlag,
}, },
Aliases: []string{"r"},
ArgsUsage: "<service> <args>...", ArgsUsage: "<service> <args>...",
Usage: "run a command in a service container", Usage: "Run a command in a service container",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -27,6 +27,7 @@ var allSecretsFlag = &cli.BoolFlag{
var appSecretGenerateCommand = &cli.Command{ var appSecretGenerateCommand = &cli.Command{
Name: "generate", Name: "generate",
Aliases: []string{"g"},
Usage: "Generate secrets", Usage: "Generate secrets",
ArgsUsage: "<secret> <version>", ArgsUsage: "<secret> <version>",
Flags: []cli.Flag{allSecretsFlag, internal.PassFlag}, Flags: []cli.Flag{allSecretsFlag, internal.PassFlag},
@ -85,6 +86,7 @@ var appSecretGenerateCommand = &cli.Command{
var appSecretInsertCommand = &cli.Command{ var appSecretInsertCommand = &cli.Command{
Name: "insert", Name: "insert",
Aliases: []string{"i"},
Usage: "Insert secret", Usage: "Insert secret",
Flags: []cli.Flag{internal.PassFlag}, Flags: []cli.Flag{internal.PassFlag},
ArgsUsage: "<secret> <version> <data>", ArgsUsage: "<secret> <version> <data>",
@ -268,6 +270,7 @@ var appSecretLsCommand = &cli.Command{
var appSecretCommand = &cli.Command{ var appSecretCommand = &cli.Command{
Name: "secret", Name: "secret",
Aliases: []string{"s"},
Usage: "Manage app secrets", Usage: "Manage app secrets",
ArgsUsage: "<command>", ArgsUsage: "<command>",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{

View File

@ -13,8 +13,14 @@ import (
) )
var appUndeployCommand = &cli.Command{ var appUndeployCommand = &cli.Command{
Name: "undeploy", Name: "undeploy",
Usage: "Undeploy an app", 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 { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -42,8 +42,9 @@ func parseVersionLabel(label string) (string, string) {
} }
var appVersionCommand = &cli.Command{ var appVersionCommand = &cli.Command{
Name: "version", Name: "version",
Usage: "show version of all services in app", Aliases: []string{"v"},
Usage: "Show version of all services in app",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
appName := c.Args().First() appName := c.Args().First()
if appName == "" { if appName == "" {

View File

@ -63,7 +63,7 @@ var appVolumeListCommand = &cli.Command{
var appVolumeRemoveCommand = &cli.Command{ var appVolumeRemoveCommand = &cli.Command{
Name: "remove", Name: "remove",
Usage: "remove volume(s) associated with an app", Usage: "remove volume(s) associated with an app",
Aliases: []string{"rm", "delete"}, Aliases: []string{"rm"},
Flags: []cli.Flag{ Flags: []cli.Flag{
internal.ForceFlag, internal.ForceFlag,
}, },
@ -105,7 +105,8 @@ var appVolumeRemoveCommand = &cli.Command{
var appVolumeCommand = &cli.Command{ var appVolumeCommand = &cli.Command{
Name: "volume", Name: "volume",
Usage: "List or remove volumes associated with app", Aliases: []string{"v"},
Usage: "Manage app volumes",
ArgsUsage: "<command>", ArgsUsage: "<command>",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
appVolumeListCommand, appVolumeListCommand,

View File

@ -10,8 +10,9 @@ import (
var serverAddCommand = &cli.Command{ var serverAddCommand = &cli.Command{
Name: "add", Name: "add",
Usage: "Add a new server, reachable on <host>.", Usage: "Add a new server, reachable on <server>.",
ArgsUsage: "<host> [<user>] [<port>]", Aliases: []string{"a"},
ArgsUsage: "<server> [<user>] [<port>]",
Description: "[<user>], [<port>] SSH connection details", Description: "[<user>], [<port>] SSH connection details",
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
argLen := c.Args().Len() argLen := c.Args().Len()

View File

@ -18,6 +18,7 @@ import (
var serverInitCommand = &cli.Command{ var serverInitCommand = &cli.Command{
Name: "init", Name: "init",
Usage: "Initialise server for deploying apps", Usage: "Initialise server for deploying apps",
Aliases: []string{"i"},
HideHelp: true, HideHelp: true,
ArgsUsage: "<server>", ArgsUsage: "<server>",
Description: ` Description: `

View File

@ -10,9 +10,13 @@ import (
) )
var serverRemoveCommand = &cli.Command{ var serverRemoveCommand = &cli.Command{
Name: "remove", Name: "remove",
Aliases: []string{"rm", "delete"}, Aliases: []string{"rm"},
Usage: "Remove a locally-defined server", 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, HideHelp: true,
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
server := c.Args().First() server := c.Args().First()