Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your .env file is a liability you've just gotten used to

Every project I open has one. A .env file sitting in a folder, holding a database password, a Stripe key, maybe an AWS secret — in plain text, on disk, one git add . away from a bad day. I've done this for years. Most of us have. It's not that we don't know better; it's that the alternative always felt like overkill. The gap nobody's Mac tool fills If you go looking for "how do I stop doing…

Every project I open has a .env file, containing sensitive data like database passwords, API keys, or AWS secrets. Storing these values in plain text files on disk, just a git add . away from disaster, is a common practice among developers. Despite knowing better, the alternative always felt like overkill. Some tools do exist to address this issue, but they all assume a team environment, requiring multiple users, a shared source of truth, and a monthly subscription.

For a single developer navigating multiple side projects and a full-time job, building a bespoke solution for secret management doesn't make sense. macOS has had a solid answer for keeping secrets secure for over a decade: the Keychain. Backed by the Secure Enclave, encrypted at rest, and protected by Touch ID, it's already there and already secure.

However, its UI lacks the organizational structure that a .env file provides. To fill this gap, I created KeyStack, a native macOS app that stores environment variables in the system Keychain, not in plain text files. KeyStack organizes secrets into projects and environments, tags them accordingly, and allows for easy sharing across multiple projects.

It also offers features like importing from existing .env files, a diff view to compare environments, and reminders for secret rotation. Importing a .env file is as simple as one click, and you can export the variables in various formats, such as a .env.local file or a keys-only .env.example for version control. Touch ID or your login password serves as authentication, locking when you switch applications.

KeyStack resides solely on your device, with no cloud synchronization or network requests, ensuring your secrets never leave your machine. While KeyStack is macOS-specific, not designed for team environments, and does not support CI/production pipelines, it caters to the needs of most solo developers who struggle with scattered and insecure .env files.

Available for $9.99 in the Mac App Store, KeyStack provides a local-first solution to secure your secrets without relying on cloud services.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 9 September →