-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathrh
More file actions
executable file
·88 lines (85 loc) · 2.28 KB
/
Copy pathrh
File metadata and controls
executable file
·88 lines (85 loc) · 2.28 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
#!/bin/bash
# Rhesis CLI. Dispatch only — the commands live in scripts/rh/.
#
# The libs are sourced rather than executed so the command functions can cd,
# exec, install traps, and exit as they did when they all lived in this file.
RH_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts/rh"
# common.sh and ports.sh first: the others read SCRIPT_DIR and the ports at load time.
for rh_lib in common ports portalloc dev quickstart services help; do
# shellcheck source=/dev/null
source "$RH_LIB_DIR/$rh_lib.sh" || {
echo "❌ Failed to load scripts/rh/$rh_lib.sh" >&2
exit 1
}
done
unset rh_lib
case "$1" in
"start")
shift
start_all "$@"
;;
"stop")
stop_all
;;
"restart")
shift
restart_all "$@"
;;
"logs")
view_logs "$2"
;;
"delete")
delete_all
;;
"secrets")
generate_docker_secrets
;;
"dev")
case "$2" in
"init") dev_init ;;
"up") dev_up ;;
"down") dev_down ;;
"clean") dev_clean ;;
"status") dev_status ;;
"seed") seed_dev_resources ;;
"backend") start_backend ;;
"frontend") start_frontend ;;
"worker") start_worker ;;
"mock-llm") start_mock_llm ;;
"mock-chatbot") start_mock_chatbot ;;
"tmux") dev_tmux ;;
"chatbot") start_chatbot ;;
"docs") start_docs ;;
"polyphemus") start_polyphemus ;;
""|"help") show_dev_help ;;
*)
err "Unknown dev command: $2"
echo -e "${YELLOW}Run ${GREEN}./rh dev${NC}${YELLOW} for available commands${NC}"
exit 1
;;
esac
;;
"test")
case "$2" in
"frontend") test_frontend ;;
""|"help") show_test_help ;;
*)
err "Unknown test command: $2"
show_test_help
exit 1
;;
esac
;;
"worktree")
"$RH_LIB_DIR/worktree.sh" "${@:2}"
;;
"help"|"--help"|"-h"|"")
show_help
;;
*)
err "Unknown command: $1"
echo ""
show_help
exit 1
;;
esac