Last active
March 27, 2026 06:42
-
-
Save davidlee/59f5ec80e02b5ce7ec61af21ac0bd747 to your computer and use it in GitHub Desktop.
1password environment .env socket to vercel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env zsh | |
| typeset -A seen | |
| envblob=$(<.env) | |
| for line in ${(f)envblob}; do | |
| [[ -z $line || $line = \#* ]] && continue | |
| k=${line%%=*} | |
| v=${line#*=} | |
| [[ -n ${seen[$k]} ]] && continue | |
| seen[$k]=1 | |
| printf %s "$v" | pnpx vercel env add "$k" production --sensitive --non-interactive | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment