mirror of
https://github.com/angt/secret
synced 2025-01-31 19:57:34 +01:00
6acaa49202
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
79 lines
2.2 KiB
Markdown
79 lines
2.2 KiB
Markdown
# secret
|
|
|
|
Keep your little secrets, publicly.
|
|
|
|
## Features
|
|
|
|
`secret` is the simplest secret store you can think of:
|
|
|
|
- Requires only one file `~/.secret` that you can share publicly without fear.
|
|
- No configuration. Get back your file and you're done.
|
|
- Secret's name (hostname, mail, login, etc.) are also encrypted.
|
|
- Secret agent only trusts subprocesses. Not all user processes! How nice is that?
|
|
- Supports multiple passphrases. Not super user-friendly but nice to have.
|
|
- Depends only on the [libhydrogen](https://libhydrogen.org/) library.
|
|
- Small, simple and non obfuscated C code. Well, I hope so :)
|
|
|
|
## Build and install
|
|
|
|
$ git clone https://github.com/angt/secret --recursive
|
|
$ cd secret
|
|
$ make
|
|
|
|
Then, as `root`:
|
|
|
|
# make install prefix=/usr
|
|
|
|
Currently, bash completion is not installed.
|
|
Download the file [argz.sh](argz/argz.sh) then:
|
|
|
|
$ . argz.sh
|
|
$ complete -F _argz secret
|
|
|
|
Completion for secrets is only available in a trusted shell. See below.
|
|
|
|
## Commands
|
|
|
|
| Command | Description |
|
|
|--------------------|-----------------------------------------------------|
|
|
| init | Init a secret storage for the user at `~/.secret`. |
|
|
| list | List all secrets for a given passphrase. |
|
|
| add KEY | Add a new secret. |
|
|
| show KEY | Show an existing secret. |
|
|
| change KEY | Change an existing secret. |
|
|
| agent CMD [ARG]... | Run a process in a trusted zone. Typically a shell. |
|
|
|
|
## Examples
|
|
|
|
Initialize secret for the current user:
|
|
|
|
$ secret init
|
|
|
|
Add a new generated secret:
|
|
|
|
$ secret add test
|
|
Password:
|
|
Secret [random]:
|
|
9{6u0ue>5&W2+z#OR:`X<@-#
|
|
|
|
Show the secret:
|
|
|
|
$ secret show test
|
|
Password:
|
|
9{6u0ue>5&W2+z#OR:`X<@-#
|
|
|
|
Start `bash` in a trusted zone:
|
|
|
|
$ secret agent bash
|
|
Password:
|
|
|
|
Now you can play with your little secrets, but only in this shell:
|
|
|
|
$ ./secret show test
|
|
9{6u0ue>5&W2+z#OR:`X<@-#
|
|
|
|
Note that passphrase was not required.
|
|
|
|
---
|
|
For feature requests and bug reports,
|
|
please create an [issue](https://github.com/angt/secret/issues).
|