Skip to content

Commit d2278aa

Browse files
committed
docs: beautify install script with colours and ASCII art logo
- Box-drawing R> logo in catppuccin mocha green/blue - Colour support: truecolour β†’ 256 β†’ basic ANSI β†’ NO_COLOR - Formatted step progress [1/3], βœ“ success, βœ— error, > info - Structured output with visual hierarchy
1 parent d4106a2 commit d2278aa

1 file changed

Lines changed: 93 additions & 26 deletions

File tree

β€Žinstall.shβ€Ž

Lines changed: 93 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,128 @@ set -euo pipefail
55
# The $() substitution downloads the script first, so stdin stays as the terminal.
66
# This is the same pattern Homebrew uses β€” TUI apps like claude need real terminal stdin.
77

8+
# ── Colours ───────────────────────────────────────────────────────────────────
9+
10+
setup_colours() {
11+
if [[ -n "${NO_COLOR:-}" ]] || [[ ! -t 1 ]]; then
12+
GREEN="" BLUE="" RED="" YELLOW="" DIM="" BOLD="" RESET=""
13+
elif [[ "${COLORTERM:-}" == "truecolor" ]] || [[ "${COLORTERM:-}" == "24bit" ]]; then
14+
GREEN=$'\033[38;2;166;227;161m'
15+
BLUE=$'\033[38;2;137;180;250m'
16+
RED=$'\033[38;2;243;139;168m'
17+
YELLOW=$'\033[38;2;249;226;175m'
18+
DIM=$'\033[38;2;108;112;134m'
19+
BOLD=$'\033[1m'
20+
RESET=$'\033[0m'
21+
elif command -v tput >/dev/null 2>&1 && [[ "$(tput colors 2>/dev/null || echo 0)" -ge 256 ]]; then
22+
GREEN=$'\033[38;5;151m'
23+
BLUE=$'\033[38;5;111m'
24+
RED=$'\033[38;5;211m'
25+
YELLOW=$'\033[38;5;223m'
26+
DIM=$'\033[38;5;243m'
27+
BOLD=$'\033[1m'
28+
RESET=$'\033[0m'
29+
else
30+
GREEN=$'\033[32m'
31+
BLUE=$'\033[34m'
32+
RED=$'\033[31m'
33+
YELLOW=$'\033[33m'
34+
DIM=$'\033[2m'
35+
BOLD=$'\033[1m'
36+
RESET=$'\033[0m'
37+
fi
38+
}
39+
40+
# ── Formatting ────────────────────────────────────────────────────────────────
41+
42+
info() { printf " %s>%s %s\n" "$BLUE" "$RESET" "$1"; }
43+
success() { printf " %sβœ“%s %s\n" "$GREEN" "$RESET" "$1"; }
44+
error() { printf " %sβœ—%s %s\n" "$RED" "$RESET" "$1" >&2; }
45+
step() { printf "\n %s[%s/%s]%s %s\n" "$BOLD" "$1" "$2" "$RESET" "$3"; }
46+
47+
# ── Logo ──────────────────────────────────────────────────────────────────────
48+
49+
print_logo() {
50+
local g="$GREEN" b="$BLUE" r="$RESET"
51+
printf " %sβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— %s %sβ–ˆβ–ˆβ•—%s\n" "$g" "$r" "$b" "$r"
52+
printf " %sβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—%s %sβ•šβ–ˆβ–ˆβ•—%s\n" "$g" "$r" "$b" "$r"
53+
printf " %sβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•%s %sβ•šβ–ˆβ–ˆβ•—%s\n" "$g" "$r" "$b" "$r"
54+
printf " %sβ–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—%s %sβ–ˆβ–ˆβ•”β•%s\n" "$g" "$r" "$b" "$r"
55+
printf " %sβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘%s %sβ–ˆβ–ˆβ•”β•%s\n" "$g" "$r" "$b" "$r"
56+
printf " %sβ•šβ•β• β•šβ•β•%s %sβ•šβ•β•%s\n" "$g" "$r" "$b" "$r"
57+
}
58+
59+
# ── Main ──────────────────────────────────────────────────────────────────────
60+
61+
setup_colours
62+
63+
echo ""
64+
print_logo
865
echo ""
9-
echo " remobi β€” your terminal, everywhere"
10-
echo " https://github.com/connorads/remobi"
66+
printf " %sremobi%s %sβ€” your terminal, everywhere%s\n" "$BOLD" "$RESET" "$DIM" "$RESET"
67+
printf " %shttps://github.com/connorads/remobi%s\n" "$DIM" "$RESET"
1168
echo ""
12-
echo " This script will:"
13-
echo " 1. Install the remobi setup skill (via npx skills)"
14-
echo " 2. Ask which coding agent you use"
15-
echo " 3. Start an interactive agent session that walks you through setup"
69+
echo " This script will:"
70+
echo " 1. Install the remobi setup skill"
71+
echo " 2. Ask which coding agent you use"
72+
echo " 3. Start an interactive setup session"
1673
echo ""
17-
read -r -p "Press Enter to continue..."
74+
read -r -p " Press Enter to continue..."
1875

