Skip to content

Commit

Permalink
gopasspwgh-2043: document 'gopass cat' (gopasspw#2051)
Browse files Browse the repository at this point in the history
RELEASE_NOTES=[DOCUMENTATION] document 'gopass cat'

Signed-off-by: Thomas Mantl <thomas.mantl@redgears.net>
  • Loading branch information
TM2500 authored Nov 26, 2021
1 parent ff41d13 commit d289fe6
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docs/commands/cat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# `cat` command

The `cat` command is used to pipe password in and out of STDIN and STDOUT
respectively. As it is intended to be used with binary data, it encodes the
data-stream to store it.

## Synopsis

```bash
$ echo "test" | gopass cat test/new
$ gopass cat test/new
```

## Modes of operation

* Create a new entry with data-stream from STDIN
* Change an existing entry to data-stream from STDIN
* Retrive encoded data from password-store and echo it to STDOUT

Cat is intended to work with binary data, so it accepts any kind of stream from
STDIN. It reads the binary-stream from STDIN and encodes it Base64 and saves it
in the password store encoded, with some metadata about the input-stream and the
used encoding (currently only Base64 supported).

### Example
```
$ echo "234" | gopass cat test/new
$ gopass show -f test/new
Secret: test/new
content-disposition: attachment; filename="STDIN"
content-transfer-encoding: Base64
MjM0Cg==
$ gopass cat test/new
234
```

### Differences to `insert`

In contrast to `insert` it handles any kind of data-stream from STDIN and
encodes it.
Drawback: you can not just simply read the password with `gopass show`.

## Flags

This command has currently no supported flags except the gopass globals.

0 comments on commit d289fe6

Please sign in to comment.