We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9822d22 commit bdc5757Copy full SHA for bdc5757
1 file changed
scripts/dspy/loop.sh
@@ -48,8 +48,10 @@ if [ ! -f "$DB_PATH" ]; then
48
fi
49
50
if [ -z "${ANTHROPIC_API_KEY:-}" ]; then
51
- # Try loading from .env
52
- if [ -f "$REPO_ROOT/.env" ]; then
+ # Try shell profile first, then .env
+ [ -f "$HOME/.bash_profile" ] && source "$HOME/.bash_profile" 2>/dev/null || true
53
+ [ -f "$HOME/.zprofile" ] && source "$HOME/.zprofile" 2>/dev/null || true
54
+ if [ -z "${ANTHROPIC_API_KEY:-}" ] && [ -f "$REPO_ROOT/.env" ]; then
55
export $(grep ANTHROPIC_API_KEY "$REPO_ROOT/.env" 2>/dev/null | head -1 | xargs) 2>/dev/null || true
56
57
0 commit comments