<?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: Arjuna Nayak</title>
    <description>The latest articles on DEV Community by Arjuna Nayak (@arjunn881).</description>
    <link>https://dev.to/arjunn881</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%2F3978053%2F84d6d386-3ef1-4c51-8dc1-5c64143e0388.jpeg</url>
      <title>DEV Community: Arjuna Nayak</title>
      <link>https://dev.to/arjunn881</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arjunn881"/>
    <language>en</language>
    <item>
      <title>Stop sharing .env files in Discord. I built a zero-setup, E2E encrypted CLI instead.</title>
      <dc:creator>Arjuna Nayak</dc:creator>
      <pubDate>Wed, 10 Jun 2026 18:04:23 +0000</pubDate>
      <link>https://dev.to/arjunn881/stop-sharing-env-files-in-discord-i-built-a-zero-setup-e2e-encrypted-cli-instead-hoo</link>
      <guid>https://dev.to/arjunn881/stop-sharing-env-files-in-discord-i-built-a-zero-setup-e2e-encrypted-cli-instead-hoo</guid>
      <description>&lt;p&gt;Sharing environment variables during a quick project hand-off shouldn't require setting up a heavy enterprise vault like Doppler or Infisical. But it also shouldn't mean copy-pasting plaintext API keys into Slack or Discord.&lt;/p&gt;

&lt;p&gt;I wanted a frictionless, terminal-native bridge. So I built &lt;code&gt;share-env&lt;/code&gt;: an ephemeral, peer-to-peer CLI for securely sharing &lt;code&gt;.env&lt;/code&gt; files.&lt;/p&gt;

&lt;p&gt;Here is exactly how it is architected under the hood:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;True Zero-Knowledge E2E Encryption&lt;/strong&gt;&lt;br&gt;
Files are encrypted entirely locally using Node's native &lt;code&gt;crypto&lt;/code&gt; module (AES-256-GCM). The decryption key is passed via a hash fragment in the generated share code (e.g., &lt;code&gt;blue-sky-rocket#a1b2c3d4&lt;/code&gt;). The relay server receives the ciphertext, but the hex key after the # never leaves your local machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart Merging (No overwriting)&lt;/strong&gt;&lt;br&gt;
Generic file-sharers like Magic Wormhole blindly overwrite files. &lt;code&gt;share-env&lt;/code&gt; parses the incoming payload using &lt;code&gt;dotenv&lt;/code&gt;. If there is a conflict (e.g., you have &lt;code&gt;PORT=3000&lt;/code&gt; locally and the incoming file has &lt;code&gt;PORT=8080&lt;/code&gt;), it pauses and interactively asks which value to keep.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-Flight Git Guardrails&lt;/strong&gt;&lt;br&gt;
To prevent accidental leaks, the CLI uses the &lt;code&gt;fs&lt;/code&gt; module to check your &lt;code&gt;.gitignore&lt;/code&gt; before pulling. If &lt;code&gt;.env&lt;/code&gt; isn't safely ignored, the CLI throws a fatal error and physically blocks execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Burn-After-Reading TTL&lt;/strong&gt;&lt;br&gt;
The Express relay server has no database. It uses &lt;code&gt;node-cache&lt;/code&gt; to hold encrypted blobs in memory with a strict 10-minute TTL. The millisecond a payload is pulled, it is permanently destroyed.&lt;/p&gt;

&lt;p&gt;Test it locally in 5 seconds (Zero Setup)&lt;br&gt;
You do not need to create an account, and you don't even need to install it globally. Run this in any directory with a &lt;code&gt;.env&lt;/code&gt; file:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer A (Sender):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Bash
npx share-env push

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Developer B (Receiver):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Bash
npx share-env pull &amp;lt;share-code&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Source Code &amp;amp; Registry:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/arjunn881/env-share" rel="noopener noreferrer"&gt;https://github.com/arjunn881/env-share&lt;/a&gt;&lt;br&gt;
npm: &lt;a href="https://www.npmjs.com/package/share-env" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/share-env&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I spend a lot of my time building in the MERN stack, and juggling local environments across different setups has always been a pain point. I open-sourced the entire monorepo—I'd love for the community to audit the crypto architecture or drop feedback on the CLI UX!&lt;/p&gt;

&lt;p&gt;— Arjun&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>security</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
