{"id":20251755,"url":"https://github.com/osdevisnot/dotenv-flexible","last_synced_at":"2025-03-03T16:41:07.479Z","repository":{"id":57215399,"uuid":"214250839","full_name":"osdevisnot/dotenv-flexible","owner":"osdevisnot","description":"flexible dotenv parser","archived":false,"fork":false,"pushed_at":"2019-10-16T00:45:42.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T11:07:21.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pkg.fyi/dotenv-flexible","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osdevisnot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-10T17:59:36.000Z","updated_at":"2019-10-23T15:31:47.000Z","dependencies_parsed_at":"2022-09-12T11:31:57.568Z","dependency_job_id":null,"html_url":"https://github.com/osdevisnot/dotenv-flexible","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdevisnot%2Fdotenv-flexible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdevisnot%2Fdotenv-flexible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdevisnot%2Fdotenv-flexible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osdevisnot%2Fdotenv-flexible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osdevisnot","download_url":"https://codeload.github.com/osdevisnot/dotenv-flexible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241702442,"owners_count":20005970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T10:12:39.087Z","updated_at":"2025-03-03T16:41:07.452Z","avatar_url":"https://github.com/osdevisnot.png","language":"TypeScript","readme":"# dotenv-flexible\n\n\u003e flexible dotenv parser. Think dotenv + dotenv-expand + env overrides (flexibility)\n\n[![Build Status](https://travis-ci.org/osdevisnot/dotenv-flexible.svg?branch=master)](https://travis-ci.org/osdevisnot/dotenv-flexible) [![Coverage Status](https://coveralls.io/repos/github/osdevisnot/dotenv-flexible/badge.svg?branch=master)](https://coveralls.io/github/osdevisnot/dotenv-flexible?branch=master) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n## Installation\n\n```bash\nyarn add dotenv-flexible\n```\n\n## How it works?\n\n`dotenv-flexible` loads `.env` file into `process.env` with support for environment specific overrides and support for variable expansion/interpolations.\n\nIn your code, load and configure dotenv-flexible\n\n```js\nrequire('dotenv-flexible')();\n```\n\nthen create a `.env` file in project root\n\n```\nPORT=8080\nHOST=something.com\n# optionally add comments to document your options\n```\n\n`process.env` now has values you defined in your `.env` file\n\n## Overrides\n\n### overrides using environment files\n\ncreate a `.env.developement` file in project root with overrides\n\n```\nHOST=localhost\n```\n\n`process.env` now has values from `.env` and your overrides if `process.env.NODE_ENV === development`\n\n### Overrides from command line.\n\nTo override values defined in `.env` and `.env.development`, try passing them from node command line. For example:\n\n```bash\ncross-env HOST=klick.js.org node \u003cscript\u003e.js\n```\n\n`process.env` now has the overrides from command line even if HOST was defined in `.env` or `.env.development`\n\n## Options\n\n### dir\n\n---\n\ndefault: `process.cwd()`\n\npass reference to directory if you would like to store `.env` files in a separate config folder.\n\nNote: the dir is resolved from `process.cwd()`\n\n## Contributing\n\nScaffolded using [`tslib-cli`](https://www.npmjs.com/package/tslib-cli).\n\nRun `yarn` or `npm install` in root folder to setup your project.\n\n### Available Commands:\n\n```bash\nyarn build # builds the package\nyarn test # run tests for the package\nyarn coverage # run tests and generate coverage reports\nyarn pub # publish to NPM\nyarn format # prettier format\nyarn lint # lint pkg files\nyarn setup # clean setup\n```\n\n## License\n\n**`dotenv-flexible`** is licensed under the [MIT License](http://opensource.org/licenses/MIT).\u003cbr\u003e\nDocumentation is licensed under [Creative Common License](http://creativecommons.org/licenses/by/4.0/).\u003cbr\u003e\nCreated with ♥ by [@osdevisnot](https://github.com/osdevisnot) and [all contributors](https://github.com/osdevisnot/dotenv-flexible/graphs/contributors).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosdevisnot%2Fdotenv-flexible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosdevisnot%2Fdotenv-flexible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosdevisnot%2Fdotenv-flexible/lists"}