#!/usr/bin/env bash set -euo pipefail SPACE_ID="${1:-}" if [[ -z "${SPACE_ID}" ]]; then echo "usage: $0 " >&2 exit 2 fi if ! command -v hf >/dev/null 2>&1; then echo "hf CLI not found. Install with: curl -LsSf https://hf.co/cli/install.sh | bash -s" >&2 exit 2 fi hf auth whoami >/dev/null hf repos create "${SPACE_ID}" --type space --space-sdk docker --exist-ok hf upload "${SPACE_ID}" "$(dirname "$0")" --type space