<?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: EriTech</title>
    <description>The latest articles on DEV Community by EriTech (@erai_4d982e9ebafb9f7a35d).</description>
    <link>https://dev.to/erai_4d982e9ebafb9f7a35d</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%2F3861927%2Ff42d6647-5a02-45c5-a04c-0825a20dfb36.png</url>
      <title>DEV Community: EriTech</title>
      <link>https://dev.to/erai_4d982e9ebafb9f7a35d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/erai_4d982e9ebafb9f7a35d"/>
    <language>en</language>
    <item>
      <title>Stop leaking your .env to AI! I built a Rust/Tauri Secret Manager to inject API keys safely 🛡️</title>
      <dc:creator>EriTech</dc:creator>
      <pubDate>Sun, 05 Apr 2026 07:21:10 +0000</pubDate>
      <link>https://dev.to/erai_4d982e9ebafb9f7a35d/stop-leaking-your-env-to-ai-i-built-a-rusttauri-secret-manager-to-inject-api-keys-safely-4apj</link>
      <guid>https://dev.to/erai_4d982e9ebafb9f7a35d/stop-leaking-your-env-to-ai-i-built-a-rusttauri-secret-manager-to-inject-api-keys-safely-4apj</guid>
      <description>&lt;h2&gt;
  
  
  The AI Editor Problem 🤖
&lt;/h2&gt;

&lt;p&gt;We all love using AI assistants like Cursor, GitHub Copilot, and Claude. But let's be honest: they brought a terrifying new security risk to our local development workflow.&lt;/p&gt;

&lt;p&gt;Have you ever worried that your AI assistant might accidentally read your local &lt;code&gt;.env&lt;/code&gt; file and send your raw database passwords or OpenAI API keys to the cloud? Or maybe you were screen-sharing and accidentally opened your &lt;code&gt;.env&lt;/code&gt; file for everyone to see? &lt;/p&gt;

&lt;p&gt;To solve this problem once and for all, I built &lt;strong&gt;Kimu&lt;/strong&gt; — an open-source, hybrid CLI &amp;amp; GUI secret manager powered by Rust and Tauri.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/EriTech404/Kimu.git" rel="noopener noreferrer"&gt;Check out Kimu on GitHub!&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🗝️ The Magic of Kimu: Use Placeholders, Not Passwords
&lt;/h2&gt;

&lt;p&gt;With Kimu, you no longer need to write actual sensitive information in your &lt;code&gt;.env&lt;/code&gt; files. Instead, you use simple placeholders.&lt;/p&gt;

&lt;h3&gt;
  
  
  ❌ Before (Dangerous)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# If your AI reads this, your keys are gone...
DATABASE_URL=postgres://user:SuperSecretPassword@localhost/db
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ✨ After with Kimu (100% Safe)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Completely harmless even if leaked!
DATABASE_URL=SECRET{{DB_PASSWORD}}
OPENAI_API_KEY=SECRET{{OPENAI_KEY}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🚀 How to Use It (CLI Mode)
&lt;/h2&gt;

&lt;p&gt;You don't need to change a single line of code in your application. Just prefix your usual development commands with &lt;code&gt;kimu run --&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# For Next.js / Vite / Node&lt;/span&gt;
kimu run &lt;span class="nt"&gt;--&lt;/span&gt; npm run dev

&lt;span class="c"&gt;# For Python / Go&lt;/span&gt;
kimu run &lt;span class="nt"&gt;--&lt;/span&gt; python main.py
kimu run &lt;span class="nt"&gt;--&lt;/span&gt; go run main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run this command, Kimu quietly intercepts it, grabs the real passwords directly from your OS native keychain, injects them into memory as environment variables, and spawns the child process.&lt;/p&gt;

&lt;p&gt;Your app will read &lt;code&gt;process.env.OPENAI_API_KEY&lt;/code&gt; exactly as it normally would!&lt;/p&gt;




&lt;h2&gt;
  
  
  🎨 A Beautiful UI for Management (GUI Mode)
&lt;/h2&gt;

&lt;p&gt;Kimu isn't just a CLI tool; it's a hybrid. If you type &lt;code&gt;kimu&lt;/code&gt; in your terminal without any arguments, a beautiful Desktop UI opens up.&lt;/p&gt;

&lt;p&gt;Here, you can securely add, edit, and organize your secrets with custom tags. &lt;strong&gt;Nothing is sent to the cloud.&lt;/strong&gt; Everything is kept strictly on your local machine.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ Under the Hood
&lt;/h2&gt;

&lt;p&gt;I built Kimu using &lt;strong&gt;Rust, Tauri v2, and React (TypeScript)&lt;/strong&gt;. Here are a few technical highlights:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. OS-Native Keychain Security 🛡️
&lt;/h3&gt;

&lt;p&gt;Instead of writing a custom encryption logic, Kimu delegates the security to the most secure place on your computer using the Rust &lt;code&gt;keyring&lt;/code&gt; crate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;macOS:&lt;/strong&gt; Keychain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows:&lt;/strong&gt; Credential Manager&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux:&lt;/strong&gt; Secret Service API&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Smart &lt;code&gt;.env&lt;/code&gt; Discovery 🧠
&lt;/h3&gt;

&lt;p&gt;Modern frameworks like Next.js have specific priority rules for &lt;code&gt;.env&lt;/code&gt; files. Kimu's CLI automatically scans and respects this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;.env&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.env.development&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env.local&lt;/code&gt; (Highest priority)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. One Binary, Two Faces 🎭
&lt;/h3&gt;

&lt;p&gt;The coolest part of the architecture is that the single &lt;code&gt;kimu&lt;/code&gt; executable acts as a headless CLI wrapper when you pass the &lt;code&gt;run&lt;/code&gt; argument, but functions as a full Tauri desktop application when executed without arguments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Give it a Try!
&lt;/h2&gt;

&lt;p&gt;If you are currently hardcoding raw secrets in your &lt;code&gt;.env&lt;/code&gt; files, please give Kimu a try. It will give you peace of mind while pair-programming with AI.&lt;/p&gt;

&lt;p&gt;Pre-built binaries (macOS &lt;code&gt;.dmg&lt;/code&gt; and Windows &lt;code&gt;.exe&lt;/code&gt;) are available in the repository.&lt;/p&gt;

&lt;p&gt;If you find it useful, a &lt;strong&gt;Star ⭐️&lt;/strong&gt; on GitHub would mean the world to me! I'm also open to feedback, Issues, and Pull Requests.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>security</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
