Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

env-manager-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-manager-cli

a manager for local and heroku environmental variables

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

env-manager-cli

Contactually's environmental variable management CLI. It updates your local .env as well as runs the commands for your staging and production values.

Build Status Coverage Status

Demo

Installation

yarn add --dev env-manager-cli

Implementation

envManager.js

import envManager from 'env-manager-cli'

envManager({
  stagingCommand: (key, value) => `heroku config:set ${key}=${value} test`,
  productionCommand: (key, value) => `heroku config:set ${key}=${value} prod`
})

package.json


  "scripts": {
    "env:set": "node ./envManager",
  },

now running yarn env:set will result in the following prompt

Configuration

  • envFilePath: String Optional this is the path to your local .env file. The default is "./.env"
  • stagingCommand: Function a function which accepts a key and value, and returns the staging update command. This will be logged and executed in the terminal
  • productionCommand: Function a function which accepts a key and value, and returns the production update command. This will be logged and executed in the terminal

Keywords

FAQs

Package last updated on 16 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc