{"repo":"toddbluhm/env-cmd","free":true,"listed":false,"github":"https://github.com/toddbluhm/env-cmd","clone":"git clone https://github.com/toddbluhm/env-cmd.git","description":"Setting environment variables from a file","language":"TypeScript","stars":1814,"topics":["nodejs","utilities","environment-variables","command-line-tool","environments","variables","typescript","cross-platform"],"license":"MIT","category":"cli-tools","readme_excerpt":"env-cmd A simple node program for executing commands using an environment from an env file. 💾 Install npm install env-cmd or npm install -g env-cmd ⌨️ Basic Usage Environment file ./.env Package.json Terminal Using custom env file path To use a custom env filename or path, pass the -f flag. This is a major breaking change from prior versions }: key is env var name and value is the env var value GetEnvVars A function that parses environment variables from a .env or a .rc file - options { object } - envFile { object } - filePath { string }: Custom path to .env file to read from (defaults to: ./.env ) - fallback { boolean }: Should fall back to default ./.env file if custom path does not exist - rc { object } - environments { string[] }: List of environment to read from the .rc file - filePath { string }: Custom path to the .rc file (defaults to: ./.env-cmdrc( .js .json) ) - verbose { boolean }: Prints extra debug logs to console.info (default: false ) - Returns { Promise }: key is env var name and value is the env var value 🧙 Why Because sometimes it is just too cumbersome passing a lot of environment variables to scripts. It is usually just easier to have a file with all the vars in them, especially for development and testing. 🚨 Do not commit sensitive environment data to a public git repo! 🚨 🧬 Related Projects cross-env - Cross platform setting of environment scripts 📋 Contributing Guide I welcome all pull requests. Please make sure you add appropriate test cases for a","default_branch":null,"files":null,"tree":[],"storefront":"/r/toddbluhm","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/toddbluhm/env-cmd/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}