Read .env files into your environment. Pair with `uiop:getenv`
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
t Unit tests + with-open-file Mar 29, 2018
LICENSE.md
Makefile
README.md license Mar 29, 2018
cl-env.asd Unit tests + with-open-file Mar 29, 2018
cl-env.lisp Unit tests + with-open-file Mar 29, 2018
package.lisp

README.md

cl-env

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.

Calling (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.

Usage

(cl-env:init) ;; load .env for the same directory as current directory.

or

(cl-env:init #p"~/Projects/your-cool-project/.env") ;; load .env from a specific directory.

or

(cl-env:init (merge-pathnames (truename ".") ".env")) ;; load .dev.env from current directory.

Runnings tests

  1. Clone this repo

  2. Run make test