Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/p-chan/dotenv-ctrl

A CLI tool to control dotenv file
https://github.com/p-chan/dotenv-ctrl

dotenv

Last synced: 7 days ago
JSON representation

A CLI tool to control dotenv file

Awesome Lists containing this project

README

        

# dotenv-ctrl

> A CLI tool to control [dotenv](https://github.com/motdotla/dotenv) file

## Install

```bash
$ npm install dotenv-ctrl --save-dev
```

## Usage

### `add `

```bash
$ npx dotenv-ctrl add NODE_ENV production
$ cat .env
NODE_ENV=production
```

### `remove `

```bash
$ cat .env
NODE_ENV=production
NODE_DELETE_KEY=true
$ npx dotenv-ctrl remove NODE_DELETE_KEY
$ cat .env
NODE_ENV=production
```

## Options

### `-e`, `--env`

```bash
$ npx dotenv-ctrl add NODE_ENV development -e .env.development
$ cat .env.development
NODE_ENV=development
```

## Author

[@p-chan](https://github.com/p-chan)

## License

MIT