CLI Config
Since Didact CLI is a build once, deploy anywhere application, its behaviors are modified through a simple configuration file. This configuration file can be thought of as a set of runtime environment variables for Didact CLI.
cliconfig.json
To provide important environment variables and app settings for Didact CLI, you need a cliconfig.json file. This is similar to an appsettings.json file that you would find in a standard dotnet project.
cliconfig.json template
A cliconfig.json JSON template file is shown below:
{
"Database": {
"Provider": "<DB_PROVIDER_KEY>",
"ConnectionString": "<DB_CONNECTION_STRING>"
},
"Environment": "<ENVIRONMENT_NAME>",
"LicenseKey": "<LICENSE_KEY>"
}cliconfig.json key matrix
The config keys are shown below in a matrix.
INFO
For simplicity, when referencing these keys through Didact CLI commands, use the exact JSON key reference here such as Database.Provider. It makes the CLI commands slightly ugly, but it avoids unproductive aliasing work on my part for the moment.
| JSON and CLI key name | Key value type | Key value description |
|---|---|---|
Database.Provider | string | The database provider key for your database provider of choice. |
Database.ConnectionString | string | The connection string for the database. |
Environment | string | The name of the default environment that you want to use. |
LicenseKey | string | An API key from Didact Console that unlocks enhanced features. |
