A command-line tool that loads environment variables from dotenv files (a .env in the current working directory by default) and then runs another command with those variables set. It supports custom env files, cascading loads, command-line variable overrides, variable expansion, and can help when running commands in Windows or PowerShell.
Project status
- Actively maintained: The repository shows a very recent upstream push (2026-05-30), and it has shipped multiple versioned updates in 2025 (v9.0.0, v10.0.0, v11.0.0).
- Apparent update cadence: Prior to the most recent push, versioned updates occurred in close succession in late July 2025 (v9.0.0 on 2025-07-22, v10.0.0 on 2025-07-29), followed by a later update in late Oct 2025 (v11.0.0 on 2025-10-28). The gap between v11.0.0 and the last push in May 2026 is notable, so cadence appears irregular.
AI summary generated Today
Recent updates
v11.0.0
7 months agoRelease v11.0.0 updates dotenv-cli from 10.0.0 to 11.0.0 and bumps the dotenv-expand dependency to the ^12 range. The included diff also removes package-lock.json and updates documentation (README) related to env file loading and precedence.
Breakingv10.0.0
10 months agov10.0.0 updates this package's dependency on dotenv-expand. The release notes only reference a fix for GitHub issue #121, but the code diff indicates the main change is a dependency bump that can alter environment variable expansion behavior.
Breakingv9.0.0
10 months agoThis release updates dotenv-cli from v8.0.0 to v9.0.0, primarily by upgrading the underlying dotenv dependency and changing CLI output behavior to be quieter by default. The code changes are concentrated in cli.js, where a new quiet flag is introduced and wired into dotenv.config, plus lockfile-related dependency resolution updates.
Featuresv8.0.0
12/20/2024v8.0.0 updates dotenv-cli to improve configuration expansion behavior (PR #101), and the release notes warn that some configs may break. The code change indicates expansion was refactored from expanding each parsed file immediately to expanding in a single global pass after config loading.
Breakingv7.4.4
11/21/2024v7.4.4 is a small release described only as a security fix. The provided release notes do not list any concrete user-visible changes, but the diff shows documentation and dependency changes that may affect behavior and option handling.
BreakingSecurityv7.4.3
5/7/2024v7.4.3 updates dotenv-cli to forward operating system signals received by the parent process to the spawned child process. It does this by creating an explicit `child` handle from `spawn(...)` and adding `process.on(...)` listeners for a set of common signals.
v7.4.1
3/9/2024v7.4.1 is a small patch release that addresses a bug related to the CLI -p option. The changes are confined to the CLI output behavior for -p and a package version bump.
v7.4.0
3/7/2024v7.4.0 focuses on improving how `-v` command line variables are accepted and applied, and updates README examples around passing a command. The code change primarily alters `-v` parsing and validation behavior, and also slightly changes output behavior for the `-p` option.
v7.3.0
8/17/2023v7.3.0 updates the dotenv-cli command-line behavior to treat cascading env variables (-c) and system overriding (-o/--override) as incompatible, adding an explicit validation error. It also bumps the underlying dotenv dependency so the DOTENV_KEY feature is supported.
Breakingv7.2.1
4/5/2023This release adds a new CLI flag to control environment variable overriding when loading .env files. The main behavioral change is wiring the new `--override` (and `-o`) option into the underlying `dotenv.config()` call.
Features