cl-env is a project for loading environment variables from .env files into the current environment. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
(cl-env:init) will attempt to load the .env file in the current working directory into your environment (accessible with
(uiop:getenv)). If there is no file nothing will be loaded into your environment.
(cl-env:init) ;; load .env for the same directory as current directory.
(cl-env:init #p"~/Projects/your-cool-project/.env") ;; load .env from a specific directory.
(cl-env:init (merge-pathnames (truename ".") ".env")) ;; load .dev.env from current directory.
Clone this repo