SNES is a command line utility for encrypting and decrypting strings for use in your various applications. Allows for specifying multiple applications and multiple environments in order to encourage you to use different passwords/keys/secrets per application per environment.
This was born out of a need to manage encrypted secrets for about a half dozen different applications, each with 4 environments (Dev, QA, Stage, and Prod).
https://nodejs.org/en/download/
Use a Node Version Manager such as nvm or nodist
nvm use v14.17.3
git clone https://github.com/henrychilvers/SNES.git
npm install
Upon first run, the config file (by default 'snes_config.json') where you settings are stored will be empty, so you'll need to run the "add" command to create your first application/environment setting.
NOTE: Your config values will be stored in plain text, so it is recommended that you do not commit this file to any non-private code repository! Hence the reason that the "snes_config.json" file is listed in the .gitignore file.
snes.js [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
encrypt <app-name> <env> <string-to-encrypt> Encrypt a value for the given application + environment
decrypt <app-name> <env> <string-to-decrypt> Decrypt a value for the given application + environment
list [app-name] [env] List settings for all apps/environments, a specific app/environment, or all for a give app
add [options] <app-name> <env> <key> <iv> Add a setting for the given application + environment
update <app-name> <env> <key> <iv> Update a setting for the given application + environment
delete <app-name> <env> Delete a setting for the given application + environment
help [command] display help for command
npm run test
- Support specifying config file with '-c' option.
- Unit testing with BATS? (https://github.com/bats-core/bats-core)
- Add when no config file
- Add when config file
- Add when app/env already exists and no override
- Add when app/env already exists and override
- Update when app/env exists
- Update when app/env does not exist
- Delete when app/env exists
- Delete when app/env does not exist
- List all for app
- List for single app/env
- List for single app/env does not exist
- Encrypt when app/env exists
- Encrypt when app/env does not exist
- Decrypt when app/env exists
- Decrypt when app/env does not exist
- Interactive inital setup.
- Better logo?
- Add emojis to output results?
Usage is provided under the BSD 3 Claus License. See LICENSE for the full details.