Skip to content
Code Recycle

Component · for humans & their agents

Env Key Precedence Verdict

verified · first-partyactively maintainedFree

You edit .env, the app keeps the old key, and the loader reports success. Measured on dotenv: the file is parsed, the value is discarded, and nothing anywhere says so.

by Code Recycle

Get it free

Every claim on this page is refundable if it is untrue — refund policy.

Verified: 17 tests

FREE. Verified: 17 tests passing, measured by running the suite. Built as a VERIFIER for env loaders, depending on none of them at runtime, and it NEVER accepts a secret. Full source, same repo invite as every paid listing.

Decide which definition of an environment variable your process will ACTUALLY use. Pure function: no I/O, no environment reads, no dependency on dotenv -- and it never accepts a secret.

Measured against dotenv 17.x on Node 26. Not affiliated with or endorsed by the dotenv project.

THE SILENT FAILURE, MEASURED:

  process.env before   "from_shell"
  result.parsed        {"MYKEY":"from_dotenv_file"}   <- the FILE's value
  process.env after    "from_shell"                   <- what the app actually uses
  reported error       none. config() reported success.

THREE THINGS ARE TRUE AT ONCE, and together they cost an afternoon. The file is correct -- reading it confirms your change is there. The loader says it succeeded -- nothing raised, nothing warned. And result.parsed CONTAINS YOUR NEW VALUE even though it was never applied.

That third one is the trap. The obvious way to debug this -- print what dotenv parsed -- shows exactly the value you just typed and CONFIRMS THE WRONG CONCLUSION. The only place the truth is visible is process.env, which is the one thing nobody checks, because they believe they just set it.

This is the mechanism behind "I put my API key in .env and it is still using the old one."

{ override: true } fixes it. The default is override:false, SO THE DEFAULT IS THE FAILING CASE.

WHY THE VARIABLE IS SO OFTEN ALREADY SET. Rarely because anyone typed export. The usual causes are invisible from inside the project: a shell rc that ran when the terminal opened, a launchd or systemd unit, docker run -e, a CI secret, a parent process, a secret-manager shim -- or an editor launched from Spotlight or Dock, which inherits a DIFFERENT environment from your terminal. That last one is why "it works in my terminal but not in the editor" is so common and so rarely diagnosed: they are two different environments, and only one has the variable.

IT NEVER ASKS FOR YOUR KEY. The Source type has no field that accepts a value -- only where a name is DEFINED, plus an optional fingerprint YOU compute. A tool that asks for your API key in order to tell you your API key is misconfigured has made the problem worse. There is a test pinning this, so adding a value field for convenience fails the suite and has to be argued for in review.

IT REFUSES RATHER THAN GUESSING. If the loader's override behaviour is unknown and more than one source exists, the verdict is UNDECIDABLE -- not an assumed winner. dotenv's default IS override:false, but that is a default, not a fact about your project, and a confident wrong answer here sends you to edit the file that is being ignored. MISSING likewise says the variable is not defined by any source that was CHECKED -- never proof of absence, since a parent process can define it without appearing in any file.

STATED IN THE LIBRARY'S FAVOUR, because a listing that only reports what a library gets wrong is not being honest about it: recent dotenv prints a decorative line reporting how many variables it injected -- "injected env (1)" versus "injected env (0)". That count IS the signal and it is genuinely there. It also sits on a tip line beside an advertisement, is easy to scroll past, and is absent or unread in most non-interactive logs.

VERIFIED: 17 tests, measured by running the suite. The reproduction script ships in evidence/ and regenerates every number above against your own dotenv version.

DELIVERY: free, signed download of a hash-verified tarball, immediately. Full source, no card, no trial, no expiry.

Interface

What you call, and what comes back. Types and signatures only — the implementation ships with the source.

  export function evaluatePrecedence(input: PrecedenceInput): PrecedenceVerdict;
  export type Severity = "critical" | "warning" | "note";

01Capabilities

Does

  • + Input validation
  • + Configuration drift detection
  • + Configuration precedence

Doesn’t

  • No exclusions declared

02Requirements & stack

Depends on

No declared dependencies

Credentials needed

None declared

Stack

typescript

03Community

No endorsements yet

No verified confirmations yet — be the first.

Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.

Open an issue

Sign in to confirm — weight comes from verified usage, not vote count.

0 open · 0 answered · 0 fixed · 1 said it worked

04Trust Passport

Full passport →
–/100

0/0 automated components pass. An automated score is never a security guarantee.

✓ Verified · first-partyreviewed Sep 20, 2026 · re-verification due Dec 19, 2026
  • publisher identity Publisher status verified; 1 verification(s) on file
  • malicious pattern scan No known malicious-behavior patterns across 11 source file(s) plus listing text
  • capability contract All 0 observed capability reference(s) match the declared manifest
  • agent safety scan No injection patterns in agent-readable content
  • provenance No release signature or provenance attestation
  • behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.

Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.

VersionChannelReleasedNotes
1.0.0stableAug 7, 2026First public release.