#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TARGET_BIN="${TARGET_BIN:-/usr/local/bin/bosunly}"

install -m 0755 "${ROOT_DIR}/bin/bosunly" "${TARGET_BIN}"

echo "Bosunly CLI installed."
echo "Next steps:"
echo "  bosunly login"
echo '  bosunly connect codex --as "backend"'
echo "Docs: https://bosunly.com/docs"
