# dotenvx/dotenv-expand

Expand variables already on your machine for use in your .env file.

Repository: https://github.com/dotenvx/dotenv-expand
Canonical: https://ross.abutalabs.com/products/dotenv-expand
Homepage: https://dotenvx.com/open-source
Language: JavaScript
License: BSD-3-Clause
License Family: permissive
Topics: dotenv, config, env, environment, expand, secrets
Last push: 2026-07-29T18:34:11+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 3878, "days_push": 35, "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 1057, forks 99 (observed 2026-08-28T04:03:24.919394+00:00)

## What it is
A zero-dependency Node.js library that adds variable expansion, command substitution, and encrypted value support on top of dotenv. It lets .env files reference other environment variables, e.g. DATABASE_URL="postgres://${USERNAME}@localhost/my_database".

## Use cases
- expand variables in my .env file
- reference other env vars inside dotenv values
- run shell commands from .env files
- interpolate environment variables in node config
- decrypt encrypted: values in dotenv files
- preload expanded env vars with node -r

## When to avoid
- you want a full dotenv manager with encryption built in - use dotenvx instead
- you are not in a Node.js/JavaScript environment
- you only need basic .env parsing without expansion

## Facets
- artifact type: library
- maturity: active
- function: configuration-management, developer-tools
- domain: developer-tools, backend, web-development
- platform: -
- tags: dotenv, env-files, variable-expansion, command-substitution, zero-dependency, nodejs, javascript

## Member repositories
- dotenvx/dotenv-expand (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:24.919394+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-30T06:57:56.744110+00:00, confidence not recorded.
  - readme: https://github.com/dotenvx/dotenv-expand (fetched 2026-08-28T04:03:24.919394+00:00, sha 0fa5158e47a7)
  - homepage: https://dotenvx.com/open-source (fetched 2026-08-29T12:59:42.248932+00:00, sha 914ad0623122)
  - registry_npm: https://registry.npmjs.org/dotenv-expand (fetched 2026-08-29T12:59:42.258040+00:00, sha b677fa2e3489)
- Data as of 2026-08-30T08:39:29.467469+00:00.
