https://github.com/bendavidaaron/pystash
CLI based secret keeper (for fun not audited)
https://github.com/bendavidaaron/pystash
Last synced: 3 months ago
JSON representation
CLI based secret keeper (for fun not audited)
- Host: GitHub
- URL: https://github.com/bendavidaaron/pystash
- Owner: BenDavidAaron
- License: gpl-3.0
- Created: 2023-03-01T18:28:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T19:06:16.000Z (over 2 years ago)
- Last Synced: 2025-01-18T03:28:37.103Z (5 months ago)
- Language: Python
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pystash
CLI based secret keeper (for fun not audited)## Why?
Just for Fun, wanted to try my hand at an encrypted storage service.
Keys are generated from user-supplied passwords, not properly salted,
and _NOT_ secure.
Please use an audited cryptosystem if you have to store bonafide secrets.
Maybe I'll add GPG integration one day and this can be a serious secret keeper.## How?
It's pretty simple:
### Setup
install it:
```
pip[x] install https://github.com/BenDavidAaron/pystash.git
```
specify a storage directory (optional, defaults to `appdirs.user_data_dir()`)
```
export PYSTASH_ROOT=~/.secrets/pystash
```
initalize your store with a password you can remember:
```
pystash init
-> *MY_PASSWORD*
```### Usage:
You can put secrets by name, and you can store secrets from multiple sources:Via shell with `--val`
```
pystash put a_secret --val S3CRE7
```Masked entry with `-v`
```
pystash put a_secret -v
secret: ******
```From env vars with `-e MY_SECRET`
```
export MY_SECRET=S3CRE7
pystash put a_secret -e MY_SECRET
```From files with `-f ./my-secret.txt`
```
echo S3CRE7 > ./my_secret.txt
pystash put a_secret -f ./my_secret.txt
```From system clipboard with `-c`
```
echo S3CRE7 | pbcopy
pystash put a_secret -c
```You can retrieve secrets to multiple destinations as well:
To stdout via `-v`
```
pystash get a_secret -v
```to clipboard via `-c`
```
pystash get a_secret -c
```to a file via `-f`
```
pystash get a_secret -f ./a_secret.txt
```You can delete secrets with a command as well:
```
pystash delete a_secret
```