-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·97 lines (83 loc) · 2.51 KB
/
install.sh
File metadata and controls
executable file
·97 lines (83 loc) · 2.51 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
92
93
94
95
96
97
#!/usr/bin/env bash
# install.sh — Quick installer for nodejs-security-audit skill
# Usage: bash <(curl -fsSL https://raw.githubusercontent.com/Grenguar/node-aws-security-audit/main/install.sh)
set -euo pipefail
REPO="https://github.com/Grenguar/node-aws-security-audit.git"
SKILL_NAME="nodejs-security-audit"
echo ""
echo " Node.js Security Audit Skill — Installer"
echo " by Soroka Tech"
echo " ──────────────────────────────────────────"
echo ""
# Detect available agents
AGENTS=()
PATHS=()
if [ -d "$HOME/.claude" ]; then
AGENTS+=("Claude Code")
PATHS+=("$HOME/.claude/skills/$SKILL_NAME")
fi
if [ -d "$HOME/.cursor" ]; then
AGENTS+=("Cursor")
PATHS+=("$HOME/.cursor/skills/$SKILL_NAME")
fi
if [ -d "$HOME/.agents" ]; then
AGENTS+=("Codex")
PATHS+=("$HOME/.agents/skills/$SKILL_NAME")
fi
if [ -d "$HOME/.codeium/windsurf" ]; then
AGENTS+=("Windsurf")
PATHS+=("$HOME/.codeium/windsurf/skills/$SKILL_NAME")
fi
if [ ${#AGENTS[@]} -eq 0 ]; then
echo " No supported AI agents detected."
echo " Installing to Claude Code default location..."
AGENTS=("Claude Code")
PATHS=("$HOME/.claude/skills/$SKILL_NAME")
fi
echo " Detected agents:"
for i in "${!AGENTS[@]}"; do
echo " [$((i+1))] ${AGENTS[$i]} -> ${PATHS[$i]}"
done
echo " [a] All detected agents"
echo ""
read -rp " Install to which agent? [a]: " choice
choice="${choice:-a}"
install_skill() {
local dest="$1"
local agent="$2"
if [ -d "$dest" ]; then
echo " Updating existing installation at $dest..."
(cd "$dest" && git pull --ff-only 2>/dev/null) || {
echo " Could not pull updates. Removing and re-cloning..."
rm -rf "$dest"
git clone --depth 1 "$REPO" "$dest"
}
else
mkdir -p "$(dirname "$dest")"
git clone --depth 1 "$REPO" "$dest"
fi
chmod +x "$dest/scripts/"*.sh 2>/dev/null || true
echo " Installed to $agent: $dest"
}
echo ""
if [ "$choice" = "a" ]; then
for i in "${!AGENTS[@]}"; do
install_skill "${PATHS[$i]}" "${AGENTS[$i]}"
done
else
idx=$((choice - 1))
if [ "$idx" -ge 0 ] && [ "$idx" -lt ${#AGENTS[@]} ]; then
install_skill "${PATHS[$idx]}" "${AGENTS[$idx]}"
else
echo " Invalid choice. Exiting."
exit 1
fi
fi
echo ""
echo " Done! To run an audit, open your agent and type:"
echo ""
echo " > audit my project for security vulnerabilities"
echo ""
echo " Learn more: https://github.com/Grenguar/node-aws-security-audit"
echo " Soroka Tech: https://soroka.tech"
echo ""