The cl-env Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-env Reference Manual

This is the cl-env Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:04:27 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

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


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-env

Author

Evan M Jones (https://evanjon.es/) <me@evanjon.es>

License

MIT

Description

Easily parse .env files. That’s it!

Source

cl-env.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-env.asd

Location

cl-env.asd

Systems

cl-env (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 cl-env/package.lisp

Parent

cl-env (system)

Location

package.lisp

Packages

cl-env


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 cl-env/cl-env.lisp

Dependency

package.lisp (file)

Parent

cl-env (system)

Location

cl-env.lisp

Exported Definitions
Internal Definitions

split (function)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 cl-env

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

split (function)


Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: getenv KEY &key DEFAULT

Small wrapper around (uiop:getenv). :default always you to specify a default variable. If the current environment does not have a value.

Package

cl-env

Source

cl-env.lisp (file)

Function: init &optional FILEPATH

Reads the environment file, splits it up, and injects into current environment.

Package

cl-env

Source

cl-env.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: split SOMESTRING &key DELIM

Simple function, similar to String.prototype.split in JavaScript

Package

cl-env

Source

cl-env.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-env.asd: The cl-env<dot>asd file
cl-env/cl-env.lisp: The cl-env/cl-env<dot>lisp file
cl-env/package.lisp: The cl-env/package<dot>lisp file

F
File, Lisp, cl-env.asd: The cl-env<dot>asd file
File, Lisp, cl-env/cl-env.lisp: The cl-env/cl-env<dot>lisp file
File, Lisp, cl-env/package.lisp: The cl-env/package<dot>lisp file

L
Lisp File, cl-env.asd: The cl-env<dot>asd file
Lisp File, cl-env/cl-env.lisp: The cl-env/cl-env<dot>lisp file
Lisp File, cl-env/package.lisp: The cl-env/package<dot>lisp file

Jump to:   C   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   F   G   I   S  
Index Entry  Section

F
Function, getenv: Exported functions
Function, init: Exported functions
Function, split: Internal functions

G
getenv: Exported functions

I
init: Exported functions

S
split: Internal functions

Jump to:   F   G   I   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-env: The cl-env system
cl-env: The cl-env package

P
Package, cl-env: The cl-env package

S
System, cl-env: The cl-env system

Jump to:   C   P   S