<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: v1sion</title>
    <description>The latest articles on DEV Community by v1sion (@v1sion).</description>
    <link>https://dev.to/v1sion</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4206679%2F44826480-309f-482b-b976-bb44817fec70.jpg</url>
      <title>DEV Community: v1sion</title>
      <link>https://dev.to/v1sion</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/v1sion"/>
    <language>en</language>
    <item>
      <title>EnvTrail: compare Node.js environments without recording secret values</title>
      <dc:creator>v1sion</dc:creator>
      <pubDate>Sun, 25 Oct 2026 13:46:00 +0000</pubDate>
      <link>https://dev.to/v1sion/envtrail-compare-nodejs-environments-without-recording-secret-values-850</link>
      <guid>https://dev.to/v1sion/envtrail-compare-nodejs-environments-without-recording-secret-values-850</guid>
      <description>&lt;p&gt;“It works on my machine” usually leads to a few questions: Which Node version? Did the lockfile change? Is a variable missing from &lt;code&gt;.env&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;I made &lt;strong&gt;EnvTrail&lt;/strong&gt; to put those checks in one comparison. Save a snapshot where the project works, then compare it with another machine. The output is a terminal summary or a standalone HTML report.&lt;/p&gt;

&lt;p&gt;Here's an &lt;a href="https://yhs-sec.github.io/envtrail/" rel="noopener noreferrer"&gt;example report&lt;/a&gt; with synthetic data. No installation needed to view it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl6mpieotijr9hnhelnep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl6mpieotijr9hnhelnep.png" alt="EnvTrail comparison report showing environment differences using synthetic data" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;You'll need &lt;strong&gt;Node.js 22+&lt;/strong&gt; and npm. This is v0.1.0, distributed through GitHub Releases rather than the npm registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; https://github.com/YHS-Sec/envtrail/releases/download/v0.1.0/yhs-sec-envtrail-0.1.0.tgz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the project directory on a working machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;envtrail capture &lt;span class="nt"&gt;--output&lt;/span&gt; baseline.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review and copy &lt;code&gt;baseline.json&lt;/code&gt; to the other machine. From that project's directory, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;envtrail capture &lt;span class="nt"&gt;--output&lt;/span&gt; current.json
envtrail compare baseline.json current.json &lt;span class="nt"&gt;--html&lt;/span&gt; report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;report.html&lt;/code&gt; in a browser. The report works offline and has no external assets or telemetry.&lt;/p&gt;

&lt;p&gt;Or skip saving &lt;code&gt;current.json&lt;/code&gt; and compare against the current environment directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;envtrail compare baseline.json &lt;span class="nt"&gt;--html&lt;/span&gt; report.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose a new output filename each time, or use &lt;code&gt;--force&lt;/code&gt; to overwrite it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it checks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Node.js runtime and detected system npm, pnpm, Yarn, and Bun versions.&lt;/li&gt;
&lt;li&gt;Version requirements in &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;.nvmrc&lt;/code&gt;, and &lt;code&gt;.node-version&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Lockfile fingerprints, without saving lockfile contents or dependency lists.&lt;/li&gt;
&lt;li&gt;Environment variable names declared in example files such as &lt;code&gt;.env.example&lt;/code&gt;, and whether those variables are present in the process environment or local &lt;code&gt;.env&lt;/code&gt; files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if one machine has a different Node version and is missing a declared variable, both show up in the same report. JSON output is available too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy and limits
&lt;/h2&gt;

&lt;p&gt;EnvTrail reads local &lt;code&gt;.env&lt;/code&gt; files to check which variables exist, but &lt;strong&gt;doesn't save their values&lt;/strong&gt; in snapshots or reports. Variable names and lockfile fingerprints are included, so review the output before sharing it.&lt;/p&gt;

&lt;p&gt;A difference doesn't prove what broke the project. An empty assignment still counts as present; EnvTrail doesn't check whether a credential or value is valid.&lt;/p&gt;

&lt;p&gt;Package manager versions come from offline system probes. They may differ from a version selected by Corepack or a project's Yarn config, so those mismatches are warnings. The CLI doesn't install dependencies, run package scripts, or change your environment.&lt;/p&gt;

&lt;p&gt;The code is &lt;a href="https://github.com/YHS-Sec/envtrail" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;, under MIT. If you try it, I'd like to hear where the first comparison gets confusing, or which check you'd add. Issues with a small reproduction would be especially helpful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Writing disclosure: this post was generated with AI.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>node</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
