#!/bin/sh
set -e

# Resolve symlinks to find the real script location
SELF="$0"
while [ -L "$SELF" ]; do
  DIR="$(cd "$(dirname "$SELF")" && pwd)"
  SELF="$(readlink "$SELF")"
  case "$SELF" in /*) ;; *) SELF="$DIR/$SELF" ;; esac
done
SCRIPT_DIR="$(cd "$(dirname "$SELF")" && pwd)"
MAIN_TS="$SCRIPT_DIR/../src/cli/main.ts"

exec npx tsx "$MAIN_TS" "$@"
