Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rory660/with-env


https://github.com/rory660/with-env

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# with-env

Run any arbitrary command with a `.env` file.

## Why?

`with-env` eliminates the need to load environment variables from a file within your program, eliminating calls that are redundant to production, and separating environment management from the code itself.

## Usage

```sh
with-env
```

Requires a `.env` file in your current working directory.

## Options

### `-f`: Use a specific `env` file (overrides default `.env` file usage)

```sh
with-env -f
```

## Example

### `.env` File (in current working directory)

```
# .env
FOO='bar'
```

### Command

```sh
$ with-env printenv FOO
bar
```