#!/bin/bash
# yapbox — thin DEV wrapper around the package console entry point.
#
# Repo-dev and pip users share ONE CLI: yapbox.cli. This wrapper just execs the
# repo venv's python at that module, so `bin/yapbox up` in a checkout behaves
# exactly like the installed `yapbox` console script does for a pip user. All
# command logic (up/down/status/mute/cancel/test/demo/setup/provision), the
# mock-safe posture, and the run-dir defaults live in yapbox.cli — never here.
set -eo pipefail

REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
PY="$REPO/.venv/bin/python"

if [[ ! -x "$PY" ]]; then
  echo "yapbox: venv python missing at $PY (run: uv sync)" >&2
  exit 1
fi

exec "$PY" -m yapbox.cli "$@"
