envchain alternatives for the macOS Keychain in 2026
By Maria Otworowska,
What envchain does well
envchain stores named sets of environment variables in the macOS Keychain and sets them only for the command you run:
$ envchain --set aws AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY$ envchain aws terraform plan
That one idea, keys in the Keychain and released per command, is still the right one. It's free, MIT licensed, and also works with the Secret Service on Linux.
Why people look for an alternative
- Rare releases. v1.1.0 shipped in April 2024. The release before it was v1.0.1 in June 2016. The README still lists OS X 10.11 and macOS 10.12 as confirmed.
- No sync. envchain uses the older SecKeychain API. Apple's TN3137 says those APIs always target the file-based keychain, and iCloud Keychain needs the data protection keychain. Set up a new Mac and you add every key again.
- No agent setup. It predates AI coding agents, so nothing tells Claude Code or Codex to use it, and nothing masks output.
The alternatives
| Tool | Command | Keychain API | Syncs between Macs | Agent features | Price |
|---|---|---|---|---|---|
| envchain | envchain aws cmd | SecKeychain (older) | No | None | Free, MIT |
| envchain-xtra | envchain aws cmd | SecItem | Not documented | Built to pair with agent sandboxes | Free, MIT |
| kcv | kcv --environment app exec -- cmd | Keychain, one item per environment | Not documented | None | Free, MIT |
| fidelius | accio app cmd | iCloud Keychain | Yes | Agent setup, masking | Free shared project, Pro $24 once |
| 1Password CLI | op run -- cmd | None, own vault | Yes | Output masking, MCP server, plugins | $3.99/mo billed annually |
envchain-xtra: the maintained fork
envchain-xtra describes itself as a "maintained envchain fork". It installs the same envchain command, and keeps the namespace model, so scripts that call envchain should carry over. Check it against your existing Keychain items before switching. It moves Keychain access to the modern SecItem path with hidden input on --set. It's aimed at people running coding agents, with companion tools for launch checks and sandboxing. Install it from its Homebrew tap. It's young: the repository started in April 2026 and its latest tag is v1.4.0 from September.
kcv: one Keychain item per project
kcv stores each environment as a single Keychain item, so one authorization can cover a whole project's retrieval, and its list command shows names without values. It's macOS only, written in Rust and installed with Cargo. Its first releases came out in August 2026.
fidelius: a Mac app on top of iCloud Keychain
fidelius keeps the envchain idea and adds what it never had: a Mac app to manage keys, sync through iCloud Keychain with Apple's end-to-end encryption, and setup for your agents. Namespaces become projects, and a shared project holds keys every project inherits:
$ accio myapp npm run dev$ accio list myapp
One menu item writes instructions into Claude Code, Codex and Gemini CLI, and when Claude Code or Codex runs accio, key values in the output come back concealed. Masking is best effort. It's Mac only, and Pro is $24 once after the free shared project.
Which to pick
- You like envchain and just want it maintained: envchain-xtra.
- You want a small CLI that stores each project as one Keychain item: kcv.
- You use more than one Mac, or want your agents set up for you: fidelius.
- You already pay for 1Password or need Linux and Windows too: 1Password CLI.