Show HN: dotenc – Git-native encrypted environments powered by your SSH keys A project called dotenc launched as a Git-native secrets manager that encrypts environment variables with AES-256-GCM and wraps each environment's randomly generated 256-bit data key with developers' existing RSA or Ed25519 SSH public keys, so encrypted `.env.*.enc` files can be committed to a repository with no external service or extra key management. dotenc derives public keys from `~/.ssh/`, stores them in `.dotenc/`, rotates data keys on edits and access changes, and decrypts variables on the fly when running commands such as `dotenc dev npm start`; the project's SECURITY.md notes that AES-GCM detects ciphertext changes but does not prove who authored a complete replacement envelope, leaving authorship to Git permissions, review and history. The tool ships with an official dotenc skill and installs via a script or APT, RPM, APK, AUR, Homebrew, Scoop, npm, a standalone binary or an OCI image. πŸ” Git-native encrypted environments powered by your SSH keys - πŸ”’ Uses the battle-tested AES-256-GCM encryption algorithm - πŸ”‘ Uses your existing SSH keys - no extra key management - πŸš€ Secure command running with on-the-fly decryption - ✍️ Easy and secure environment variable editing - 🌍 Supports multiple and extensible environments - πŸ‘€ Personal encrypted environments per developer - πŸ”„ Automatic data key rotation on edits and access changes - πŸ” Readable local Git diffs and redacted pull-request reviews - πŸ›‘οΈ Supports both RSA and Ed25519 SSH keys - πŸ€– Ready for the AI era β€” check out the official dotenc skill https://www.skills.sh/dotenc/skills/dotenc dotenc init --name alice pick your SSH key and create personal.alice dotenc env edit personal.alice add your personal secrets dotenc dev npm start run with your encrypted env Encrypted .env.personal.alice.enc committed. No external services. Uses your existing SSH keys. Done. curl -fsSL https://dotenc.org/install.sh | sh The installer selects a supported package manager for your system. To review the script first or install manually with APT, RPM, APK, AUR, Homebrew, Scoop, npm, a standalone binary, or an OCI image, see the installation guide https://github.com/dotenc/dotenc/blob/main/docs/INSTALLATION.md . Managing secrets and environment variables is critical for any modern application, but most solutions rely on third-party services and web dashboards. dotenc was created to solve these problems: - No Vendor Lock-In: Your secrets and keys live in your codebase and your repository. You're never tied to a third-party provider or forced to migrate if pricing or policies change. - Improved Security: Eliminate the risk of exposing secrets to external services. All encryption and decryption happen locally, and private keys never leave your machine. - Zero Key Management: You already have SSH keys. dotenc uses them directly - no custom key generation, no extra files cluttering your home directory, no new workflows to learn. - Better Developer Experience: No more juggling environment variables in a web UI or struggling to keep them in sync across branches. Everything is managed alongside your code, with simple CLI commands and full Git integration. - Seamless Collaboration: Onboard or revoke team members with a single command. Grant or remove access per environment, and let Git handle the rest. - Reviewable in Git: Grants and revocations change tracked files, so normal repository review and history show access changes under your Git hosting and branch-protection policy. - PR-Safe Environment Changes: Environment variable updates live in the same pull request as your feature code. No more "merge β†’ broken build β†’ patch env β†’ rebuild" workflow. - Each environment has its own randomly generated 256-bit data key. - Data keys are encrypted per-user using their SSH public key. - dotenc uses AES-256-GCM for authenticated encryption. - Your repository alone is not enough to decrypt secrets. - Access can be revoked at any time. AES-GCM detects changes to a ciphertext under its data key; it does not prove who authored a complete replacement envelope. Repository writers are trusted, with Git permissions, review, and history providing the authorship layer. For a detailed breakdown of the cryptographic design, key material handling, threat model, and vulnerability reporting, see SECURITY.md https://github.com/dotenc/dotenc/blob/main/SECURITY.md . 1. dotenc detects your existing SSH keys in ~/.ssh/ Ed25519 or RSA ; 2. Your public key is derived and stored in the project .dotenc/john.pub ; 3. A unique data key is generated for each environment; 4. The data key is encrypted with each authorized public key; 5. Environment variables are encrypted using the data key with AES-256-GCM; 6. Encrypted files .env. .enc are committed to your repository; 7. When running commands, variables are decrypted on-the-fly using your SSH private key. By default, filesystem SSH private keys stay in ~/.ssh/ and dotenc reads them in place. A persistent passwordless or 1Password-backed local copy is created only through the explicitly confirmed opt-in flows documented below; provider keys otherwise enter dotenc process memory only for the current operation. After setup, your project will look like: . β”œβ”€β”€ .dotenc/ β”‚ β”œβ”€β”€ alice.pub β”‚ β”œβ”€β”€ bob.pub β”‚ └── ... β”œβ”€β”€ .env.personal.alice.enc β”œβ”€β”€ .env.production.enc └── .env.development.enc Encrypted files are committed to Git. Public keys are stored inside .dotenc/ . Each developer can have a personal encrypted environment in the reserved personal.