-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-cursor.sh
More file actions
executable file
·77 lines (70 loc) · 1.95 KB
/
install-cursor.sh
File metadata and controls
executable file
·77 lines (70 loc) · 1.95 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
#!/bin/bash
# EVM Cortex installer for Cursor IDE
# Copies skills to project and sets up .cursor/rules
set -e
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
TARGET_DIR="${1:-.}"
ADDED=0
SKIPPED=0
echo "EVM Cortex installer for Cursor IDE"
echo "========================================="
echo ""
echo "Target project: $(cd "$TARGET_DIR" && pwd)"
echo ""
echo "This will install:"
echo " - .cursor/rules/*.mdc (6 rule files)"
echo " - AGENTS.md (project instructions)"
echo ""
read -p "Continue? (y/N) " -n 1 -r
echo
[[ $REPLY =~ ^[Yy]$ ]] || exit 0
# Copy .cursor/rules
echo ""
echo "Installing Cursor rules..."
mkdir -p "$TARGET_DIR/.cursor/rules"
for f in "$REPO_DIR/.cursor/rules/"*.mdc; do
name=$(basename "$f")
if [ ! -e "$TARGET_DIR/.cursor/rules/$name" ]; then
cp "$f" "$TARGET_DIR/.cursor/rules/$name"
ADDED=$((ADDED + 1))
else
SKIPPED=$((SKIPPED + 1))
fi
done
# Copy AGENTS.md
if [ ! -e "$TARGET_DIR/AGENTS.md" ]; then
cp "$REPO_DIR/AGENTS.md" "$TARGET_DIR/AGENTS.md"
ADDED=$((ADDED + 1))
echo "Copied AGENTS.md"
else
SKIPPED=$((SKIPPED + 1))
fi
# Optionally copy skills to project
echo ""
read -p "Also copy skills to project? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Copying skills..."
mkdir -p "$TARGET_DIR/.cursor/skills"
for d in "$REPO_DIR/skills/"*/; do
name=$(basename "$d")
[ "$name" = "*" ] && continue
if [ ! -e "$TARGET_DIR/.cursor/skills/$name" ]; then
cp -r "$d" "$TARGET_DIR/.cursor/skills/$name"
ADDED=$((ADDED + 1))
else
SKIPPED=$((SKIPPED + 1))
fi
done
fi
echo ""
echo "Installation complete!"
echo " Added: $ADDED files"
echo " Skipped: $SKIPPED files (already existed)"
echo ""
echo " Rules: $(ls "$TARGET_DIR/.cursor/rules/"*.mdc 2>/dev/null | wc -l | tr -d ' ') .mdc files"
echo ""
echo "Usage:"
echo " Open your project in Cursor IDE"
echo " Rules will auto-apply based on file patterns"
echo ' Use @ruleName in chat to manually invoke a rule'