{"id":15814333,"url":"https://github.com/stevenvachon/dotenv-prompt","last_synced_at":"2026-04-17T19:01:17.969Z","repository":{"id":54301113,"uuid":"47122560","full_name":"stevenvachon/dotenv-prompt","owner":"stevenvachon","description":"Create and edit .env files via CLI prompts.","archived":false,"fork":false,"pushed_at":"2020-06-01T01:12:18.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-21T04:51:37.632Z","etag":null,"topics":["cli","dotenv","nodejs","prompt","terminal"],"latest_commit_sha":null,"homepage":"","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/stevenvachon.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":"2015-11-30T14:07:20.000Z","updated_at":"2024-03-27T14:27:11.000Z","dependencies_parsed_at":"2022-08-13T11:20:58.868Z","dependency_job_id":null,"html_url":"https://github.com/stevenvachon/dotenv-prompt","commit_stats":null,"previous_names":["mitica/dotenv-prompt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stevenvachon/dotenv-prompt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fdotenv-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fdotenv-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fdotenv-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fdotenv-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenvachon","download_url":"https://codeload.github.com/stevenvachon/dotenv-prompt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenvachon%2Fdotenv-prompt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31941845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cli","dotenv","nodejs","prompt","terminal"],"created_at":"2024-10-05T04:24:14.418Z","updated_at":"2026-04-17T19:01:17.951Z","avatar_url":"https://github.com/stevenvachon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dotenv-prompt [![NPM Version][npm-image]][npm-url] [![Linux Build][travis-image]][travis-url] [![Windows Build][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Dependency Monitor][greenkeeper-image]][greenkeeper-url]\n\n\u003e Create and edit `.env` files via CLI prompts.\n\n\n## Installation\n\n[Node.js](http://nodejs.org) `\u003e= 6` is required. To install, type this at the command line:\n```shell\nnpm install dotenv-prompt\n```\n\n## Usage\n\nA dual file convention is used, consisting of `.env.sample` and `.env`. Both file names and the paths to them can be customized.\n\n`.env.sample` should contain a template of default values for environmental variables. This file should be committed to your project's repository. Here is an example of such a file:\n\n```\nSOME_VAR=alue\n\n# Comment\nANOTHER_VAR=another value\n```\n\n### `dotenvPrompt(envPath=\".env\", envSamplePath=\".env.sample\", varnames=[])`\n\nThis function will read the contents of the file at `envSamplePath` if the file at `envPath` does not exist. Regardless of which is used, each variable name found within will be prompted for a value.\n\nOptionally, you can specify exactly which should be prompted via `varnames`.\n\nWhen all prompts have been answered, a new file will be written (or overwritten) at `envPath`. Any other custom changes made to the pre-existing file will be preserved.\n\n```js\nconst dotenvPrompt = require('dotenv-prompt');\n\ndotenvPrompt().catch(error =\u003e {\n  console.error(error);\n  process.exitCode = 1;\n});\n```\n\n\n[npm-image]: https://img.shields.io/npm/v/dotenv-prompt.svg\n[npm-url]: https://npmjs.org/package/dotenv-prompt\n[travis-image]: https://img.shields.io/travis/stevenvachon/dotenv-prompt.svg?label=linux/osx\n[travis-url]: https://travis-ci.org/stevenvachon/dotenv-prompt\n[appveyor-image]: https://img.shields.io/appveyor/ci/stevenvachon/dotenv-prompt.svg?label=windows\n[appveyor-url]: https://ci.appveyor.com/project/stevenvachon/dotenv-prompt\n[coveralls-image]: https://img.shields.io/coveralls/stevenvachon/dotenv-prompt.svg\n[coveralls-url]: https://coveralls.io/github/stevenvachon/dotenv-prompt\n[greenkeeper-image]: https://badges.greenkeeper.io/stevenvachon/dotenv-prompt.svg\n[greenkeeper-url]: https://greenkeeper.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fdotenv-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenvachon%2Fdotenv-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenvachon%2Fdotenv-prompt/lists"}