Vault is a small and simple CLI tool that encrypt and decrypt plain files into vault-files (.vt
).
The idea behind this tool is to have a CLI utility that can quickly and easily encrypt individual files, allowing users to securely store API tokens, secrets, credentials, or any private data on their own disk.
Are you also just a normal software developer or admin with lots of API keys, encryption keys or other secrets and credentials? Or do you simply have logs or plain text files that you want to send to someone securely? Then I have exactly what you are looking for today!
Hold on tight and take a closer look at this command line interface tool because it might meet your exact needs.
Vault uses asymmetric RSA encryption and symmetric AES-256 encryption to keep your data as secure as possible.
To do this, vault uses private and public key on disk (default: ~/.ssh/id_rsa.pub
) and also asks you for a password.
Currently no elliptic curve support! Just rsa.
For building you need to install go. For that i can recommend the following repo:
git clone [email protected]:udhos/update-golang.git golang-updater
cd golang-updater
sudo ./update-golang.sh
Clone the repo:
git clone https://github.com/NobleMajo/vault.git
cd vault
Build the vault binary from source code:
go build -o bin/vault cmd/main.go
# or npm run build
Run the help command on the binary
./vault
# or npm i -g .
# and then use "vault" anywhere on the machine
Main help output:
Vault is a file encryption and decryption cli tool written in go.
For more help, visit https://github.com/NobleMajo/vault
Usage:
vault [flags]
vault [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
init Create a initial encrypted vault file for default text
lock Locks your plain file into a vault file
passwd Changes the password of your vault file
print Prints the decrypted content of your vault file
temp Temporary unlocks your vault file into a plain file
unlock Unlocks your vault file into a plain file
version Prints version message
Flags:
-h, --help help for vault
-b, --verbose enable verbose mode (VAULT_VERBOSE)
-v, --version prints version
Use "vault [command] --help" for more information about a command.
Vault operations are sub commands defined via the first command line argument.
Create a new locked vault file:
vault init
OR
Add some content to your vault.txt
and lock it:
vim vault.txt
vault lock
Unlock the vault as plain .txt
file:
vault unlock
Unlock the file for 5 seconds as .txt
.
In this time you can open it with an editor.
vault temp
Print the locked content in console:
vault print
To choose a other file then the vault.txt
use the second argument without extensions:
(test
for test.txt
and test.vt
)
vault lock <filename>
vault temp <filename>
vault unlock <filename>
vault init <filename>
vault print <filename>
You can use node.js to easily install and run nodemon or link the binary:
This installs and starts a nodemon file watcher that rebuilds the binary if the sources get changed:
npm i
npm run dev
With global linking you can access your binary in every directory by using vault
:
npm i -g .
Then use can use 'vault' everywhere:
cd ..
vault -h
Contributions to Vault are welcome!
Interested users can refer to the guidelines provided in the CONTRIBUTING.md file to contribute to the project and help improve its functionality and features.
Vault is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.
Vault is provided without warranties.
Users are advised to review the accompanying license for more information on the terms of use and limitations of liability.