1
0
Fork
You've already forked gate
0
Structured password manager
  • Shell 100%
Find a file
2026年03月10日 22:09:36 +00:00
source Added diff preview when making changes 2026年03月10日 22:09:36 +00:00
LICENSE Initial commit 2025年04月30日 11:08:20 +02:00
README.md Improved README.md 2025年04月30日 12:00:13 +02:00

This project is a minimal password manager written in POSIX shell that uses age and jq for encryption and editing. To run it, use the following syntax:

gate [save] filter [length]

When being ran for the first time, the script will ask for a password which will be used to encrypt/decrypt the vault. Choose a strong password, as it can only be changed manually after initial setup (this is to prevent age's secret key from ever being stored in a temporary file). To insert data into the vault, jq filters can be used:

gate '.codeberg.pass = "p455w0rd"'

This command doesn't actually store the data, it only displays the effects of the filter. To save the data, a filter has to be prefixed with the save option. Random passwords can be generated by following the command with a number which describes the desired length of the password. To use a generated password inside a filter, use the $pass variable (the length option has to be specified, otherwise $pass will be empty).

gate save '.codeberg.pass = $pass' 32

It is advised to always test filters first because some could overwrite the entire vault. Filters to view passwords should never be used with the save option:

gate .codeberg.pass

Since the vault is an encrypted json file, it can be structured in any way. For example:

{
 "email": {
 "address": [
 "mail1@example.com",
 "mail2@example.com",
 "mail3@example.com"
 ],
 "pass": "p455w0rd"
 },
 "codeberg": {
 "user": "oxetene",
 "pass": "dr0w554p"
 }
}