#!/usr/bin/env bash
# Run from the checkout after starting its desktop dev server with T3CODE_DEV_SEED=0.
# Usage: bash seed.sh <new-workspace-directory>
set -euo pipefail
workspace=$1
mkdir -p "$workspace"
cp "$(dirname "$0")/viewport.html" "$workspace/index.html"
git -C "$workspace" init -q
git -C "$workspace" add index.html
git -C "$workspace" -c user.name=Proof -c user.email=proof@example.invalid commit -qm 'Synthetic viewport fixture'
node apps/server/src/bin.ts project add --base-dir .t3 --title 'Viewport proof' "$workspace"
# Use the returned project ID: node driver.cjs <base|head> <project-id> <new-output-directory>
