Skip to main content
andrea11
July 22, 2025
Question

openv – A simple CLI tool to wrap commands with 1Password secrets from .env

  • July 22, 2025
  • 2 replies
  • 247 views

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! 🚀

 

2 replies

July 22, 2025

Hi @andrea11 ,

What a great idea! I like how you can set it up to wrap commands globally (instead of per project). Super cool and thank you for sharing it with the rest of the community. 

If you have any questions or need some help, let us know :D

Phil & the 1Password Team!

August 17, 2025

Cool project!

I would probably be wary of adding too many "magic wrappers", because once things go south, you're at a loss of why/where to look for, if it's not transparent