ralph-workplan/install.sh

40 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
# install.sh — install the ralph-workplan skill into ~/.claude/plugins/
#
# Usage:
# ./install.sh # install
# ./install.sh --uninstall # remove
set -euo pipefail
PLUGIN_NAME="ralph-workplan"
PLUGIN_SRC="$(cd "$(dirname "$0")/plugin" && pwd)"
PLUGIN_DEST="${HOME}/.claude/plugins/${PLUGIN_NAME}"
if [[ "${1:-}" == "--uninstall" ]]; then
if [[ -d "$PLUGIN_DEST" ]]; then
rm -rf "$PLUGIN_DEST"
echo "✅ Uninstalled: $PLUGIN_DEST"
else
echo " Not installed (nothing to remove)"
fi
exit 0
fi
# Install
mkdir -p "${PLUGIN_DEST}/scripts"
cp "${PLUGIN_SRC}/ralph-workplan.md" "${PLUGIN_DEST}/ralph-workplan.md"
cp "${PLUGIN_SRC}/scripts/check-done.sh" "${PLUGIN_DEST}/scripts/check-done.sh"
cp "${PLUGIN_SRC}/scripts/setup.sh" "${PLUGIN_DEST}/scripts/setup.sh"
chmod +x "${PLUGIN_DEST}/scripts/check-done.sh"
chmod +x "${PLUGIN_DEST}/scripts/setup.sh"
echo "✅ Installed: $PLUGIN_DEST"
echo ""
echo " Skill: /ralph-workplan <workplan-file> [--max-iterations N]"
echo " Spec: $(cd "$(dirname "$0")" && pwd)/workplan-spec.md"
echo ""
echo " Restart Claude Code for the skill to appear."