env: .env file for API keys (gitignored), loaded by scripts and resolve_provider; key removed from bashrc

This commit is contained in:
opencode
2026-08-08 20:20:40 +03:00
parent c33452edf8
commit 0dd2e21683
8 changed files with 69 additions and 1 deletions
+8
View File
@@ -3,6 +3,14 @@
# Usage: scripts/run_bridge.sh [port] (default 8765)
# Note: the bridge keeps running until interrupted (Ctrl-C).
set -euo pipefail
# Load API keys from the project .env file (if present)
if [ -f .env ]; then
set -a
# shellcheck disable=SC1091
. ./.env
set +a
fi
cd "$(dirname "$0")/.."
PORT="${1:-8765}"
+8
View File
@@ -3,6 +3,14 @@
# Open http://127.0.0.1:8000 to watch the capsule while you talk to it.
# Usage: scripts/run_chat.sh [--model gemma4:e2b]
set -euo pipefail
# Load API keys from the project .env file (if present)
if [ -f .env ]; then
set -a
# shellcheck disable=SC1091
. ./.env
set +a
fi
cd "$(dirname "$0")/.."
BRIDGE_PID=""
LIVE_PID=""
+8
View File
@@ -5,5 +5,13 @@
# scripts/run_demo.sh --agent scripted
# scripts/run_demo.sh --agent llm --model gemma4:e2b
set -euo pipefail
# Load API keys from the project .env file (if present)
if [ -f .env ]; then
set -a
# shellcheck disable=SC1091
. ./.env
set +a
fi
cd "$(dirname "$0")/.."
exec testbed/.venv/bin/python -m testbed.demo "$@"
+8
View File
@@ -3,6 +3,14 @@
# demo while you watch. Open http://127.0.0.1:8000 in a browser.
# Usage: scripts/run_live.sh [demo args...] e.g. --agent scripted
set -euo pipefail
# Load API keys from the project .env file (if present)
if [ -f .env ]; then
set -a
# shellcheck disable=SC1091
. ./.env
set +a
fi
cd "$(dirname "$0")/.."
BRIDGE_PID=""
LIVE_PID=""