# toddbluhm/env-cmd

Setting environment variables from a file

Repository: https://github.com/toddbluhm/env-cmd
Canonical: https://ross.abutalabs.com/products/env-cmd
Homepage: https://www.npmjs.com/package/env-cmd
Language: TypeScript
License: MIT
License Family: permissive
Topics: nodejs, utilities, environment-variables, command-line-tool, environments, variables, typescript, cross-platform
Last push: 2026-02-09T12:15:44+00:00

## Health v2 (maintenance only)
Score: 62/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 66, release rhythm 35, longevity 100
- inputs: {"age_days": 3669, "days_push": 205, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1814, forks 69 (observed 2026-08-28T04:05:39.812669+00:00)

## What it is
env-cmd is a Node.js CLI tool that executes commands with environment variables loaded from an env file. It supports custom env file paths, multiple environments via .rc files, variable expansion, and cross-platform usage in npm scripts.

## Use cases
- run a command with environment variables from a .env file
- load different env configurations per environment in npm scripts
- set environment variables cross-platform without shell-specific syntax
- merge multiple named environments from an rc file
- expand $VAR references in command arguments
- avoid overriding already-set environment variables when running commands

## When to choose
- you need to run node or other commands with env vars from a file in npm scripts
- you want cross-platform env loading for Windows, macOS, and Linux
- you need multiple named environment configs in one project

## When to avoid
- you only need to load env vars inside a Node.js process rather than spawn a command (use dotenv)
- you need complex secret management or encrypted env files
- your runtime already has built-in env file support (e.g. Node 20+ --env-file)

## Facets
- artifact type: cli-tool
- maturity: stable
- function: cli, configuration-management, developer-tools
- domain: developer-tools
- platform: cross-platform, cli
- tags: environment-variables, dotenv, env-file, npm, typescript, command-line, automation, nodejs

## Member repositories
- toddbluhm/env-cmd (main) score 62

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:39.812669+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:21:07.108578+00:00, confidence not recorded.
  - readme: https://github.com/toddbluhm/env-cmd (fetched 2026-08-28T04:05:39.812669+00:00, sha b9b3458fd22e)
  - registry_npm: https://registry.npmjs.org/env-cmd (fetched 2026-08-29T10:59:53.021859+00:00, sha 5fa599635eef)
- Data as of 2026-08-30T08:39:29.467469+00:00.
