-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·85 lines (70 loc) · 2.98 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·85 lines (70 loc) · 2.98 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
#!/usr/bin/env bash
set -euo pipefail
# Creo Installer
# Wraps everything in main() to prevent partial execution on network failure
main() {
SKILL_DIR="${HOME}/.claude/skills/creo"
AGENT_DIR="${HOME}/.claude/agents"
REPO_URL="https://github.com/oyusypenko/creo"
echo "════════════════════════════════════════"
echo "║ Creo — Installer ║"
echo "║ Design & Development Toolkit ║"
echo "════════════════════════════════════════"
echo ""
# Check prerequisites
command -v git >/dev/null 2>&1 || { echo "✗ Git is required but not installed."; exit 1; }
echo "✓ Git detected"
# Create directories
mkdir -p "${SKILL_DIR}"
mkdir -p "${AGENT_DIR}"
# Clone to temp
TEMP_DIR=$(mktemp -d)
trap "rm -rf ${TEMP_DIR}" EXIT
echo "↓ Downloading Creo..."
git clone --depth 1 "${REPO_URL}" "${TEMP_DIR}/creo" 2>/dev/null
# Copy main skill files (creo/SKILL.md + creo/references/)
echo "→ Installing skill files..."
cp -r "${TEMP_DIR}/creo/creo/"* "${SKILL_DIR}/"
# Copy sub-skills
if [ -d "${TEMP_DIR}/creo/skills" ]; then
for skill_dir in "${TEMP_DIR}/creo/skills"/*/; do
skill_name=$(basename "${skill_dir}")
target="${HOME}/.claude/skills/${skill_name}"
mkdir -p "${target}"
cp -r "${skill_dir}"* "${target}/"
done
fi
# Copy agents
echo "→ Installing subagents..."
cp -r "${TEMP_DIR}/creo/agents/"*.md "${AGENT_DIR}/" 2>/dev/null || true
# Copy docs
if [ -d "${TEMP_DIR}/creo/docs" ]; then
mkdir -p "${SKILL_DIR}/docs"
cp -r "${TEMP_DIR}/creo/docs/"* "${SKILL_DIR}/docs/"
fi
# Copy update scripts alongside the skill so users can run them without re-cloning
for s in update.sh update-check.sh; do
if [ -f "${TEMP_DIR}/creo/${s}" ]; then
cp "${TEMP_DIR}/creo/${s}" "${SKILL_DIR}/${s}"
chmod +x "${SKILL_DIR}/${s}"
fi
done
# Stamp installed commit SHA + timestamp (used by update-check)
INSTALLED_SHA=$(cd "${TEMP_DIR}/creo" && git rev-parse HEAD 2>/dev/null || echo "unknown")
echo "${INSTALLED_SHA}" > "${SKILL_DIR}/.version"
date -u +"%Y-%m-%dT%H:%M:%SZ" > "${SKILL_DIR}/.installed-at"
echo ""
echo "✓ Creo installed successfully! (${INSTALLED_SHA:0:7})"
echo ""
echo "Usage:"
echo " 1. Start Claude Code: claude"
echo " 2. Run commands: /creo design-review http://localhost:3000"
echo ""
echo "Optional extensions:"
echo " Image Generation: ./extensions/image-generation/install.sh"
echo " i18n Translator: ./extensions/i18n-translator/install.sh"
echo " GSC Analyzer: ./extensions/gsc-analyzer/install.sh"
echo ""
echo "To uninstall: curl -fsSL ${REPO_URL}/raw/main/uninstall.sh | bash"
}
main "$@"