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

dotenv-cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotenv-cli

A global executable to run applications with the ENV variables loaded by dotenv

  • 6.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
increased by3.71%
Maintainers
1
Weekly downloads
 
Created

What is dotenv-cli?

The dotenv-cli package is a command-line interface tool that allows you to load environment variables from a .env file into your shell environment. This is particularly useful for managing environment variables in development and testing environments.

What are dotenv-cli's main functionalities?

Load environment variables from a .env file

This feature allows you to load environment variables from a specified .env file and run a command with those variables. In this example, the environment variables from the .env file are loaded and then the Node.js application (app.js) is executed with those variables.

dotenv -e .env -- node app.js

Specify multiple .env files

This feature allows you to load environment variables from multiple .env files. The variables from the files are merged, with the latter files overriding the former ones if there are conflicts. In this example, variables from both .env and .env.local are loaded before running the Node.js application.

dotenv -e .env -e .env.local -- node app.js

Use different .env files for different environments

This feature allows you to specify different .env files for different environments, such as production, development, or testing. In this example, the environment variables from the .env.production file are loaded before running the Node.js application.

dotenv -e .env.production -- node app.js

Other packages similar to dotenv-cli

FAQs

Package last updated on 04 Jul 2022

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