All Projects → bevry → envfile

bevry / envfile

Licence: other
Parse and write environment files with Node.js

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to envfile

php-env
A small and fast .env loader for PHP
Stars: ✭ 19 (-54.76%)
Mutual labels:  dotenv, environment-variables, env
exenv
Exenv makes loading environment variables from external sources easy.
Stars: ✭ 35 (-16.67%)
Mutual labels:  dotenv, environment-variables, env
webpack-dotenv-plugin
Use dotenv with webpack.
Stars: ✭ 53 (+26.19%)
Mutual labels:  dotenv, environment-variables, env
ts-dotenv
Strongly-typed environment variables for Node.js
Stars: ✭ 18 (-57.14%)
Mutual labels:  dotenv, environment-variables, env
dotenvy
Speed up your production sites by ditching .env for key/value variable pairs as Apache, Nginx, and shell equivalents
Stars: ✭ 31 (-26.19%)
Mutual labels:  dotenv, environment-variables, env
ini
📝 Go INI config management. support multi file load, data override merge. parse ENV variable, parse variable reference. Dotenv file parse and loader. INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用。DotEnv 解析加载
Stars: ✭ 72 (+71.43%)
Mutual labels:  dotenv, environment-variables, env
checkdotenv
Verify environment variables presence for Node JS.
Stars: ✭ 12 (-71.43%)
Mutual labels:  dotenv, environment-variables, env
dotenv
Load .env files in crystal
Stars: ✭ 16 (-61.9%)
Mutual labels:  dotenv, environment-variables
angular-cli-envvars
Example project for my article "Angular CLI and OS Environment Variables"
Stars: ✭ 56 (+33.33%)
Mutual labels:  dotenv, environment-variables
vite-plugin-environment
Easily expose environment variables in Vite.js
Stars: ✭ 57 (+35.71%)
Mutual labels:  environment-variables, env
envset
Set env vars before running your program, manage environment and secrets.
Stars: ✭ 34 (-19.05%)
Mutual labels:  environment-variables, env
sicher
Sicher is a go module that allows secure storage of encrypted credentials in a version control system.
Stars: ✭ 27 (-35.71%)
Mutual labels:  environment-variables, env
dart environment config
Environment specific config generator for Dart and Flutter applications during CI/CD builds
Stars: ✭ 87 (+107.14%)
Mutual labels:  dotenv, environment-variables
dotenv validator
This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
Stars: ✭ 33 (-21.43%)
Mutual labels:  dotenv, env
env
A lightweight package for loading OS environment variables into structs for Go projects
Stars: ✭ 24 (-42.86%)
Mutual labels:  environment-variables, env
env-dot-prop
♻️ Get, set, or delete nested properties of process.env using a dot path
Stars: ✭ 31 (-26.19%)
Mutual labels:  environment-variables, env
goodconf
Transparently load variables from environment or JSON/YAML file.
Stars: ✭ 80 (+90.48%)
Mutual labels:  environment-variables, env
ngx-env
Easily inject environment variables into your Angular applications
Stars: ✭ 73 (+73.81%)
Mutual labels:  dotenv, environment-variables
gatsby-plugin-dynamic-routes
Creating dynamic routes based on your environment and/or renaming existing routes
Stars: ✭ 14 (-66.67%)
Mutual labels:  environment-variables, env
dotenv.net
A library to read .env files in a .NET Core environment
Stars: ✭ 126 (+200%)
Mutual labels:  dotenv, environment-variables

envfile

Status of the GitHub Workflow: bevry NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Parse and stringify the environment configuration files and format, also known as .env files and dotenv files

What are environment configuration files?

They are files use to configure environments by applications and servers that support them. Generally they look like this:

a=1
b:2
c = 3
d : 4

They are commonly also called envfiles, .env files, and dotenv files.

Usage

Complete API Documentation.

Via the Command Line

Requires a global installation of envfile: npm install -g envfile

# envfile to JSON
echo -e "a=1\nb:2" | envfile env2json > config.json

# JSON to envfile
echo '{"a":1,"b":2}' | envfile json2env > config.env

Via Node.js

// Include envfile
const { parse, stringify } = require('envfile')

// Parse an envfile string
console.log(parse('a=1\nb:2'))

// Stringify a javascript object to an envfile string
console.log(stringify({ a: 1, b: 2 }))

Install

npm

Install Globally

  • Install: npm install --global envfile
  • Executable: envfile

Install Locally

  • Install: npm install --save envfile
  • Executable: npx envfile
  • Import: import * as pkg from ('envfile')
  • Require: const pkg = require('envfile')

Deno

import * as pkg from 'https://unpkg.com/envfile@^6.17.0/edition-deno/index.ts'

Skypack

<script type="module">
    import * as pkg from '//cdn.skypack.dev/envfile@^6.17.0'
</script>

unpkg

<script type="module">
    import * as pkg from '//unpkg.com/envfile@^6.17.0'
</script>

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/[email protected]'
</script>

Editions

This package is published with the following editions:

  • envfile/source/index.ts is TypeScript source code with Import for modules
  • envfile/edition-browsers/index.js is TypeScript compiled against ES2020 for web browsers with Import for modules
  • envfile aliases envfile/edition-es2019/index.js
  • envfile/edition-es2019/index.js is TypeScript compiled against ES2019 for Node.js 10 || 12 || 14 || 16 with Require for modules
  • envfile/edition-es2019-esm/index.js is TypeScript compiled against ES2019 for Node.js 12 || 14 || 16 with Import for modules
  • envfile/edition-deno/index.ts is TypeScript source code made to be compatible with Deno

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].