https://github.com/joergi/superexport
sick of exporting everytime again and again the secrets from vault? this is (hopefully) your solution!
https://github.com/joergi/superexport
bash bashrc export exporter hacktoberfest hacktoberfest2024 linux linux-shell secret-management secrets secrets-management vault vault-api vault-cli
Last synced: 5 months ago
JSON representation
sick of exporting everytime again and again the secrets from vault? this is (hopefully) your solution!
- Host: GitHub
- URL: https://github.com/joergi/superexport
- Owner: joergi
- License: gpl-3.0
- Created: 2022-01-21T13:21:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-07T05:04:12.000Z (over 1 year ago)
- Last Synced: 2025-10-09T01:59:57.537Z (9 months ago)
- Topics: bash, bashrc, export, exporter, hacktoberfest, hacktoberfest2024, linux, linux-shell, secret-management, secrets, secrets-management, vault, vault-api, vault-cli
- Language: Shell
- Homepage:
- Size: 104 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SUPEREXPORT - a permanent vault export
Sick of exporting everytime again and again the secrets from vault? this is (hopefully) your solution
## USE at YOUR own RISK ! ! !
### Prerequiries
For this service you need to have the following tools installed:
`vault` Info: [Vault CLI](https://www.vaultproject.io/docs/commands)
`secret-tool` -> if not installed, try `sudo apt install libsecret-tools`
### Prepare .bashrc / zshrc
before you start:
add this to your `.bashrc`or `zshrc`
```bash
alias superexport="bash path/to/this/folder/superexport.sh"
```
also add this line to your `.bashrc`, so the `.secretreader.sh` is read with every new terminal
```bash
source $HOME/.superexport/.secretreader.sh
```
### Run it
normally you would export your secrets like this:
```bash
export MY_KEY=$(vault kv get -field=name-in-vault "companyname/teamname/folder-with-secret")
```
with `superxport` you do it like this:
```bash
superexport MY_KEY name-in-vault companyname/teamname/folder-with-secret a-prefix
```
to see that it worked, YOU HAVE TO OPEN A NEW TERMINAL (else it's not available)
```bash
echo $MY_KEY
```
the idea came while I was using a script from a colleague at work - but I was sick of adding them manually to the script
### Tip: If you run your IDE from your shell, you will have all the exported variables there