automate/020_openai.sh

13 lines
398 B
Bash

# DEST=${1:-/etc/skel}
DEST=${HOME}
OPENAI_API_KEY="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"
# Plugins that Use OPENAI_API_KEYs get called early so so we need to put them
# in .zshrc.pre-plugins.d so they can be loaded before the plugins are loaded.
cat <<-EOF | sudo tee "${DEST}"/.zshrc.pre-plugins.d/009_openai.sh
export OPENAI_API_KEY=${OPENAI_API_KEY}
EOF
pipx install openai