Forum Discussion

andrea11's avatar
andrea11
New Contributor
2 months ago

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! ๐Ÿš€

 

2 Replies

  • oulipo's avatar
    oulipo
    New Contributor

    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

     

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