diff --git a/cmd/wush/cp.go b/cmd/wush/cp.go index 41f1372..349e640 100644 --- a/cmd/wush/cp.go +++ b/cmd/wush/cp.go @@ -133,10 +133,10 @@ func cpCmd() *serpent.Command { ) return &serpent.Command{ Use: "cp ", - Short: "Transfer files.", - Long: "Transfer files to a " + cliui.Code("wush") + " peer.\n" + formatExamples( + Short: "Transfer files to a wush server.", + Long: formatExamples( example{ - Description: "Copy a local file to the remote", + Description: "Copy a local file to the server", Command: "wush cp local-file.txt", }, ), diff --git a/cmd/wush/main.go b/cmd/wush/main.go index cf935a6..90dd767 100644 --- a/cmd/wush/main.go +++ b/cmd/wush/main.go @@ -17,25 +17,25 @@ func main() { var ( showVersion bool - fmtLong = "wush %s - peer-to-peer file transfers and shells\n" + fmtLong = "wush %s - WireGuard-powered peer-to-peer file transfer and shell\n" ) cmd := &serpent.Command{ Use: "wush ", Long: fmt.Sprintf(fmtLong, getBuildInfo().version) + formatExamples( example{ - Description: "Start the wush server", + Description: "Start the wush server to accept incoming connections", Command: "wush serve", }, example{ - Description: "Open a shell to the wush host", + Description: "Open a shell to a wush server", Command: "wush ssh", }, example{ - Description: "Transfer files to the wush host using rsync", + Description: "Transfer files to a wush server with rsync", Command: "wush rsync local-file.txt :/path/to/remote/file", }, example{ - Description: "Copy a single file to the host", + Description: "Copy a single file to a wush server", Command: "wush cp local-file.txt", }, ), diff --git a/cmd/wush/portforward.go b/cmd/wush/portforward.go index 828ea2a..73d1204 100644 --- a/cmd/wush/portforward.go +++ b/cmd/wush/portforward.go @@ -41,26 +41,26 @@ func portForwardCmd() *serpent.Command { ) return &serpent.Command{ Use: "port-forward", - Short: "Forward TCP or UDP ports", - Long: "Redirect data between local ports and ports on the remote " + cliui.Code("wush") + " peer.\n" + formatExamples( + Short: "Forward ports from the wush server.", + Long: formatExamples( example{ - Description: "Port forward a single TCP port from 1234 in the peer to port 5678 on your local machine", + Description: "Forward a single TCP port from 1234 on the server to port 5678 on your local machine", Command: "wush port-forward --tcp 5678:1234", }, example{ - Description: "Port forward a single UDP port from port 9000 to port 9000 on your local machine", + Description: "Forward a single UDP port", Command: "wush port-forward --udp 9000", }, example{ - Description: "Port forward multiple TCP ports and a UDP port", + Description: "Forward multiple TCP ports and a UDP port", Command: "wush port-forward --tcp 8080:8080 --tcp 9000:3000 --udp 5353:53", }, example{ - Description: "Port forward multiple ports (TCP or UDP) in condensed syntax", + Description: "Forward multiple ports (TCP or UDP) in condensed syntax", Command: "wush port-forward --tcp 8080,9000:3000,9090-9092,10000-10002:10010-10012", }, example{ - Description: "Port forward specifying the local address to bind to", + Description: "Forward specifying the local address to bind", Command: "wush port-forward --tcp 1.2.3.4:8080:8080", }, ), diff --git a/cmd/wush/rsync.go b/cmd/wush/rsync.go index 9e876a7..c64a02c 100644 --- a/cmd/wush/rsync.go +++ b/cmd/wush/rsync.go @@ -24,17 +24,16 @@ func rsyncCmd() *serpent.Command { ) return &serpent.Command{ Use: "rsync [flags] -- [rsync args]", - Short: "Transfer files over rsync.", - Long: "Runs rsync to transfer files to a " + cliui.Code("wush") + " peer. " + - "Use " + cliui.Code("wush serve") + " on the computer you would like to connect to." + + Short: "Transfer files with rsync to/from a wush server.", + Long: "Use " + cliui.Code("wush serve") + " on the computer you would like to transfer files to." + "\n\n" + formatExamples( example{ - Description: "Sync a local file to the remote", + Description: "Upload a local file", Command: "wush rsync /local/path :/remote/path", }, example{ - Description: "Download a remote file to the local computer", + Description: "Download a remote file", Command: "wush rsync :/remote/path /local/path", }, example{ diff --git a/cmd/wush/serve.go b/cmd/wush/serve.go index f82dce7..2dc2a92 100644 --- a/cmd/wush/serve.go +++ b/cmd/wush/serve.go @@ -44,10 +44,8 @@ func serveCmd() *serpent.Command { dm = new(tailcfg.DERPMap) ) return &serpent.Command{ - Use: "serve", - Aliases: []string{"host"}, - Short: "Run the wush server.", - Long: "Runs the wush server. Allows other wush CLIs to connect to this computer.", + Use: "serve", + Short: "Run the wush server. Allow wush clients to connect.", Middleware: serpent.Chain( derpMap(&derpmapFi, dm), ), diff --git a/cmd/wush/ssh.go b/cmd/wush/ssh.go index f972c59..8a51e9c 100644 --- a/cmd/wush/ssh.go +++ b/cmd/wush/ssh.go @@ -34,9 +34,8 @@ func sshCmd() *serpent.Command { return &serpent.Command{ Use: "ssh", Aliases: []string{}, - Short: "Open a shell.", - Long: "Opens an SSH connection to a " + cliui.Code("wush") + " peer. " + - "Use " + cliui.Code("wush serve") + " on the computer you would like to connect to.", + Short: "Open a SSH connection to a wush server.", + Long: "Use " + cliui.Code("wush serve") + " on the computer you would like to connect to.", Middleware: serpent.Chain( initLogger(&verbose, &quiet, logger, &logf), initAuth(&overlayOpts.authKey, &overlayOpts.clientAuth), diff --git a/cmd/wush/version.go b/cmd/wush/version.go index 263aace..9632258 100644 --- a/cmd/wush/version.go +++ b/cmd/wush/version.go @@ -10,7 +10,7 @@ import ( func versionCmd() *serpent.Command { cmd := &serpent.Command{ Use: "version", - Short: "Show wush version.", + Short: "Output the wush version.", Handler: func(inv *serpent.Invocation) error { bi := getBuildInfo() fmt.Printf("Wush %s-%s %s\n", bi.version, bi.commitHash[:7], bi.commitTime.Format(time.RFC1123))