-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·61 lines (51 loc) · 1.54 KB
/
Copy pathuninstall.sh
File metadata and controls
executable file
·61 lines (51 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# uninstall.sh — Remove claude-prism commands and scripts
set -euo pipefail
CLAUDE_DIR="$HOME/.claude"
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m'
ok() { echo -e " ${GREEN}✓${NC} $*"; }
warn() { echo -e " ${YELLOW}⚠${NC} $*"; }
# Keep in sync with install.sh LEGACY_COMMANDS
LEGACY_COMMANDS=(ask-codex ask-gemini code-review multi-review research ui-design ui-review)
SCRIPTS=(call-codex.sh call-gemini.sh detect-domain.sh)
echo ""
echo "Uninstalling claude-prism..."
echo ""
# Dynamically discover installed pi-* commands (avoids hardcoded list drift)
echo "Removing commands..."
removed=0
for target in "$CLAUDE_DIR"/commands/pi-*.md; do
[[ -f "$target" ]] || continue
name="$(basename "$target" .md)"
rm "$target"
ok "Removed /$name"
removed=$((removed + 1))
done
[[ $removed -eq 0 ]] && warn "No pi-* commands found"
# Clean up legacy (pre-v0.7) unprefixed commands if present
for cmd in "${LEGACY_COMMANDS[@]}"; do
target="$CLAUDE_DIR/commands/$cmd.md"
if [[ -f "$target" ]]; then
rm "$target"
ok "Removed legacy /$cmd"
fi
done
echo ""
echo "Removing scripts..."
for script in "${SCRIPTS[@]}"; do
target="$CLAUDE_DIR/scripts/$script"
if [[ -f "$target" ]]; then
rm "$target"
ok "Removed $script"
else
warn "$script not found (skipped)"
fi
done
echo ""
echo -e "${GREEN}Uninstall complete.${NC}"
echo ""
echo "Note: Log file at $CLAUDE_DIR/logs/multi-ai.log was preserved."
echo " Delete manually if no longer needed."
echo ""