← back to Govarbitrage

scripts/run-digest.sh

20 lines

#!/bin/sh
# Wrapper for the twice-daily GovArbitrage opportunity digest (launchd-invoked).
# Reads George's credentials from their single canonical home (~/.claude.json)
# at runtime and exports them for this process only — never duplicated to disk.
set -e
cd "$(dirname "$0")/.."

# Pull GEORGE_URL + GEORGE_BASIC_AUTH from the george MCP env in ~/.claude.json.
eval "$(/usr/bin/python3 - <<'PY'
import json, os, shlex
p = os.path.expanduser("~/.claude.json")
env = json.load(open(p))["mcpServers"]["george"]["env"]
print("export GEORGE_URL=" + shlex.quote(env["GEORGE_URL"]))
print("export GEORGE_BASIC_AUTH=" + shlex.quote(env["GEORGE_BASIC_AUTH"]))
PY
)"

export PATH="/opt/homebrew/bin:/usr/bin:/bin:$PATH"
exec /opt/homebrew/bin/npx tsx scripts/send-digest.ts