-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (65 loc) · 2.75 KB
/
Copy pathMakefile
File metadata and controls
79 lines (65 loc) · 2.75 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
.PHONY: help server-install server-dev server-check android-check android-reverse android-unreverse android-ready app-install app-start app-android app-ios doctor
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SERVER_DIR := $(ROOT_DIR)/server
APP_DIR := $(ROOT_DIR)/app
BACKEND_PORT ?= 7860
BACKEND_URL ?= http://localhost:$(BACKEND_PORT)
help:
@echo "TalkThrough workspace commands:"
@echo " make doctor - quick status for backend + Android device"
@echo " make server-install - install backend dependencies with uv"
@echo " make server-dev - run the Pipecat backend in the foreground"
@echo " make server-check - verify the backend is responding"
@echo " make android-check - show connected Android devices"
@echo " make android-reverse - map device localhost:$(BACKEND_PORT) to your computer"
@echo " make android-unreverse - remove the localhost reverse mapping"
@echo " make android-ready - verify device + backend, then apply adb reverse"
@echo " make app-install - install Expo app dependencies"
@echo " make app-android - build/run the Android dev client"
@echo " make app-ios - build/run the iOS dev client"
@echo " make app-start - start Metro for the dev client"
server-install:
cd $(SERVER_DIR) && uv sync
server-dev:
cd $(SERVER_DIR) && uv run bot.py
server-check:
@echo "Checking backend at $(BACKEND_URL)/debug-client ..."
@curl -fsS $(BACKEND_URL)/debug-client >/dev/null \
&& echo "Backend is live at $(BACKEND_URL)" \
|| (echo "Backend is not responding. Start it with: make server-dev" && exit 1)
android-check:
@echo "Connected Android devices:"
@adb devices
android-reverse:
adb reverse tcp:$(BACKEND_PORT) tcp:$(BACKEND_PORT)
@echo "Android localhost:$(BACKEND_PORT) now points to your computer's localhost:$(BACKEND_PORT)"
android-unreverse:
adb reverse --remove tcp:$(BACKEND_PORT)
@echo "Removed Android reverse port mapping for $(BACKEND_PORT)"
android-ready: server-check android-check
@adb get-state >/dev/null 2>&1 \
&& $(MAKE) android-reverse \
&& echo "Android is ready. In the app, use server URL: http://localhost:$(BACKEND_PORT)" \
|| (echo "No Android device is ready. Connect a phone/emulator, then rerun make android-ready" && exit 1)
app-install:
cd $(APP_DIR) && npm install
app-start:
cd $(APP_DIR) && $(MAKE) start
app-android:
cd $(APP_DIR) && $(MAKE) android
app-ios:
cd $(APP_DIR) && $(MAKE) ios
doctor:
@echo ""
@echo "== Backend =="
@$(MAKE) --no-print-directory server-check || true
@echo ""
@echo "== Android =="
@adb devices || true
@echo ""
@echo "If backend is live and a device is connected, run:"
@echo " make android-ready"
@echo "Then either:"
@echo " make app-start"
@echo "or rebuild the app with:"
@echo " make app-android"