19-
# ── Install the remobi-setup skill ──────────────────────────────────────────
76+
# ── Step 1: Install the remobi setup skill ────────────────────────────────────
2077

21-
echo ""
22-
echo "Installing the remobi setup skill..."
78+
step 1 3 "Installing the remobi setup skill"
2379
echo ""
2480
npx skills add connorads/remobi
2581
echo ""
82+
success "Skill installed"
2683

27-
# ── Pick a coding agent ─────────────────────────────────────────────────────
84+
# ── Step 2: Pick a coding agent ───────────────────────────────────────────────
2885

29-
echo "Which coding agent do you use?"
30-
echo " 1) Claude Code"
31-
echo " 2) Codex"
32-
printf "Choose [1-2]: "
86+
step 2 3 "Choosing a coding agent"
87+
echo ""
88+
echo " Which coding agent do you use?"
89+
echo ""
90+
printf " %s1)%s Claude Code\n" "$BOLD" "$RESET"
91+
printf " %s2)%s Codex\n" "$BOLD" "$RESET"
92+
echo ""
93+
printf " Choose %s[1-2]%s: " "$YELLOW" "$RESET"
3394
read -r choice
3495

3596
case "$choice" in
36-
1) agent="claude" ;;
37-
2) agent="codex" ;;
97+
1) agent="claude"; agent_name="Claude Code" ;;
98+
2) agent="codex"; agent_name="Codex" ;;
3899
*)
39-
echo "Invalid choice. Exiting."
100+
echo ""
101+
error "Invalid choice β€” please enter 1 or 2"
40102
exit 1
41103
;;
42104
esac
43105

44-
# ── Check the agent is installed ────────────────────────────────────────────
106+
echo ""
107+
success "Selected $agent_name"
108+
109+
# ── Step 3: Launch setup session ──────────────────────────────────────────────
110+
111+
step 3 3 "Launching setup session"
45112

46113
if ! command -v "$agent" > /dev/null 2>&1; then
47114
echo ""
48-
echo "Error: '$agent' is not installed."
115+
error "'$agent' is not installed"
116+
echo ""
117+
info "Install it first:"
49118
echo ""
50119
case "$agent" in
51-
claude) echo " curl -fsSL https://claude.ai/install.sh | bash" ;;
52-
codex) echo " npm install -g @openai/codex" ;;
120+
claude) echo " curl -fsSL https://claude.ai/install.sh | bash" ;;
121+
codex) echo " npm install -g @openai/codex" ;;
53122
esac
54123
echo ""
55-
echo "Install it, then re-run this script."
124+
info "Then re-run this script."
56125
exit 1
57126
fi
58127

59-
# ── Launch interactive setup session ────────────────────────────────────────
60-
61128
echo ""
62-
echo "Starting $agent with the remobi-setup skill..."
129+
info "Starting $agent with the remobi-setup skill..."
63130
echo ""
64131

65132
# exec replaces this shell with the agent process, giving it full terminal control

0 commit comments

Comments
Β (0)