Instead of always running source .env
before running yarn
, you can add your dev secrets like NPM_TOKEN
or OPEN_AI_API_KEY
to a global dev environmental variable file on your machine (e.g. dev.env
) then add this to your .bashrc
to source it on startup:
# dev.env
export NPM_TOKEN=<create one in npm settings>
# bashrc
source ~/dev.env
Remember to source .bashrc in .bash_profile:
# bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi