Skip to content

Commit

Permalink
Add description to tell how to use --from-clipboard option
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Dec 13, 2020
1 parent 2bb3509 commit 87286c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ brew install nakabonne/pbgopy/pbgopy
#### RHEL/CentOS

```
rpm -ivh https://github.com/nakabonne/pbgopy/releases/download/v0.2.0/pbgopy_0.2.0_linux_amd64.rpm
rpm -ivh https://github.com/nakabonne/pbgopy/releases/download/v0.2.1/pbgopy_0.2.1_linux_amd64.rpm
```

#### Debian/Ubuntu

```
wget https://github.com/nakabonne/pbgopy/releases/download/v0.2.0/pbgopy_0.2.0_linux_amd64.deb
apt install ./pbgopy_0.2.0_linux_amd64.deb
wget https://github.com/nakabonne/pbgopy/releases/download/v0.2.1/pbgopy_0.2.1_linux_amd64.deb
apt install ./pbgopy_0.2.1_linux_amd64.deb
```

#### Arch Linux
Expand Down Expand Up @@ -76,9 +76,10 @@ export PBGOPY_SERVER=http://host.xz:9090
pbgopy paste >foo.png
```

## Options

### End-to-end encryption
`pbgopy` comes with a built-in ability to encrypt/decrypt with a common key, hence allows you to perform end-to-end encryption without working with external tools.
`pbgopy` comes with a built-in ability to encrypt/decrypt with a common key derived from password. Hence allows you to perform end-to-end encryption without working with external tools.

```bash
pbgopy copy -p your-password <secret.txt
Expand All @@ -90,8 +91,10 @@ Then decrypt with the same password:
pbgopy paste -p your-password
```

Alternatively, the `PBGOPY_PASSWORD_FILE` environment variable is available for automating password entry.

### Authentication
You can perform a minimum of authentication via an HTTP Basic Authentication.
HTTP Basic Authentication is available with `-a` flag.

```bash
pbgopy serve -a user:pass
Expand All @@ -112,6 +115,13 @@ You can set TTL for the cache. Give `0s` for disabling it. Default is `24h`.
pbgopy serve --ttl 10m
```

### From clipboard on your OS
You can put the data stored at the clipboard on your OS into pbgopy server.

```bash
pbgopy copy -c
```

## Inspired By
- [nwtgck/piping-server](https://github.com/nwtgck/piping-server)
- [bradwood/glsnip](https://github.com/bradwood/glsnip)
2 changes: 1 addition & 1 deletion commands/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewCopyCommand(stdout, stderr io.Writer) *cobra.Command {
cmd.Flags().StringVarP(&r.password, "password", "p", "", "Password for encryption/decryption")
cmd.Flags().StringVarP(&r.basicAuth, "basic-auth", "a", "", "Basic authentication, username:password")
cmd.Flags().StringVar(&r.maxBufSize, "max-size", "500mb", "Max data size with unit")
cmd.Flags().BoolVarP(&r.fromClipboard, "from-clipboard", "c", false, "Put the data stored at clipboard into pbgopy server")
cmd.Flags().BoolVarP(&r.fromClipboard, "from-clipboard", "c", false, "Put the data stored at local clipboard into pbgopy server")
return cmd
}

Expand Down

0 comments on commit 87286c2

Please sign in to comment.