-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch-feedback-loop.command
More file actions
executable file
·268 lines (260 loc) · 12.1 KB
/
launch-feedback-loop.command
File metadata and controls
executable file
·268 lines (260 loc) · 12.1 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
#!/bin/bash
###############################################################################
# Feedback Loop - Mac Desktop Launcher
###############################################################################
# This script can be double-clicked from macOS Finder to launch feedback-loop
# Usage: Double-click this file from your desktop or any folder
# AUTO-GENERATED - Run scripts/update_launchers.py to regenerate
###############################################################################
# Change to the directory where this script is located
cd "$(dirname "$0")" || exit 1
# Clear the screen for a clean start
clear
echo "╔════════════════════════════════════════════════════════════════════╗"
echo "║ Feedback Loop Launcher ║"
echo "╚════════════════════════════════════════════════════════════════════╝"
echo ""
echo "📍 Current directory: $(pwd)"
echo ""
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "❌ Error: Python 3 is not installed or not in PATH"
echo ""
echo "Please install Python 3.8 or later:"
echo " • Download from: https://www.python.org/downloads/"
echo " • Or use Homebrew: brew install python3"
echo ""
echo "Press any key to exit..."
read -n 1 -s
exit 1
fi
# Display Python version
PYTHON_VERSION=$(python3 --version 2>&1)
echo "✓ Found: $PYTHON_VERSION"
echo ""
# Check if feedback-loop is installed
if ! python3 -c "import metrics" &> /dev/null; then
echo "⚠️ Feedback Loop not installed in current environment"
echo ""
echo "Would you like to install it now? (y/n)"
read -r response
if [[ "$response" =~ ^[Yy]$ ]]; then
echo ""
echo "Installing feedback-loop..."
python3 -m pip install -e . || {
echo ""
echo "❌ Installation failed"
echo "Press any key to exit..."
read -n 1 -s
exit 1
}
echo ""
echo "✓ Installation complete!"
echo ""
else
echo ""
echo "Cannot proceed without installation"
echo "Press any key to exit..."
read -n 1 -s
exit 1
fi
fi
# Main menu loop
while true; do
echo "════════════════════════════════════════════════════════════════════"
echo "Please select a tool to launch:"
echo "════════════════════════════════════════════════════════════════════"
echo ""
echo " ⭐) 🚀 QUICK START - One-click setup + demo + dashboard!"
echo ""
echo " 1) 💬 Chat - Interactive AI-powered chat for coding help"
echo " 2) 📊 Dashboard - View metrics and pattern insights"
echo " 3) 🩺 Doctor - Diagnose and fix common issues"
echo " 4) ⚙️ Setup - Configure feedback-loop for your project"
echo " 5) 🔧 Synthesize - Interactive Code Synthesizer"
echo " 6) 🎬 Demo - See patterns in action"
echo " 7) 📊 Superset Setup - Set up analytics dashboards"
echo " 8) 📚 Documentation - Open docs and guides"
echo " 9) 🚪 Exit"
echo ""
echo -n "Enter ⭐ for Quick Start, or 1-9: "
read -r choice
echo ""
case $choice in
"⭐"|"star"|"quick"|"start")
echo "🚀 Starting Quick Start Experience..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
echo "This will:"
echo " • Auto-setup feedback-loop if needed"
echo " • Launch an interactive demo"
echo " • Open the analytics dashboard in your browser"
echo ""
echo "Press Ctrl+C when you're done exploring!"
echo ""
python3 bin/fl-start
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Quick Start completed successfully"
else
echo "⚠️ Quick Start exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
1)
echo "🚀 Launching Chat..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 bin/fl-chat
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Chat exited successfully"
else
echo "⚠️ Chat exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
2)
echo "🚀 Launching Dashboard..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 bin/fl-dashboard
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Dashboard exited successfully"
else
echo "⚠️ Dashboard exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
3)
echo "🚀 Launching Doctor..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 bin/fl-doctor
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Doctor exited successfully"
else
echo "⚠️ Doctor exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
4)
echo "🚀 Launching Setup..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 bin/fl-setup
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Setup exited successfully"
else
echo "⚠️ Setup exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
5)
echo "🚀 Launching Synthesize..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 bin/fl-synthesize
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Synthesize exited successfully"
else
echo "⚠️ Synthesize exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
6)
echo "🚀 Running Demo..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 demo.py
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Demo completed successfully"
else
echo "⚠️ Demo exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
7)
echo "🚀 Launching Superset Quickstart..."
echo "════════════════════════════════════════════════════════════════════"
echo ""
python3 superset-dashboards/quickstart_superset.py
STATUS=$?
echo ""
echo "════════════════════════════════════════════════════════════════════"
if [ $STATUS -eq 0 ]; then
echo "✓ Superset setup completed successfully"
else
echo "⚠️ Superset setup exited with code: $STATUS"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
8)
echo "📚 Opening documentation..."
if command -v open &> /dev/null; then
open "https://github.com/doronpers/feedback-loop"
else
echo "Visit: https://github.com/doronpers/feedback-loop"
fi
echo ""
echo "Press any key to return to menu..."
read -n 1 -s
echo ""
;;
9)
echo "👋 Goodbye!"
echo ""
exit 0
;;
*)
echo "❌ Invalid choice. Please enter a number between 1 and 9."
echo ""
echo "Press any key to continue..."
read -n 1 -s
echo ""
;;
esac
done