Blog
Engineering notes from building envsec. RSS
How many plaintext secrets are sitting in your projects folder?
envsec rescue scans a folder for plaintext .env files, reports reused and committed secrets, then moves them into the OS keychain.
From 417 to 32 milliseconds: envsec on Effect 4 and Bun
Measuring every step from Effect 3 on Node to a standalone Bun binary: 12.9× faster startup and 5.8× less memory for the envsec CLI.
Your coding agent can read your .env
Coding agents read files and run commands as you. How a plaintext .env gets exposed, what moving it to the OS keychain fixes, and what it can't.
envsec vs dotenv vs 1Password CLI vs direnv: which one, when
Where dotenv, direnv, 1Password CLI and envsec keep secrets, how they get them into a process, and when each one is the better choice.
From .env to the keychain in five minutes
A step-by-step migration of a Node or Next.js project from a dotenv file to the OS keychain with envsec load, run, cmd and shell.
What envsec does not protect you from
An honest threat model for envsec: what the OS keychain protects, and what it doesn't: same-user processes, environment variables, argv, metadata, env-file.
One CLI, three keychains
How envsec stores secrets through macOS security, Linux secret-tool and Windows CredWrite behind one Effect service, and why every value is base64.
Why secret values live in the keychain and metadata in SQLite
envsec keeps secret values in the OS keychain and names, expiry and export records in SQLite: why, what that reveals, and what happens when one write fails.
Building a CLI with Effect 4
How envsec is built on effect/cli in Effect 4: commands, flags, shared options, services and layers, typed errors with exit codes, and tests.
Testing a keychain CLI on macOS, Linux and Windows in CI
How envsec's end-to-end tests reach the real macOS Keychain, GNOME Keyring and Windows Credential Manager on GitHub Actions, and what broke along the way.
Shipping one CLI to Homebrew, npm, mise and a standalone binary
One release tag, seven Bun targets, npm, Homebrew and mise: how the envsec release workflow ships a TypeScript CLI, and what it still does not do.
Dynamic tab completion in bash, zsh and fish
How envsec completes contexts, keys and saved commands at Tab time in bash, zsh and fish, what each shell makes awkward, and the latency budget.
Parsing 1y6mo and generating secrets you can't guess
How envsec parses expiry durations like 1y6mo (and why a month is 30 days), and how its secret command avoids modulo bias. With the entropy math.
Sharing secrets with a teammate, the GPG way
How envsec share encrypts a context with GPG, how the receiver imports it with envsec load, and what GPG does and doesn't protect.
- 4 min readCLI design
Why there are no emoji in envsec's output
Why emoji break column alignment in terminals (wcwidth, East Asian Width, VS16, ZWJ) and the 27 geometric icons envsec uses instead.