openv – A simple CLI tool to wrap commands with 1Password secrets from .env
Hey folks, 👋
I just released a new version of a small command-line tool I’ve been working on called openv.
💡 What it does:
It automatically wraps selected dev commands (like npm dev, pnpm run, etc.) with op run, if your project’s .env file contains op:// secrets from 1Password.
So instead of manually writing:
run --env-file=.env -- npm run dev
You can just type, as you would normally do:
npm run dev
And it will be wrapped automatically via a shell hook.
🧠 Why I built it:
This started as a personal tool because I kept forgetting to wrap my dev commands with op run, and I wanted a smoother experience that "just works" based on .env contents.
It hooks into ZSH (likely direnv), with support for allow/deny patterns (e.g., only wrap certain commands like pnpm start).
🛠️ Tech:
Written in Rust
Works in ZSH, Bash, and Fish
Installable via Homebrew
Fully local
🧪 Notes:
This is an early release, mainly developed for my personal use. I’m sharing it here in case others find it useful. Feedback, issues, or even feature ideas are very welcome — but no pressure!
GitHub: https://github.com/andrea11/openv
Thanks for reading — and happy coding! 🚀
