This commands load .env file content into current shell.

[ -f .env ] && { set -a; source .env; set +a; }

This is also what I previously used. But this doesn’t support all usecases.

export $(cat .env | xargs)

Python
bash
terminal
My Custom Bash Scripts