Comparison
envsec vs dotenv vs 1Password CLI
Three approaches to managing secrets. One stores them in plaintext files, one locks them in the cloud, and one keeps them in your OS.
At a glance
* macOS and Windows only. Linux requires libsecret-tools and an active D-Bus session.
= partial support or requires additional setup.
envsec requires Node.js ≥ 22. dotenv supports Node.js ≥ 12. 1Password CLI is a standalone binary.
Migrate from dotenv in 60 seconds
Already using .env files? envsec imports them directly.
# Import your existing .env file
$ envsec -c myapp.dev load
✔ Done: 12 added, 0 overwritten, 0 skipped
# Keys are converted from UPPER_SNAKE_CASE to dotted.lowercase
# and stored in your OS credential store.
# The original .env file can be deleted.
# To generate a .env file at any time:
$ envsec -c myapp.dev env-file
Run your app with secrets injected
# Start a shell with all secrets as env vars
$ envsec -c myapp.dev shell
● envsec shell — context: myapp.dev (12 secrets loaded)
$ npm run dev
Or use the SDK — no .env file, no shell wrapper
import { loadSecrets } from "@envsec/sdk";
await loadSecrets({
context: "myapp.dev",
inject: true
});
import dotenv from "dotenv";
dotenv.config();
// reads plaintext .env
# inject via secret refs
op run -- node app.js
# or read a single secret
op read op://vault/item/key
Feature by feature
Secret storage
Encryption at rest
Secrets on disk
Git leak risk
Offline access
Account / subscription
Multi-environment
Secret search
Expiry & audit
Team sharing
Shell integration
Command runner
Interactive shell session
Saved commands
Move / copy / rename
Interactive TUI
Health diagnostics
Shell completions
SDK / programmatic access
Cross-platform
.env compatibility
Biometric auth
Three tools, three trade-offs
dotenv is the simplest approach — files on disk, zero setup. 1Password CLI is the most feature-rich for teams with cloud sync, RBAC, and audit logs — but requires a paid subscription. envsec sits in between: OS-native encryption with zero accounts, zero cloud dependencies, and a developer-focused workflow that goes beyond what .env files can do. It imports your existing .env files and can generate them on demand, so you keep full compatibility while gaining encryption, audit trails, and team sharing.