SPB Git

Repository Public License

dev-key.sh 1.1 KB 17 lines shellscript

1#!/usr/bin/env bash2# Owner's development convenience (2026-11-22): stores the Anthropic development key that ORIX Astra's3# Scripts/smoke-env.sh loads into PRISM's own Keychain item, through the built PRISM app so the item belongs to PRISM.4# The key is never printed, written to disk or passed on a command line.5#   scripts/dev-key.sh [path/to/PRISM.app]     default: build/release/PRISM.app, then build/debug/PRISM.app6set -euo pipefail7cd "$(dirname "$0")/.."8APP="${1:-}"9[ -n "$APP" ] || { [ -d build/release/PRISM.app ] && APP=build/release/PRISM.app || APP=build/debug/PRISM.app; }10[ -x "$APP/Contents/MacOS/PRISM" ] || { echo "Build PRISM first (scripts/build.sh)." >&2; exit 1; }11ENV_SCRIPT="${ASTRA_SMOKE_ENV:-$HOME/Desktop/Cluster/apple/ORIXAstra/Scripts/smoke-env.sh}"12[ -f "$ENV_SCRIPT" ] || { echo "ORIX Astra's smoke-env.sh was not found at $ENV_SCRIPT." >&2; exit 1; }13# shellcheck disable=SC109014source "$ENV_SCRIPT" >/dev/null 2>&115[ -n "${ANTHROPIC_API_KEY:-}" ] || { echo "smoke-env.sh did not provide ANTHROPIC_API_KEY (is the cluster reachable?)." >&2; exit 1; }16printf %s "$ANTHROPIC_API_KEY" | "$APP/Contents/MacOS/PRISM" --store-key17
Files main
Menu

Theme