Skip to content
Load environment variables from .dotenv files or straight from the OS to Caché
Apex OpenEdge ABL
Branch: master
Clone or download
Latest commit ffd7c64 Jul 24, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
cls Fixed mistype Jul 11, 2017
tests Fixed mistype Jul 11, 2017 Added the code Jul 11, 2017
LICENSE Initial commit Jul 11, 2017 Update Jul 24, 2017
dotenv.xml Fixed mistype Jul 11, 2017


Almost every language has dotenv. So why not Caché?

Add the capability of reading environment variables from a .dotenv file or straight from your running OS.


The easiest way is to simply import the dotenv.xml provided.


Quick and easy:

  • If you want to read from your OS use ##class(DotEnv.Parser).FromOS()
  • If you want to read from a file use ##class(DotEnv.Parser).FromPath()

Each method returns an %ArrayOfDataTypes instance populated with your env variables. When using FromPath, existing ones aren't overwritten.

.env files should be composed using the following format:

YOUR_VARIABLE="your value"
WHATEVER="you want, it\'s also \nescaped"


Got some idea? Follow this guide.

If you want to run those tests you must have Port installed since it uses a different mechanism for running them straight from your repository folder.



You can’t perform that action at this time.