# kentcdodds/cross-env

🔀 Cross platform setting of environment scripts

Repository: https://github.com/kentcdodds/cross-env
Canonical: https://ross.abutalabs.com/products/cross-env
Homepage: https://www.npmjs.com/package/cross-env
Language: TypeScript
License: MIT
License Family: permissive
Topics: environment, variables, cross-platform, windows, unix, macos, cross-env
Archived: true
Last push: 2025-11-16T14:11:37+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 52, release rhythm 38, longevity 100
- inputs: {"age_days": 3989, "days_push": 290, "days_rel": 338, "gap_med": 65, "n_releases_24m": 2}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6524, forks 267 (observed 2026-08-28T04:09:44.901620+00:00)

## What it is
cross-env is an npm-distributed CLI tool that lets developers set and use environment variables in npm scripts with POSIX syntax, working identically on Windows, macOS, and Linux. It is feature-complete and in maintenance mode, with no new features planned.

## Use cases
- set NODE_ENV=production in npm scripts that work on Windows
- run cross-platform build scripts with environment variables
- use $VAR syntax in scripts on Windows
- set multiple environment variables in a single npm script
- share environment variables between parent and child npm scripts
- avoid Windows cmd syntax differences in CI scripts

## When to choose
- your npm scripts set environment variables and must run on Windows and Unix
- you want one script syntax instead of per-platform workarounds
- you need POSIX-style $VAR expansion in cross-platform shell commands

## When to avoid
- you only target POSIX systems and can set env vars natively
- you need new features - the project is done and in maintenance mode
- you are on Node.js 18 or lower and need version 7 instead

## Facets
- artifact type: cli-tool
- maturity: maintenance
- function: cli, configuration-management, developer-tools
- domain: developer-tools, cross-platform
- platform: cross-platform, windows, cli
- tags: npm-scripts, environment-variables, cross-spawn, nodejs, command-line, automation, macos, linux

## Member repositories
- kentcdodds/cross-env (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:44.901620+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-29T17:44:25.001288+00:00, confidence not recorded.
  - readme: https://github.com/kentcdodds/cross-env (fetched 2026-08-28T04:09:44.901620+00:00, sha 5abc00a34988)
  - registry_npm: https://registry.npmjs.org/cross-env (fetched 2026-08-29T08:40:48.174002+00:00, sha 6d294ca6294c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
