-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·60 lines (50 loc) · 1.46 KB
/
install.sh
File metadata and controls
executable file
·60 lines (50 loc) · 1.46 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
#!/bin/bash
echo "🚀 Installation de PromptForge..."
echo ""
# Couleurs
GREEN='\033[0;32m'
BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Vérification Node.js
echo "📦 Vérification des prérequis..."
if ! command -v node &> /dev/null; then
echo -e "${RED}❌ Node.js n'est pas installé${NC}"
echo "Installe Node.js 18+ depuis https://nodejs.org"
exit 1
fi
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo -e "${RED}❌ Node.js version 18+ requis (actuellement: $(node -v))${NC}"
exit 1
fi
echo -e "${GREEN}✓ Node.js $(node -v)${NC}"
# Installation dépendances
echo ""
echo "📥 Installation des dépendances..."
npm install
if [ $? -ne 0 ]; then
echo -e "${RED}❌ Erreur lors de l'installation${NC}"
exit 1
fi
echo -e "${GREEN}✓ Dépendances installées${NC}"
# Configuration .env
echo ""
if [ ! -f .env.local ]; then
echo "⚙️ Configuration de l'environnement..."
cp .env.example .env.local
echo -e "${BLUE}📝 Édite .env.local et ajoute ta clé API OpenAI${NC}"
else
echo -e "${GREEN}✓ .env.local existe déjà${NC}"
fi
# Succès
echo ""
echo -e "${GREEN}🎉 Installation terminée !${NC}"
echo ""
echo "Prochaines étapes :"
echo -e "1. Édite ${BLUE}.env.local${NC} et ajoute ta clé API"
echo -e "2. Lance ${BLUE}npm run dev${NC}"
echo -e "3. Ouvre ${BLUE}http://localhost:3000${NC}"
echo ""
echo "📚 Documentation : ./docs/QUICK_START.md"
echo ""