#!/usr/bin/env bash
# c-mage: print MAGE workspace status.
# MAGE (carl-mage) is an in-process Python library, not a docker stack,
# so there are no up/down/logs commands for it — CARE imports it directly.
# Use this script to jump-check the repo state.

set -euo pipefail

WORKSPACE="${CARE_WORKSPACE:-$HOME/Development/care-workspace}"
MAGE_DIR="$WORKSPACE/carl-mage"

if [ ! -d "$MAGE_DIR" ]; then
  echo "carl-mage not found at $MAGE_DIR" >&2
  echo "Run \`make prepare DIR=$WORKSPACE\` first." >&2
  exit 1
fi

echo "MAGE: $MAGE_DIR"
echo "Note: MAGE runs in-process inside CARE. No docker stack."
echo
git -C "$MAGE_DIR" status --short --branch
