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 .dekonf directory at the project root. dekonf replaces the configuration file that the project is using with one that is stored under .dekonf when you want to use it.
- You already have a project with a configuration file. Let's say
.env - Initialize a dekonf project
dekonf 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 dekonf environment
dekonf use -n staging-serverordekonf use -n staging-servicesetc - You do you and your testing was finished, so you want to return to the development settings
- You change back to original environment
dekonf use default(note that the envdefaultis created with thedekonf initcommand)
go getmake buildmake install- requiressudo- Use it as a cli tool
dekonf --version
docker build -t dekonf .- Use it as container
docker run --rm -v "$PWD":/root/projectRoot dekonf dekonf --version
Create a project
dekonf init
Fill the path your project configuration file
See the available environments
dekonf ls
Create and use an environment
dekonf use -n test01
Change environment
dekonf use default
Commit your changes to the current env
dekonf commit
Restore the changes from a stored version to the current env
dekonf restore
Manages different versions of a configuration file
Usage:
dekonf [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 dekonf environment
ls List the available environments
restore Restores the current configuration file with the copy that is saved in the .dekonf dir
use Selects or creates an environment
Flags:
-d, --debug Prints debug messages
-h, --help help for dekonf
-v, --version version for dekonf
