{"id":16791168,"url":"https://github.com/mrsauravsahu/gen-env-template","last_synced_at":"2025-08-31T14:35:16.670Z","repository":{"id":39990316,"uuid":"363635233","full_name":"mrsauravsahu/gen-env-template","owner":"mrsauravsahu","description":"Generate documentation for your environment variables","archived":false,"fork":false,"pushed_at":"2023-10-19T04:58:51.000Z","size":816,"stargazers_count":14,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T06:46:53.261Z","etag":null,"topics":["dotenv","env","environment-variables","highlighted"],"latest_commit_sha":null,"homepage":"https://npmjs.com/gen-env-template","language":"JavaScript","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/mrsauravsahu.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,"governance":null}},"created_at":"2021-05-02T11:33:13.000Z","updated_at":"2023-09-13T16:53:50.000Z","dependencies_parsed_at":"2023-12-05T16:10:28.496Z","dependency_job_id":"4ab34795-f486-44ce-bf90-649128d6bce5","html_url":"https://github.com/mrsauravsahu/gen-env-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrsauravsahu/gen-env-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Fgen-env-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Fgen-env-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Fgen-env-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Fgen-env-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsauravsahu","download_url":"https://codeload.github.com/mrsauravsahu/gen-env-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsauravsahu%2Fgen-env-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272992056,"owners_count":25027543,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dotenv","env","environment-variables","highlighted"],"created_at":"2024-10-13T08:33:56.372Z","updated_at":"2025-08-31T14:35:16.647Z","avatar_url":"https://github.com/mrsauravsahu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gen-env-template\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/gen-env-template.svg)](https://npmjs.org/package/gen-env-template)\n[![License](https://img.shields.io/npm/l/gen-env-template.svg)](https://github.com/mrsauravsahu/gen-env-template/blob/main/LICENSE)\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat)](#contributors)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nGenerate template `.env.example` file from your `.env` file.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mrsauravsahu\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9134050?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSaurav Sahu\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mrsauravsahu/gen-env-template/commits?author=mrsauravsahu\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://abishekaditya.me\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9787009?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAbishek Aditya\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mrsauravsahu/gen-env-template/issues?q=author%3Aabishekaditya\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/RamPrasadAgarwal\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17383560?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRam Prasad Agarwal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mrsauravsahu/gen-env-template/commits?author=RamPrasadAgarwal\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://linkedin.com/in/tbueschel\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13087421?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTobias Büschel\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mrsauravsahu/gen-env-template/commits?author=tobiasbueschel\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## Why?\n\nA well documented template `.env` file helps set up the app.\n\n## How to use?\n\nThis package exposes both a CLI and an SDK.\n\n### CLI Usage\n\n#### Install the tool\n\n- You can install `gen-env-template` as a devDependency.\n\n```shell\n$ npm i -D gen-env-template\n\n$ pnpm i -D gen-env-template\n\n$ yarn add --dev gen-env-template\n```\n\nYou can now use the command like so:\n\n```sh\n$ ./node_modules/.bin/gen-env-template [path to input .env]=.env [path to output .env]=.env.example\n```\n\n**Usage with npx:**\n\n```sh\n$ npx gen-env-template [path to input .env]=.env [path to output .env]=.env.example\n```\n\n(`genv` is a shorthand command which can be used interchangeably.)\n\nThis will write the output to the path specified.\n\n### SDK Usage\n\nThe main import exposes a function with takes in the string contents of the .env file and returns the template string output\n\n```js\nconst genEnvTemplate = require('gen-env-template')\n\nconst inputString = 'NODE_ENV=development'\n\nconsole.log(genEnvTemplate(inputString))\n\n\u003e\u003e NODE_ENV=\n```\n\n### Licensing \n\nThis project uses the MIT license as explained [here](./LICENSE).\n\n### Contributing \n\nThis project is Open-Source and I'm happy to hear feedback and receive improvements through Issues and PRs. For quick response, I'm the most active on twitter [@mrsauravsahu](https://twitter.com/mrsauravsahu)\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## What's new? 🎉 🥳\n\n- **v2.1.1** - Audit fixes and dependency updates\n- **v2.1.0** - Improv: Ability to read multiline variables\n- **v2.0.7** - Feat: Ability to remove region comments `#region safe`, `#endregion safe`\n- **v2.0.6** - CI: Improvement (Use matrix builds to test on Windows, Linux and Mac)\n- **v2.0.5** - Fix npm audit issues \u0026 bump node version\n- **v2.0.4** - Update npm dependencies\n- **v2.0.3** - Fix @oclif/command not found - move to dependencies\n- **v2.0.2** - Bump all npm package versions\n- **v2.0.1** - NPM audit fixes\n- **v2.0.0** - Add format `-f` switch. Generate template-env or markdown format\n- **v1.0.10** - Preserve `LF` or `CRLF` line endings from the input env file\n- **v1.0.9** - Add `-d` or `--dry-run` switch to output to console\n- **v1.0.8** - Remove whitespaces around key\n- **v1.0.7** - Add safe region to keep sample values\n- **v1.0.6** - Create CLI with OCLIF\n- **v1.0.5** - Add alias command `genv`\n- **v1.0.4** - Use `gen-env-template` through npx or pnpx\n- **v1.0.3** - No usage change. Setup CI/CD\n- **v1.0.2** - Trim bundle by ignoring files in .npmignore\n- **v1.0.0** - Basic template generator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsauravsahu%2Fgen-env-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsauravsahu%2Fgen-env-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsauravsahu%2Fgen-env-template/lists"}