https://github.com/ajaysinghnp/node-helper
This is the utility module for node js to generate .sample.env file for the projects.
https://github.com/ajaysinghnp/node-helper
dot-env env generator sample-env
Last synced: over 1 year ago
JSON representation
This is the utility module for node js to generate .sample.env file for the projects.
- Host: GitHub
- URL: https://github.com/ajaysinghnp/node-helper
- Owner: ajaysinghnp
- License: mit
- Created: 2023-09-21T09:53:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-26T17:21:09.000Z (almost 3 years ago)
- Last Synced: 2025-03-13T15:17:19.787Z (over 1 year ago)
- Topics: dot-env, env, generator, sample-env
- Language: TypeScript
- Homepage: https://mentormaya.github.io/node-helper
- Size: 1.65 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NODE HELPER
This is the `helper` utility tool for the projects for developer. This tool is aimed to help `developers` ๐งโ๐ป with many small things like setup, generate boilerplate code, generating sample.env file and many more.
**NODE HELPER** helps with ....
- [x] sample.env file generator ๐๏ธ
- [ ] boilerplate code generator ๐
- [ ] Static Website ๐
- [ ] Next.js ๐
- [ ] React App ๐
- [ ] init ESLint ๐ฅ๏ธ
- [ ] init test with jest ๐งช
## Installation
It can be install with below command using npm
```bash
npm i -D @mentormaya/helper
```
It can be install with below command using yarn
```bash
yard add -D @mentormaya/helper
```
It can be install with below command using pnpm
```bash
pnpm add -D @mentormaya/helper
```
## Basic Syntax
```bash
Usage: helper [options] [command]
```
where options are:
```bash
Options:
-V, --version output the version number
-h, --help display help for command
```
and commands are:
```bash
Commands:
gen-env [options] Generate Sample ENV(.env.sample) from .env file.
help [command] display help for command
```
## Usage
simply run the following command in the terminal of your choice.
>Note: This is the Node CLI tool, thats why you need to have nodejs pre installed in your operating system for this tool to work.
```bash
helper
```
will show about the app and usage.

### for help
```bash
helper --help
```
will show the help for the `helper`:

or
```bash
help [command]
```
will show the help for the `helper` or for the selected command if command provided:

Also we can know about the version information of the command with
```bash
help -V
```
or
```bash
help --version
```
will show the version for the `helper`:

### for generating a sample.env from project .env file
>Warning: Be aware that this command will replace you existing .env.sample or any name for sample you provided if already exist in the root of your project.
```bash
helper gen-env
```
This will prompt you for the values required to generate the sample.env file such as your .env file name, your sample.env filename, the value template etc.

Also you can generate the output to only the screen and not actually write it to file.
```bash
helper gen-env -d
```
or
```bash
helper gen-env --dry-run
```
or simply select `true` or say `Yes` while prompting if you use
```bash
helper gen-env
```

This way you can verify the content before writting it to the file.
Great ๐ฅณ
Lot's of noise right ๐
Let's do it silently without any interaction. Incase you have to include it in the `precommit` of your git repository to automatically generate sample.nv file each time you make a commit.
```bash
helper gen-env -s
```
or
```bash
helper gen-env --silent
```
This will do the job silently with default values and ofcourse, you can supply your own values with the options as below:
```bash
helper gen-env -s -n .my-env -N .sample-env
```
or
```bash
helper gen-env --silent --name .my-env --sample .sample-env
```
Yahoooo!!!! ๐๐๐
Let's Rock and Roll now without any tension to forget to update the sample.env file anymore.