The keeper of software lore, aids thee in taming the ever-shifting winds of secrets arrangement
I usually am in a situation where I have to deal with multiple versions of configuration files with secrets (e.g. .env
or appsettings.development.json
) when I develop or debug an application.
To solve this problem I usually use comments when the configuration file format supports it or I hold multiple copies in another place.
This tool enables the developer to store multiple versions of a configuration file. It is designed to be used during development (and debuging).
The different versions of the configuration file are stored under a .jorge
directory at the project root. Jorge replaces the configuration file that the project is using with one that is stored under .jorge
when you want to use it.
- You already have a project with a configuration file. Let's say
.env
- Initialize a jorge project
jorge init --config .env
- Now you want to test your project with different, but temporary, configuration (e.g. to use another backend server or email service)
- You create a different jorge environment
jorge use -n staging-server
orjorge use -n staging-services
etc - You do you and your testing was finished, so you want to return to the development settings
- You change back to original environment
jorge use default
(note that the envdefault
is created with thejorge init
command)
Because of a badass jorge who knew how to protect secrets
go get
make build
make install
- requiressudo
- Use it as a cli tool
jorge --version
docker build -t jorge .
- Use it as container
docker run --rm -v "$PWD":/root/projectRoot jorge jorge --version
Create a project
jorge init
Fill the path your project configuration file
See the available environments
jorge ls
Create and use an environment
jorge use -n test01
Change environment
jorge use default
Commit your changes to the current env
jorge commit
Restore the changes from a stored version to the current env
jorge restore
Manages different versions of a configuration file
Usage:
jorge [command]
Available Commands:
commit Stores the current config file
completion Generate the autocompletion script for the specified shell
help Help about any command
init Initializes a jorge environment
ls List the available environments
restore Restores the current configuration file with the copy that is saved in the .jorge dir
use Selects or creates an environment
Flags:
-d, --debug Prints debug messages
-h, --help help for jorge
-v, --version version for jorge