-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·91 lines (78 loc) · 2.67 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·91 lines (78 loc) · 2.67 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILL_NAME="next-slide"
SKILL_DIR="$HOME/.claude/skills/$SKILL_NAME"
echo "Next Slide Installer"
echo "===================="
echo ""
installed=false
# --- Claude Code ---
if [ -d "$HOME/.claude/skills" ]; then
echo "[1/3] Claude Code detected — installing skill..."
if [ -L "$SKILL_DIR" ]; then
echo " Removing existing symlink at $SKILL_DIR"
rm "$SKILL_DIR"
elif [ -d "$SKILL_DIR" ]; then
echo " Removing existing directory at $SKILL_DIR"
rm -rf "$SKILL_DIR"
fi
# Symlink so updates to the repo propagate automatically
ln -s "$SCRIPT_DIR" "$SKILL_DIR"
echo " Symlinked $SCRIPT_DIR -> $SKILL_DIR"
installed=true
else
echo "[1/3] Claude Code not found (no ~/.claude/skills/) — skipping."
fi
echo ""
# --- OpenClaw ---
if command -v clawhub &>/dev/null; then
echo "[2/3] OpenClaw detected — registering plugin..."
clawhub install "$SCRIPT_DIR"
installed=true
else
echo "[2/3] OpenClaw not found — skipping."
fi
# --- Hermes Agent ---
HERMES_SKILL_DIR="$HOME/.hermes/skills/$SKILL_NAME"
if [ -d "$HOME/.hermes/skills" ]; then
echo "[3/3] Hermes Agent detected — installing skill..."
if [ -L "$HERMES_SKILL_DIR" ]; then
echo " Removing existing symlink at $HERMES_SKILL_DIR"
rm "$HERMES_SKILL_DIR"
elif [ -d "$HERMES_SKILL_DIR" ]; then
echo " Removing existing directory at $HERMES_SKILL_DIR"
rm -rf "$HERMES_SKILL_DIR"
fi
# Hermes does NOT follow symlinks, so copy the directory contents
cp -R "$SCRIPT_DIR" "$HERMES_SKILL_DIR"
echo " Copied $SCRIPT_DIR -> $HERMES_SKILL_DIR"
echo " Note: Hermes uses a real copy (re-run install.sh after repo updates)"
installed=true
else
echo "[3/3] Hermes Agent not found (no ~/.hermes/skills/) — skipping."
fi
echo ""
if [ "$installed" = true ]; then
echo "Done! Next Slide is ready."
echo ""
echo "Usage:"
echo " - In Claude Code: say '/next-slide' or '帮我做个演示'"
echo " - In OpenClaw: the skill triggers on presentation-related prompts"
echo " - In Hermes: say '/next-slide' or describe a presentation you want"
echo ""
echo "50+ styles, zero dependencies, bilingual. 你的下个 ppt,何必是 PPT"
else
echo "None of Claude Code, OpenClaw, or Hermes Agent were detected."
echo ""
echo "To install manually for Claude Code:"
echo " mkdir -p ~/.claude/skills"
echo " cp -r $SCRIPT_DIR ~/.claude/skills/$SKILL_NAME"
echo ""
echo "To install manually for Hermes Agent:"
echo " mkdir -p ~/.hermes/skills"
echo " cp -r $SCRIPT_DIR ~/.hermes/skills/$SKILL_NAME"
echo ""
echo "To install via OpenClaw:"
echo " clawhub install next-slide"
fi