# with-env

> Read and then apply .env file in the working directory, assuming the .env exists

Latest version **1.1.1** (published 2025-04-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install with-env
pnpm add with-env
yarn add with-env
bun add with-env
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2025-04-23 |
| First published | 2014-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 0.10 |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2 |
| Author | matthewh |
| Maintainers | matthewh |
| Keywords | process, environment, variable, env |

## Links

- npm: https://www.npmjs.com/package/with-env
- Repository: https://github.com/MatthewSH/npm-packages
- Issues: https://github.com/MatthewSH/npm-packages/issues
- npm.io page: https://npm.io/package/with-env

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2025-04-23
- 1.1.0 — 2025-04-23
- 1.0.0 — 2016-04-19
- 0.0.1-security — 2016-03-23
- 1.3.37 — 2016-03-22
- 0.1.1 — 2015-11-10
- 0.1.0 — 2014-05-18
- 0.0.3 — 2014-05-03
- 0.0.1 — 2014-03-26
- 0.0.0 — 2014-03-25

## README

# With .env

Read and then apply .env file in the working directory, assuming the .env exists

## Usage

```javascript
require("with-env")();
console.log(process.env.MY_VARIABLE);
```

---
_Source: https://npm.io/package/with-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
