#!/usr/bin/env node
// Entry point for the `appostle` CLI binary that ships inside
// appostle-installer. Same node version gate as appostle-installer.
const [major, minor] = process.versions.node.split(".").map(Number);
if (major < 20 || (major === 20 && minor < 12)) {
  console.error(
    `\n  appostle requires Node.js >= 20.12.0` +
      `\n  Detected: ${process.versions.node}` +
      `\n` +
      `\n  Upgrade via your OS package manager, or install Node 22 LTS:` +
      `\n    macOS:   brew install node@22` +
      `\n    Linux:   curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs` +
      `\n    Windows: https://nodejs.org/en/download` +
      `\n`,
  );
  process.exit(1);
}

import("../dist/appostle.js");
