https://github.com/tamdilip/env-gen
Minimal node utility to scan all process.env references in a node project
https://github.com/tamdilip/env-gen
cli dotenv environment-variables nodejs npx utility
Last synced: about 2 months ago
JSON representation
Minimal node utility to scan all process.env references in a node project
- Host: GitHub
- URL: https://github.com/tamdilip/env-gen
- Owner: tamdilip
- Created: 2022-05-07T10:33:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-23T20:01:13.000Z (almost 3 years ago)
- Last Synced: 2025-08-09T05:38:57.291Z (11 months ago)
- Topics: cli, dotenv, environment-variables, nodejs, npx, utility
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/env-gen
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# env-gen [](https://github.com/tamdilip/env-gen/actions/workflows/npm-publish.yml)
`.env` file generator by extracting all environment variables referenced in node js project through `process.env.*`
# usage
```bash
$ cd
$ npx env-gen
```
## Optional
### Silent mode
Append `--silent` to the main command `npx env-gen` to simply scan and generate `.env` file without prompting any inputs and displaying log traces.
```bash
$ npx env-gen --silent
```
### Path exclusion
Place `env-gen-config.js` under the same path from where you are executing `npx env-gen` to exclude paths from scanning in the below format.
```javascript
module.exports = {
exclude: ['/node_modules', '/coverage'] //default
};
```