-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset.sh
More file actions
executable file
·86 lines (74 loc) · 2.06 KB
/
reset.sh
File metadata and controls
executable file
·86 lines (74 loc) · 2.06 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
#!/usr/bin/env bash
# Reset/Uninstall Script for Warp Engine
RED='\033[0;31m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
NC='\033[0m'
echo -e "${YELLOW}⚠️ Warp Engine Reset/Cleanup Script${NC}"
echo ""
echo "This will remove:"
echo " - Virtual environment (.venv)"
echo " - Configuration file (.env)"
echo " - Generated agents (src/warpengine/agents/*)"
echo " - Agent binaries (bin/*)"
echo " - Data files (data/*)"
echo ""
echo -e "${RED}This action cannot be undone!${NC}"
echo ""
read -p "Are you sure you want to reset? (yes/no): " confirm
if [ "$confirm" != "yes" ]; then
echo -e "${GREEN}Reset cancelled.${NC}"
exit 0
fi
echo ""
echo -e "${CYAN}Cleaning up...${NC}"
# Remove virtual environment
if [ -d ".venv" ]; then
echo " - Removing virtual environment..."
rm -rf .venv
fi
# Backup .env if it exists
if [ -f ".env" ]; then
echo " - Backing up .env to .env.backup..."
cp .env .env.backup
rm .env
fi
# Clean generated agents
if [ -d "src/warpengine/agents" ]; then
echo " - Cleaning generated agents..."
find src/warpengine/agents -type f -name "*.py" -not -name "__init__.py" -delete
find src/warpengine/agents -type d -empty -delete
fi
# Clean binaries
if [ -d "bin" ]; then
echo " - Cleaning agent binaries..."
rm -f bin/*
fi
# Clean data but keep structure
if [ -d "data" ]; then
echo " - Cleaning data files..."
rm -f data/*.json
rm -f data/logs/*
rm -f data/knowledge/*
rm -f data/warp_drive/*
rm -f data/test_results/*
fi
# Remove Python cache
echo " - Removing Python cache..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
# Remove egg-info
if [ -d "src/warp_engine.egg-info" ]; then
echo " - Removing egg-info..."
rm -rf src/warp_engine.egg-info
fi
echo ""
echo -e "${GREEN}✅ Reset complete!${NC}"
echo ""
echo "To set up again, run:"
echo -e " ${YELLOW}./install.sh${NC}"
echo ""
if [ -f ".env.backup" ]; then
echo -e "${CYAN}Your API key was backed up to .env.backup${NC}"
fi