Local command line password manager with an optional TUI and support for encrypted remote database sources.
Install Python 3.12.
curl -L https://github.com/schwarzbox/Vault/archive/master.zip --output Vault.zip
unzip Vault.zip && rm Vault.zip
cd Vault-master
python3 -m venv venv-shiv
. venv-shiv/bin/activate
pip3 install shiv
shiv -c vault -o vault --preamble preamble.py .
deactivate
rm -rf venv-shivMove vault to /usr/local/bin.
sudo mv vault /usr/local/binThe installation script requires Bash.
curl -L 'https://github.com/schwarzbox/Vault/archive/master.zip' --output Vault.zip
unzip Vault.zip
cd Vault-master
chmod +x install.sh
source ./install.shVerify the installation.
# show help
vault -h
# show version
vault --version
# show info
vault --infoSign up with a login and password.
vault av@example.com -upSign in with the login.
vault av@example.com -inThe -in flag can be omitted.
vault av@example.comThe same login can be used with a different password to create a different vault.
Prepare JSON with your sensitive data. You can use emojis in titles.
Use the example below or sample.json to test the password manager.
sample.json
{
"💌 email": {
"login": "av@example.com",
"password": "1234"
},
"☁️ aws": {
"login": "av@example.com",
"password": "5678"
},
"🧰 database": {
"django-local": "DATABASE_NAME=MYDB\nDATABASE_USER=postgres\nDATABASE_PASSWORD=''\nDATABASE_HOST=127.0.0.1\nDATABASE_PORT=5432\nDATABASE_CONN_MAX_AGE=600"
},
"personal": {
"WIFI-HOME": "home"
}
}Load sample.json using the command line or the TUI after signing in.
vault av@example.com --load sample.jsonDump decrypted data from the source vault to JSON.
--dump writes decrypted vault data to a JSON file. Keep the file secure and remove it when it is no longer needed.
vault av@example.com --dumpRemove the vault from the local database.
vault av@example.com -rmFind the local database directory.
vault --findInternally, Vault uses the Python package appdirs to determine where to save the local encrypted database. On macOS, the default location is: ~/Library/Application Support/VaultDB
Vault uses a local database by default. The --source option can be used to provide a different local or remote database for the current session.
Remote sources are read-only. Vault does not modify remote databases.
The source database can be stored locally or at an HTTP(S) URL.
Upload the encrypted database to GitHub or another remote location.
Load it using the --source option.
vault av@example.com --source 'https://raw.githubusercontent.com/MYGIT/MYREPO/main/vault_data'For a private GitHub repository, provide a token with the source URL.
vault av@example.com --source 'https://raw.githubusercontent.com/MYGIT/MYREPO/main/vault_data?token=TOKEN'Store the encrypted database in an unlisted gist.
vault av@example.com --source 'https://gist.githubusercontent.com/MYGIT/1234/raw/1234/vault_data'The database contains encrypted data. The correct login and password are still required to decrypt the vault.
Switch to a remote source at runtime using the TUI.
Use the TUI to manage the vault.
Add, update, and clear data in the local vault.
Get data from the source vault.
vault av@example.com -g personal WIFI-HOMEPipe the result to another command.
vault av@example.com -g personal WIFI-HOME | wc -cList all groups and keys.
vault av@example.com -lAdd data to the local vault.
vault av@example.com -a personal WIFI-WORK workUpdate a group name in the local vault.
vault av@example.com -u personalThe default value for the second argument is Vault.
vault av@example.com -u Vault privateUpdate a key name only.
vault av@example.com -u private private WIFI-WORK WIFI-OFFICEUpdate a value using five arguments.
vault av@example.com -u private private WIFI-OFFICE WIFI-OFFICE officeClear data from the local vault.
vault av@example.com -c private WIFI-OFFICEErase all data from the local vault.
vault av@example.com -eVault uses Fernet for authenticated symmetric encryption and Argon2id for key derivation.
The database is a JSON file containing encrypted vault identifiers and encrypted vault data.
The encryption process works as follows:
- Vault normalizes the login using Unicode NFC normalization.
- The normalized login is UTF-8 encoded and used as a deterministic salt for Argon2id.
- Argon2id derives a 32-byte key from the password and login-derived salt.
- The derived key is encoded using URL-safe Base64 and used as a Fernet key.
- During sign-up, Vault encrypts the vault identifier using the derived Fernet key.
- Vault encrypts every group name, key, and value before storing them in the database.
- During sign-in, Vault derives the same key from the provided login and password.
- Vault attempts to decrypt the vault identifiers stored in the database.
- Sign-in succeeds when the appropriate vault identifier can be successfully decrypted.
The current key derivation uses:
algorithm: Argon2id
memory cost: 16384 KiB (16 MiB)
time cost: 3
parallelism: 4
key length: 32 bytes
salt: normalized login encoded as UTF-8
Vault never stores plaintext password.
There is no password-recovery mechanism. Vault cannot recover password or decrypt the encrypted vault data without the correct password.
Design/Art/Code: Aliaksandr Veledzimovich
Engine: Textual License




