Files
obelisk/install.sh
T
tommy0103 90191e4604 feat(cli): extract Obelisk runtime into npm package
Add @obelisk-apps/cli with the existing build, search, query, and attune contract plus official skill installation.

Separate the docs-only skill artifact, bootstrap installer, release layout, cross-platform CI, and package-level regression coverage.
2026-07-16 17:26:23 +08:00

32 lines
857 B
Bash
Executable File

#!/bin/sh
set -eu
PACKAGE='@obelisk-apps/cli'
if ! command -v node >/dev/null 2>&1; then
echo 'Obelisk requires Node.js 22.13 or newer.' >&2
exit 1
fi
if ! node -e "const [major, minor] = process.versions.node.split('.').map(Number); process.exit(major > 22 || (major === 22 && minor >= 13) ? 0 : 1)"; then
echo 'Obelisk requires Node.js 22.13 or newer.' >&2
exit 1
fi
if ! command -v npm >/dev/null 2>&1; then
echo 'Obelisk installation requires npm.' >&2
exit 1
fi
echo "Installing ${PACKAGE}..."
npm install --global "$PACKAGE"
if ! command -v obelisk >/dev/null 2>&1; then
echo 'The CLI was installed, but `obelisk` is not on PATH.' >&2
echo 'Add the npm global bin directory to PATH, then run `obelisk --version`.' >&2
exit 1
fi
obelisk --version
echo 'Obelisk CLI installed. Run `obelisk install` to install the agent skill.'