<?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: Viraj Shoor</title>
    <description>The latest articles on DEV Community by Viraj Shoor (@virajshoor).</description>
    <link>https://dev.to/virajshoor</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3966366%2F9be689a4-06fa-40e2-b4a5-a28ab7c40da9.gif</url>
      <title>DEV Community: Viraj Shoor</title>
      <link>https://dev.to/virajshoor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/virajshoor"/>
    <language>en</language>
    <item>
      <title>Built envguard to solve a stability itch.</title>
      <dc:creator>Viraj Shoor</dc:creator>
      <pubDate>Wed, 03 Jun 2026 10:55:42 +0000</pubDate>
      <link>https://dev.to/virajshoor/built-envguard-to-solve-a-stability-itch-2518</link>
      <guid>https://dev.to/virajshoor/built-envguard-to-solve-a-stability-itch-2518</guid>
      <description>&lt;h1&gt;
  
  
  Built envguard to solve an itch
&lt;/h1&gt;

&lt;p&gt;Every developer has broken a local build or a deployment at least once because of a missing environment variable. &lt;/p&gt;

&lt;p&gt;You pull the latest code, run the start script, and the application immediately crashes because someone added a new API key or database URL to the codebase but forgot to tell the team to update their local &lt;code&gt;.env&lt;/code&gt; files. &lt;/p&gt;

&lt;p&gt;I got tired of tracking down vague runtime errors caused by mismatched environments, so I built &lt;strong&gt;envguard&lt;/strong&gt; to solve this exact bottleneck. It ensures your &lt;code&gt;.env&lt;/code&gt; completely satisfies your requirements before your app even tries to start, guaranteeing a stable run.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem: Silent Configuration Failures
&lt;/h3&gt;

&lt;p&gt;Standard &lt;code&gt;.env&lt;/code&gt; management usually relies on documentation or a &lt;code&gt;.env.example&lt;/code&gt; file that quickly goes out of date. There is no automated bridge between what your code &lt;em&gt;expects&lt;/em&gt; and what your actual file &lt;em&gt;provides&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;When a variable is missing, your app might fail silently until a specific code path is hit, causing unpredictable behavior right when you're trying to run the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  How envguard Fixes This
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;envguard&lt;/code&gt; introduces a strict validation step using a &lt;code&gt;.env.schema&lt;/code&gt; file. It acts as a structural gatekeeper for your configuration right at execution time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema-Based Validation:&lt;/strong&gt; It parses your &lt;code&gt;.env&lt;/code&gt; and matches it against a defined &lt;code&gt;.env.schema&lt;/code&gt; template.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail-Fast Mechanics:&lt;/strong&gt; If a variable is missing or structurally invalid, &lt;code&gt;envguard&lt;/code&gt; blocks the application startup and outputs a clean, explicit error showing exactly what is missing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stable Execution:&lt;/strong&gt; By embedding this check directly into your application setup, you guarantee that the app cannot spin up unless its environment is 100% complete. Completely Open-source, forever.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Github:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/virajshoor" rel="noopener noreferrer"&gt;
        virajshoor
      &lt;/a&gt; / &lt;a href="https://github.com/virajshoor/envguard" rel="noopener noreferrer"&gt;
        envguard
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Validate .env files against a typed .env.schema before bad config breaks your deploy. Offline-first CLI.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;######## ##    ## ##     ##  ######   ##     ##    ###    ########  ########
##       ###   ## ##     ## ##    ##  ##     ##   ## ##   ##     ## ##     ##
##       ####  ## ##     ## ##        ##     ##  ##   ##  ##     ## ##     ##
######   ## ## ## ##     ## ##   #### ##     ## ##     ## ########  ##     ##
##       ##  ####  ##   ##  ##    ##  ##     ## ######### ##   ##   ##     ##
##       ##   ###   ## ##   ##    ##  ##     ## ##     ## ##    ##  ##     ##
######## ##    ##    ###     ######    #######  ##     ## ##     ## ########
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Validate your env config before it breaks your deploy.&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://www.npmjs.com/package/@virajshoor/envguard" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48de0d37f6d6445cb0dbb862c8ad3bac3ae03cd5bc50be141f1f0f6e8429c63f/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f40766972616a73686f6f722f656e7667756172642e7376673f6c6f676f3d6e706d" alt="npm version"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/@virajshoor/envguard" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a705b620613af14d61e6d06b21fc41bb87c2020080df3c5168b0e024e8fdab3a/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f40766972616a73686f6f722f656e7667756172642e7376673f6c6f676f3d6e706d" alt="npm downloads"&gt;&lt;/a&gt;
&lt;a href="https://github.com/virajshoor/envguard/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8b59d97f09166dc0016167b7b0cf9a5830ee03c63f582ebd7ed5848ad497f1ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d332e302d626c75652e737667" alt="license"&gt;&lt;/a&gt;
&lt;a href="https://nodejs.org" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/3084f2f78dbb4c0516d42f0f389e4f2603f6a599f7f653706a9f6674086b4c2c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f64652d25334525334431382e332d3333393933332e7376673f6c6f676f3d6e6f64652e6a73266c6f676f436f6c6f723d7768697465" alt="node"&gt;&lt;/a&gt;
&lt;a href="https://github.com/virajshoor/envguard/package.json" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/71699300596a75a395e529d6c8b23b0e023442a6fbd76669d85514c5edec006b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72756e74696d65253230646570732d312d627269676874677265656e2e737667" alt="dependencies"&gt;&lt;/a&gt;
&lt;a href="https://github.com/virajshoor/envguard#privacy--offline-first" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/97bc93bde68c7dc9b7e5bddb899ad1ca23a091260b8a8c23da05c7d22482d9b1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f66666c696e652d66697273742d737563636573732e737667" alt="offline"&gt;&lt;/a&gt;
&lt;a href="https://github.com/virajshoor/envguard#contributing" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c9a2815a79194ae5a6562d00ad07d1414a1028810e78ca60af7eef4c48328c75/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d6f72616e67652e737667" alt="PRs welcome"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;A missing &lt;code&gt;DATABASE_URL&lt;/code&gt;, a blank &lt;code&gt;JWT_SECRET&lt;/code&gt;, a port set to &lt;code&gt;banana&lt;/code&gt;, or a
production-only typo can take down a release &lt;strong&gt;after the code was already fine&lt;/strong&gt;
&lt;code&gt;envguard&lt;/code&gt; catches those mistakes where they belong: locally, in CI, and before
runtime.&lt;/p&gt;
&lt;p&gt;It validates a…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/virajshoor/envguard" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Quick Start
&lt;/h3&gt;

&lt;p&gt;Install the package:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

npm install -g @virajshoor/envguard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>npm</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
