-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
Β·133 lines (112 loc) Β· 4.95 KB
/
install.sh
File metadata and controls
executable file
Β·133 lines (112 loc) Β· 4.95 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
#!/usr/bin/env bash
set -euo pipefail
# Run with: /bin/bash -c "$(curl -fsSL http://remobi.app/install.sh)"
# The $() substitution downloads the script first, so stdin stays as the terminal.
# This is the same pattern Homebrew uses β TUI apps like claude need real terminal stdin.
# ββ Colours βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
setup_colours() {
if [[ -n "${NO_COLOR:-}" ]] || [[ ! -t 1 ]]; then
GREEN="" BLUE="" RED="" YELLOW="" DIM="" BOLD="" RESET=""
elif [[ "${COLORTERM:-}" == "truecolor" ]] || [[ "${COLORTERM:-}" == "24bit" ]]; then
GREEN=$'\033[38;2;166;227;161m'
BLUE=$'\033[38;2;137;180;250m'
RED=$'\033[38;2;243;139;168m'
YELLOW=$'\033[38;2;249;226;175m'
DIM=$'\033[38;2;108;112;134m'
BOLD=$'\033[1m'
RESET=$'\033[0m'
elif command -v tput >/dev/null 2>&1 && [[ "$(tput colors 2>/dev/null || echo 0)" -ge 256 ]]; then
GREEN=$'\033[38;5;151m'
BLUE=$'\033[38;5;111m'
RED=$'\033[38;5;211m'
YELLOW=$'\033[38;5;223m'
DIM=$'\033[38;5;243m'
BOLD=$'\033[1m'
RESET=$'\033[0m'
else
GREEN=$'\033[32m'
BLUE=$'\033[34m'
RED=$'\033[31m'
YELLOW=$'\033[33m'
DIM=$'\033[2m'
BOLD=$'\033[1m'
RESET=$'\033[0m'
fi
}
# ββ Formatting ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
info() { printf " %s>%s %s\n" "$BLUE" "$RESET" "$1"; }
success() { printf " %sβ%s %s\n" "$GREEN" "$RESET" "$1"; }
error() { printf " %sβ%s %s\n" "$RED" "$RESET" "$1" >&2; }
step() { printf "\n %s[%s/%s]%s %s\n" "$BOLD" "$1" "$2" "$RESET" "$3"; }
# ββ Logo ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
print_logo() {
local g="$GREEN" b="$BLUE" r="$RESET"
printf " %sβββββββ %s %sβββ%s\n" "$g" "$r" "$b" "$r"
printf " %sββββββββ%s %sββββ%s\n" "$g" "$r" "$b" "$r"
printf " %sββββββββ%s %sββββ%s\n" "$g" "$r" "$b" "$r"
printf " %sββββββββ%s %sββββ%s\n" "$g" "$r" "$b" "$r"
printf " %sβββ βββ%s %sββββ%s\n" "$g" "$r" "$b" "$r"
printf " %sβββ βββ%s %sβββ%s\n" "$g" "$r" "$b" "$r"
}
# ββ Main ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
setup_colours
echo ""
print_logo
echo ""
printf " %sremobi%s %sβ your terminal, everywhere%s\n" "$BOLD" "$RESET" "$DIM" "$RESET"
printf " %shttps://github.com/connorads/remobi%s\n" "$DIM" "$RESET"
echo ""
echo " This script will:"
echo " 1. Install the remobi setup skill"
echo " 2. Ask which coding agent you use"
echo " 3. Start an interactive setup session"
echo ""
read -r -p " Press Enter to continue..."
# ββ Step 1: Install the remobi setup skill ββββββββββββββββββββββββββββββββββββ
step 1 3 "Installing the remobi setup skill"
echo ""
npx skills add connorads/remobi
echo ""
success "Skill installed"
# ββ Step 2: Pick a coding agent βββββββββββββββββββββββββββββββββββββββββββββββ
step 2 3 "Choosing a coding agent"
echo ""
echo " Which coding agent do you use?"
echo ""
printf " %s1)%s Claude Code\n" "$BOLD" "$RESET"
printf " %s2)%s Codex\n" "$BOLD" "$RESET"
echo ""
printf " Choose %s[1-2]%s: " "$YELLOW" "$RESET"
read -r choice
case "$choice" in
1) agent="claude"; agent_name="Claude Code" ;;
2) agent="codex"; agent_name="Codex" ;;
*)
echo ""
error "Invalid choice β please enter 1 or 2"
exit 1
;;
esac
echo ""
success "Selected $agent_name"
# ββ Step 3: Launch setup session ββββββββββββββββββββββββββββββββββββββββββββββ
step 3 3 "Launching setup session"
if ! command -v "$agent" > /dev/null 2>&1; then
echo ""
error "'$agent' is not installed"
echo ""
info "Install it first:"
echo ""
case "$agent" in
claude) echo " curl -fsSL https://claude.ai/install.sh | bash" ;;
codex) echo " npm install -g @openai/codex" ;;
esac
echo ""
info "Then re-run this script."
exit 1
fi
echo ""
info "Starting $agent with the remobi-setup skill..."
echo ""
# exec replaces this shell with the agent process, giving it full terminal control
exec "$agent" "Use the remobi-setup skill to onboard me."