#!/usr/bin/env bash
# Real demos for P042 "How to Fix Claude Code Billing Your API Key Instead of Your Plan" (see demo_driver.py).
# Runs on the Mac (it needs this Mac's Claude Code login), from ~/key-lab outside this repo, with a FAKE key only.
set -euo pipefail
cd "$(dirname "$0")"
LAB="$HOME/key-lab"
rm -rf "$LAB"; mkdir -p "$LAB"
cp -R lab/. "$LAB/"
python3 -m pip install -q --target "$LAB/.pylib" pyte==0.8.2
trap 'rm -rf "$LAB"' EXIT
python3 demo_driver.py "$LAB"
