1.0.2 • Published 12 months ago

en-toolkit v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

en-toolkit

en-toolkit is a command-line tool for generating and managing environment variables. It scans a directory for environment variables and creates a .env file based on the results. You can configure it to exclude certain folders, specify prefixes for environment variables, and control whether to overwrite existing .env files.

Installation

To use en-toolkit, you need to have Node.js and npm installed. You can install the package globally using npm:

npm install -g en-toolkit

Usage

You can run en-toolkit using the command line. Below are the available options:

Command Line Options

OptionAliasDescriptionTypeDefault Value
directory-dThe directory to scan for .env variablesstringCurrent working directory (process.cwd())
exclude-eFolders to exclude from the scanarray["node_modules", "dist", "build", "test", ".git", "coverage", "public", "out", "tmp"]
prefixes-pPrefixes used with env variablesarray["process.env"]
name-nName of the output .env filestring.env-timestamp
output-oDirectory to place the generated .env filestringCurrent working directory (process.cwd())
overwrite-wFlag to overwrite the previous .env filebooleanfalse
printPrint all of the environment variables found in the directorybooleanfalse
version-vDisplays the current version
help-hList all the commands

Example

  1. It will generate an env in the root directory with name .env-timestamp
en-toolkit
  1. Specify directory and exclude folders:
en-toolkit --directory ./src --exclude '["node_modules", "dist"]'
  1. Specify prefixes and output directory:
en-toolkit --prefixes '["MY_APP"]' --output ./config
  1. Print environment variables without creating a file:
en-toolkit --print
  1. Overwrite existing .env file:
en-toolkit --overwrite

Contributing

Contributions are welcome! Please open an issue or a pull request if you have any improvements or bug fixes.

License

This project is licensed under the ISC License. See the LICENSE file for details.

Author

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago