Monorepo for Aesthetic.Computer aesthetic.computer
at main 22 lines 583 B view raw
1#!/usr/bin/env fish 2# with-env.fish 3# Load environment variables from vault and run a command 4# Usage: ./with-env.fish node create-account.mjs auth0|12345 5 6set VAULT_ENV /workspaces/aesthetic-computer/aesthetic-computer-vault/at/.env 7 8if not test -f $VAULT_ENV 9 echo "❌ Vault env file not found: $VAULT_ENV" 10 exit 1 11end 12 13# Export all variables from the .env file 14for line in (cat $VAULT_ENV | grep -v '^#' | grep -v '^$') 15 set parts (string split -m 1 = $line) 16 if test (count $parts) -eq 2 17 set -gx $parts[1] $parts[2] 18 end 19end 20 21# Run the command 22eval $argv