GithubHelp home page GithubHelp logo

node-genevy's Introduction

Genevy is a tool to generate .env file from your source code.

Intro

Example

Features

  • Support for multiple usage syntax of process.env
  • Support of default values extracting from code.
  • Probably fast, did not benchmark.
  • Place for your advertisement.

Usage

Most users (me) use npx to run Genevy on the command line like this:

# Run on project
npx genevy "**/*{.js,.cjs,.ts}" -o .env --merge

# Run on file
npx genevy "config/production.js" -o .env.production --merge

Options

The command line utility has several options. You can view the options by running npx genevy --help

Usage: genevy [options] <pattern>

CLI to generate .env file from source code.

Arguments:
  pattern                           pattern

Options:
  -V, --version                     output the version number
  -o, --output <string>             generate output file
  -i, --ignore <list>               ignore patterns (comma separated list) (default: "node_modules, .git, .svn, .hg")
  -m, --merge                       merge result with output file (default: false)
  --ignoreMismatch <list>           ignore patterns when duplicate defaults usage detected (comma separated list) (default: "config/*.*")
  --ignoreMismatchVariables <list>  ignore specific variables when duplicate defaults usage detected (comma separated list) (default: "NODE_ENV")
  --groupPrefixDepth <int>          group variables by prefix depth (default: 2)
  --groupList <list>                group variables by prefixes list (default: "")
  -h, --help                        display help for command

Options that accept array values can be specified with a comma-delimited list.

Example:

# This example group GOOGLE_ & MONGODB_ variables in single sections.
npx genevy "**/*{.js,.cjs,.ts}" -o .env --merge --groupList "GOOGLE, MONGODB"

--merge

This option makes only appends new variables that are not defined in your .env file.

node-genevy's People

Contributors

men232 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.