Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iddm/dotenv
Common Lisp dotenv library
https://github.com/iddm/dotenv
common-lisp dotenv env environment lisp
Last synced: about 2 months ago
JSON representation
Common Lisp dotenv library
- Host: GitHub
- URL: https://github.com/iddm/dotenv
- Owner: iddm
- License: mit
- Created: 2018-03-22T11:03:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T07:31:59.000Z (almost 7 years ago)
- Last Synced: 2024-05-02T04:54:42.452Z (8 months ago)
- Topics: common-lisp, dotenv, env, environment, lisp
- Language: Common Lisp
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotenv
This is a project to parse dotenv (`.env`) files.
You already know what that means, don't you?## Description
This project provides all the necessary functions for
interaction with **dotenv** files (usually it is `.env`).### API
#### dot-env-load!
The function's prototype is:```lisp
(defun dot-env-load! (&optional names)
```It reads the **dotenv** files provided in the optional list or
reads only `.env` file is the list is empty or was not provided.**Usage:**
```lisp
;; Loads the `.env` only because the arguments list is empty.
(dot-env-load!)
;; Loads the provided files.
(dot-env-load! '(".env" "test.env"))
```#### dot-env
The function's prototype is:```lisp
(defun dot-env (name &optional default)
```It reads the value of a variable **dotenv** with passed name.
If there is no such a variable there, it reads the process environment.
If there is nothing too, it returns `default` or `NIL`.**Usage:**
```lisp
(dot-env-load!)
(dot-env "HOME")
```## License
[MIT license](./LICENSE)