You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.7 KiB
79 lines
2.7 KiB
# pass-append
|
|
|
|
An extension for [pass](https://www.passwordstore.org/) (the standard Unix password manager) to append a pass-style password and copy it to the clipboard before a `pass insert -m` call.
|
|
|
|
## Motivation
|
|
|
|
`pass generate` is cool. `pass insert -m # <- multiline` is cool. ¿Por qué no los dos? (Why not both?) Well, the answer is that it would be annoying to do in the pass code, I think.
|
|
|
|
## Usage
|
|
|
|
```
|
|
Usage:
|
|
pass append [filename]
|
|
Generates a strong password, copies it to the clipboard, and runs pass insert -m [filename]
|
|
Based on the pass apppend extension, itself based on the pass backup extension.
|
|
pass append help
|
|
Prints this help message.
|
|
pass append version
|
|
Prints the version number.
|
|
|
|
Example: pass append services/amazon
|
|
Generates a strong password, copies it to the clipboard,
|
|
and starts pass insert -m services/amazon
|
|
|
|
|
|
```
|
|
|
|
## Example
|
|
Let's generate a password for this example
|
|
|
|
```
|
|
pass append web/digitalocean
|
|
Copied new password to clipboard:
|
|
Gm,G^98w8e3YZ)Op&pi4v+Q>I
|
|
Enter contents of test/test and press Ctrl+D when finished:
|
|
Gm,G^98w8e3YZ)Op&pi4v+Q>I
|
|
my.email@email-provider.com
|
|
[master 1dd0d0b] Add generated password for test/test.
|
|
```
|
|
|
|
## Installation
|
|
|
|
For installation download and place this bash script file ```apppend.bash``` into
|
|
the passwordstore extension directory specified with ```$PASSWORD_STORE_EXTENSIONS_DIR```.
|
|
By default this is ```~/.password-store/.extensions```.
|
|
```
|
|
$ cp apppend.bash ~/.password-store/.extensions
|
|
```
|
|
Give the file execution permissions:
|
|
```
|
|
$ chmod 700 ~/.password-store/.extensions/apppend.bash
|
|
```
|
|
Set the variable ```PASSWORD_STORE_ENABLE_EXTENSIONS```, to true to enable extensions, e.g., in your `.bashrc`
|
|
```
|
|
$ export PASSWORD_STORE_ENABLE_EXTENSIONS=true
|
|
```
|
|
Download and source the bash completion file ```pass-apppend.bash.completion``` for bash completion.
|
|
```
|
|
$ source ~/.password-store/.bash-completions/pass-apppend.bash.completion
|
|
```
|
|
Type ```pass apppend filename/identifier``` to save your first password using this method, e.g.:
|
|
```
|
|
$ pass apppend web/digitalocean
|
|
```
|
|
|
|
## Requirements
|
|
|
|
- `pass` from [https://www.passwordstore.org/](https://www.passwordstore.org/)
|
|
- `tar` to be installed for zipping and compression.
|
|
|
|
## License
|
|
This work is released under the [GNU GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/gpl-3.0.en.html).
|
|
|
|
## Notes
|
|
|
|
Both files are fairly small: 95 lines (script) and 17 lines (autocompletion) respectively. You can check them yourself quickly. No need to trust anyone.
|
|
|
|
This extension is heavily based on the [pass-backup](https://github.com/8go/pass-backup) extension. Because `pass-backup` is open source, it was easy to take its architecture and use it for a different purpose.
|