update(gpt-engineer)

This commit is contained in:
Jacob Heider 2023-10-10 11:34:59 -04:00
parent 804f1df132
commit ef47d55b43
No known key found for this signature in database
GPG key ID: 51E3FD0EE62677B6

View file

@ -1,14 +1,11 @@
#!/usr/bin/env -S tea bash
#---
# dependencies:
# charm.sh/gum: '*'
#---
#!/usr/bin/env -S pkgx +gum bash
# shellcheck shell=bash
set -eo pipefail
# attempt to get the key from the users shell rc files (if set)
if [ -z "$OPENAI_API_KEY" -a -n "$SHELL" ]; then
if [ -z "$OPENAI_API_KEY" ] && [ -n "$SHELL" ]; then
# shellcheck disable=SC2155,2016
export OPENAI_API_KEY="$(env -i "$SHELL" -ic 'echo $OPENAI_API_KEY')"
fi
@ -22,11 +19,12 @@ if [ -z "$OPENAI_API_KEY"]; then
GPT4 is recommended (but you gotta sign up for the
the [waitlist](https://openai.com/waitlist/gpt-4-api))
**this key will not be persisted by tea!**
**this key will not be persisted by pkgx!**
EoMD
echo # spacer
# shellcheck disable=SC2155
export OPENAI_API_KEY="$(gum input --placeholder 'key pls')"
fi