{"repo":"ko1nksm/shdotenv","free":true,"listed":false,"github":"https://github.com/ko1nksm/shdotenv","clone":"git clone https://github.com/ko1nksm/shdotenv.git","description":"dotenv for shells with support for POSIX-compliant and multiple .env file syntax","language":"Shell","stars":321,"topics":["dotenv","posix","shell","bash","ksh","zsh","fish"],"license":"MIT","category":"cli-tools","readme_excerpt":"shdotenv dotenv for shells with support for POSIX-compliant and multiple .env file syntax Project Status : Almost complete. Major features have been implemented and v1.0.0 will be released in the near future. Quoting [bkeepers/dotenv][dotenv]: Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. [dotenv]: https://github.com/bkeepers/dotenv Why not use source or export ? It is not safe. There is no formal specification for the .env file syntax, and different languages, libraries, and tools use different syntaxes. If you load a .env file syntax that is incompatible with the POSIX shell syntax, you will get unexpected results and may even result in the execution of scripts. shdotenv safely loads the syntax of .env files that are compatible with POSIX shell syntax. There is no possibility that the script will be executed. And also, for interoperability, .env files with other syntaxes are supported whenever possible. The goals of this project 1. Provide language-independent CLI utilities 2. Provide a library that can safely load .env file from shell scripts 3. Define POSIX shell compatible .env file syntax specification 4. Support for .env file syntax dialects for interoperation Requirements shdotenv is a single file shell script with embedded awk ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ko1nksm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ko1nksm/shdotenv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}