DKAssist is a tool that helps devs to set up a repository with its configs, such as .env
files.
With a simple Assistfile.json
, you can document the env-vars with name, a brief description, and default values,
as well as provide a check-list of other files needed to build the application.
There are three methods for installing dk-assist
Windows users, help us! We couldn't set the releases for Windows :(
dk-assist is available at the Arch User Repository, so you can easily install via yay
yay -S dk-assist-git
First, ensure you have libcrypt.so.1
available in your system.
Then head to releases page, download the latest dk-assist-<OS>-latest.kexe
and store into within your $PATH
.
We suggest you call it dk-assist
, and make sure it is executable :) You can also store it in a project's roots directory,
but then you'll have to call it ./dk-assist
instead of calling it directly.
If you're interested in building it manually,
# build the DKAssist executable
./gradlew build
# copy to your desired directory
cp build/bin/native/releaseExecutable/dk-assist.kexe /path/to/dk-assist
DKAssist relies on Assistfile.json
, in which you define envSample
and requiredFiles
.
With the Assistfile.json
set, we can use dk-assist
to our help:
dk-assist init
will generate a ready-to-useAssistfile.json
with emptyrequiredFiles
andenvSample
dk-assist scaffold
will generate all therequiredFiles
listed, so you can easily fill themdk-assist report
will display the status of your repository regarding the required files, informing which of the files need to be filled yet (and which have already been filled)
Below we present an example of an Assistfile.json
{
"requiredFiles": [
{
"path": "./config/master.key",
"description": "Encryption key for Rails credentials"
},
{
"path": "./.env"
}
],
"envSample": [
{
"name": "DATABASE_CONNECTION_URL"
},
{
"name": "CORS_ENABLED",
"description": "The address(es) enabled by CORS; in case of multiple, separate with ';' (semi-colon) and no spaces, e.g., 'http://something.com;http://other.com'; in case of enabling all, use '*'",
"default": "*"
}
]
}
In this example, the requiredFiles
are a
./config/master.key
: a file Rails projects use for encrypting credentials, and that should not be tracked by VCS./.env
: the definition of the env-vars
In more details, the example Assistfile.json
informs a sample of the .env
file
DATABASE_CONNECTION_URL
which has no description since its very readable and clearCORS_ENABLED
to set the list of hosts that are allowed to request; its default is"*"
As we can see, both requiredFiles
and envSample
elements require a name
, and accept a description
as documentation.
Also, envSample
elements accept a default
value.
Please refer to CONTRIBUTING.md
This project is licensed under the MIT License