24 lines
504 B
Bash
Executable File
24 lines
504 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
if [ -z "${DEEPSEEK_API_KEY:-}" ]; then
|
|
DEEPSEEK_API_KEY="$(python3 - <<'PY'
|
|
import os
|
|
try:
|
|
import yaml
|
|
d = yaml.safe_load(open(os.path.expanduser('~/.dsh/.credentials.yaml')))
|
|
print((d.get('refs') or {}).get('DEEPSEEK_API_KEY', ''))
|
|
except Exception:
|
|
print('')
|
|
PY
|
|
)"
|
|
export DEEPSEEK_API_KEY
|
|
fi
|
|
|
|
if [ -z "${DEEPSEEK_API_KEY}" ]; then
|
|
echo "no DEEPSEEK_API_KEY — the choir will run in local mode"
|
|
fi
|
|
|
|
exec node server.js
|