#!/bin/sh
# sternway-cli: the Sternway command line (talks to the running app; see `sternway-cli help`). Runs with Node.js 18
# or later from PATH. Link it into a folder on PATH to use it anywhere, e.g. ln -s <this file> ~/.local/bin/
self=$(readlink -f "$0" 2>/dev/null || printf '%s' "$0")
if ! command -v node >/dev/null 2>&1; then
  echo "sternway-cli needs Node.js 18 or later on PATH" >&2
  exit 4
fi
exec node "$(dirname "$self")/sternway-cli.mjs" "$@"
