← Files get-fableARCHIVED FILE

hooks/git/post-checkout

457 Bytes · Oct 3, 2026 · 06:31 UTC

↓ Download file

#!/usr/bin/env bash
# get-fable post-checkout hook
# Restores situational awareness and outputs Spark next-move hint upon branch change

if [ ! -d ".fable" ]; then
  exit 0
fi

if command -v get-fable >/dev/null 2>&1; then
  CMD="get-fable"
elif [ -f "./bin/get-fable.js" ]; then
  CMD="bun ./bin/get-fable.js"
else
  exit 0
fi

SPARK_HINT=$($CMD spark 2>/dev/null)
if [ -n "$SPARK_HINT" ]; then
  echo "⚡ [fable-spark] Next move: $SPARK_HINT"
fi

exit 0

SHA-256: 47bd632fc834b70c4d71c7c8759afdf5fe83a6f40bf6b3aaf70ecf706f140d65