Skip to content

Commit 5eed73f

Browse files
committed
Update README and enhance command documentation
Updated the installation method and added manual installation link to README. Modified example commands in `main.go` and detailed usage in `rsync.go` with additional use cases for better clarity.
1 parent e4afe24 commit 5eed73f

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ shells over a peer-to-peer wireguard connection. It's similar to
1111
1. Automatic peer-to-peer connections over UDP.
1212
1. Endless possibilities; rsync, ssh, etc.
1313

14-
## Basic Usage
15-
16-
Install:
14+
## Install
1715

1816
```bash
19-
go install github.com/coder/wush/cmd/wush@latest
17+
curl -fsSL https://wush.dev/install.sh | sh
2018
```
2119

20+
For a manual installation, see the [latest release](https://github.com/coder/wush/releases/latest).
21+
22+
## Basic Usage
23+
2224
[![asciicast](https://asciinema.org/a/ZrCNiRRkeHUi5Lj3fqC3ovLqi.svg)](https://asciinema.org/a/ZrCNiRRkeHUi5Lj3fqC3ovLqi)
2325

2426
On the host machine:

cmd/wush/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func main() {
2424
Long: fmt.Sprintf(fmtLong, getBuildInfo().version) + formatExamples(
2525
example{
2626
Description: "Start the wush server",
27-
Command: "wush receive",
27+
Command: "wush serve",
2828
},
2929
example{
3030
Description: "Open a shell to the wush host",
@@ -34,6 +34,10 @@ func main() {
3434
Description: "Transfer files to the wush host using rsync",
3535
Command: "wush rsync local-file.txt :/path/to/remote/file",
3636
},
37+
example{
38+
Description: "Copy a single file to the host",
39+
Command: "wush cp local-file.txt",
40+
},
3741
),
3842
Handler: func(i *serpent.Invocation) error {
3943
if showVersion {

cmd/wush/rsync.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,22 @@ func rsyncCmd() *serpent.Command {
2828
Use: "rsync [flags] -- [rsync args]",
2929
Short: "Transfer files over rsync.",
3030
Long: "Runs rsync to transfer files to a " + cliui.Code("wush") + " peer. " +
31-
"Use " + cliui.Code("wush receive") + " on the computer you would like to connect to." +
31+
"Use " + cliui.Code("wush serve") + " on the computer you would like to connect to." +
3232
"\n\n" +
33-
"Example: " + "wush rsync -- --progress --stats -avz --human-readable /local/path :/remote/path",
33+
formatExamples(
34+
example{
35+
Description: "Sync a local file to the remote",
36+
Command: "wush rsync /local/path :/remote/path",
37+
},
38+
example{
39+
Description: "Download a remote file to the local computer",
40+
Command: "wush rsync :/remote/path /local/path",
41+
},
42+
example{
43+
Description: "Add rsync flags",
44+
Command: "wush rsync /local/path :/remote/path -- --progress --stats -avz --human-readable",
45+
},
46+
),
3447
Middleware: serpent.Chain(
3548
initLogger(&verbose, ptr.To(false), logger, &logf),
3649
initAuth(&overlayOpts.authKey, &overlayOpts.clientAuth),

0 commit comments

Comments
 (0)