-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·63 lines (55 loc) · 1.66 KB
/
Copy pathsetup
File metadata and controls
executable file
·63 lines (55 loc) · 1.66 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
62
63
#!/usr/bin/env bash
set -euo pipefail
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILL_NAME="pr-owl"
SKILL_DIR="$HOME/.claude/skills/$SKILL_NAME"
SKILL_SRC="$REPO_DIR/skills/SKILL.md"
echo "pr-owl setup"
echo "============"
# Install CLI tool
echo ""
echo "Installing pr-owl CLI..."
if command -v pr-owl &>/dev/null; then
echo " pr-owl already installed, reinstalling..."
uv tool install --force --reinstall --from "$REPO_DIR" pr-owl
else
uv tool install --reinstall --from "$REPO_DIR" pr-owl
fi
echo " ✓ pr-owl CLI installed"
# Install Claude Code skill
echo ""
echo "Installing Claude Code skill..."
mkdir -p "$SKILL_DIR"
if [ -L "$SKILL_DIR/SKILL.md" ]; then
existing="$(readlink "$SKILL_DIR/SKILL.md")"
if [ "$existing" = "$SKILL_SRC" ]; then
echo " ✓ Skill already linked (no change)"
else
ln -sf "$SKILL_SRC" "$SKILL_DIR/SKILL.md"
echo " ✓ Skill symlink updated (was: $existing)"
fi
elif [ -f "$SKILL_DIR/SKILL.md" ]; then
echo " ⚠ $SKILL_DIR/SKILL.md exists as a regular file, replacing with symlink"
ln -sf "$SKILL_SRC" "$SKILL_DIR/SKILL.md"
echo " ✓ Skill symlinked"
else
ln -sf "$SKILL_SRC" "$SKILL_DIR/SKILL.md"
echo " ✓ Skill symlinked"
fi
# Verify
echo ""
echo "Verifying..."
if command -v pr-owl &>/dev/null; then
echo " ✓ pr-owl CLI: $(which pr-owl)"
else
echo " ✗ pr-owl CLI not found on PATH"
exit 1
fi
if [ -L "$SKILL_DIR/SKILL.md" ]; then
echo " ✓ Skill: $SKILL_DIR/SKILL.md -> $(readlink "$SKILL_DIR/SKILL.md")"
else
echo " ✗ Skill symlink not found"
exit 1
fi
echo ""
echo "Done. Use /pr-owl in Claude Code or run 'pr-owl audit' from the terminal."