-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·56 lines (47 loc) · 1.59 KB
/
install.sh
File metadata and controls
executable file
·56 lines (47 loc) · 1.59 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
#!/bin/bash
# cursor-rules installer
# Installs custom Cursor IDE rules into your project
set -e
REPO_URL="https://raw.githubusercontent.com/denifilatoff/cursor-rules/main/.cursor/rules"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "Installing cursor-rules..."
# Check that we're in a git repository
if [ ! -d ".git" ]; then
echo -e "${RED}❌ Error: Run the script from the root of a git project${NC}"
exit 1
fi
# Create .cursor/rules directory if it doesn't exist
echo "Creating .cursor/rules directory..."
mkdir -p .cursor/rules
# Function to download a file
download_rule() {
local filename=$1
local url="${REPO_URL}/${filename}"
echo "⬇️ Downloading ${filename}..."
if curl -sf -o ".cursor/rules/${filename}" "${url}"; then
echo -e "${GREEN}✅ ${filename} installed${NC}"
else
echo -e "${RED}❌ Error downloading ${filename}${NC}"
return 1
fi
}
# Download rules
download_rule "mkdocs-init.mdc"
download_rule "mkdocs-examples.mdc"
download_rule "readme-update.mdc"
download_rule "adr-create.mdc"
download_rule "gh-issue-create.mdc"
echo ""
echo -e "${GREEN} cursor-rules successfully installed!${NC}"
echo ""
echo -e "${YELLOW} Restart Cursor --> Open a new chat${NC}"
echo ""
echo -e "${YELLOW} Usage:${NC}"
echo " @mkdocs-init create MkDocs setup for my project"
echo " @mkdocs-examples help include examples in documentation"
echo " @readme-update help to update readme.md"
echo " @adr-create Paste architecture decision description"
echo " @gh-issue-create describe your feature request or issue"