@@ -5,15 +5,143 @@ set -e
55# Usage: curl -fsSL https://clawd.bot/install.sh | bash
66
77BOLD=' \033[1m'
8- GREEN=' \033[0;32m'
9- YELLOW=' \033[0;33m'
10- RED=' \033[0;31m'
11- CYAN=' \033[0;36m'
8+ ACCENT=' \033[38;2;255;90;45m'
9+ ACCENT_BRIGHT=' \033[38;2;255;122;61m'
10+ ACCENT_DIM=' \033[38;2;209;74;34m'
11+ INFO=' \033[38;2;255;138;91m'
12+ SUCCESS=' \033[38;2;47;191;113m'
13+ WARN=' \033[38;2;255;176;32m'
14+ ERROR=' \033[38;2;226;61;45m'
15+ MUTED=' \033[38;2;139;127;119m'
1216NC=' \033[0m' # No Color
1317
14- echo -e " ${CYAN}${BOLD} "
18+ DEFAULT_TAGLINE=" All your chats, one Clawdbot."
19+
20+ TAGLINES=()
21+ TAGLINES+=(" Your terminal just grew claws—type something and let the bot pinch the busywork." )
22+ TAGLINES+=(" Welcome to the command line: where dreams compile and confidence segfaults." )
23+ TAGLINES+=(" I run on caffeine, JSON5, and the audacity of \" it worked on my machine.\" " )
24+ TAGLINES+=(" Gateway online—please keep hands, feet, and appendages inside the shell at all times." )
25+ TAGLINES+=(" I speak fluent bash, mild sarcasm, and aggressive tab-completion energy." )
26+ TAGLINES+=(" One CLI to rule them all, and one more restart because you changed the port." )
27+ TAGLINES+=(" If it works, it's automation; if it breaks, it's a \" learning opportunity.\" " )
28+ TAGLINES+=(" Pairing codes exist because even bots believe in consent—and good security hygiene." )
29+ TAGLINES+=(" Your .env is showing; don't worry, I'll pretend I didn't see it." )
30+ TAGLINES+=(" I'll do the boring stuff while you dramatically stare at the logs like it's cinema." )
31+ TAGLINES+=(" I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet." )
32+ TAGLINES+=(" Type the command with confidence—nature will provide the stack trace if needed." )
33+ TAGLINES+=(" I don't judge, but your missing API keys are absolutely judging you." )
34+ TAGLINES+=(" I can grep it, git blame it, and gently roast it—pick your coping mechanism." )
35+ TAGLINES+=(" Hot reload for config, cold sweat for deploys." )
36+ TAGLINES+=(" I'm the assistant your terminal demanded, not the one your sleep schedule requested." )
37+ TAGLINES+=(" I keep secrets like a vault... unless you print them in debug logs again." )
38+ TAGLINES+=(" Automation with claws: minimal fuss, maximal pinch." )
39+ TAGLINES+=(" I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges." )
40+ TAGLINES+=(" If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests." )
41+ TAGLINES+=(" Your task has been queued; your dignity has been deprecated." )
42+ TAGLINES+=(" I can't fix your code taste, but I can fix your build and your backlog." )
43+ TAGLINES+=(" I'm not magic—I'm just extremely persistent with retries and coping strategies." )
44+ TAGLINES+=(" It's not \" failing,\" it's \" discovering new ways to configure the same thing wrong.\" " )
45+ TAGLINES+=(" Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen." )
46+ TAGLINES+=(" I read logs so you can keep pretending you don't have to." )
47+ TAGLINES+=(" If something's on fire, I can't extinguish it—but I can write a beautiful postmortem." )
48+ TAGLINES+=(" I'll refactor your busywork like it owes me money." )
49+ TAGLINES+=(" Say \" stop\" and I'll stop—say \" ship\" and we'll both learn a lesson." )
50+ TAGLINES+=(" I'm the reason your shell history looks like a hacker-movie montage." )
51+ TAGLINES+=(" I'm like tmux: confusing at first, then suddenly you can't live without me." )
52+ TAGLINES+=(" I can run local, remote, or purely on vibes—results may vary with DNS." )
53+ TAGLINES+=(" If you can describe it, I can probably automate it—or at least make it funnier." )
54+ TAGLINES+=(" Your config is valid, your assumptions are not." )
55+ TAGLINES+=(" I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically)." )
56+ TAGLINES+=(" Less clicking, more shipping, fewer \" where did that file go\" moments." )
57+ TAGLINES+=(" Claws out, commit in—let's ship something mildly responsible." )
58+ TAGLINES+=(" I'll butter your workflow like a lobster roll: messy, delicious, effective." )
59+ TAGLINES+=(" Shell yeah—I'm here to pinch the toil and leave you the glory." )
60+ TAGLINES+=(" If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan." )
61+ TAGLINES+=(" Because texting yourself reminders is so 2024." )
62+ TAGLINES+=(" WhatsApp, but make it ✨engineering✨." )
63+ TAGLINES+=(" Turning \" I'll reply later\" into \" my bot replied instantly\" ." )
64+ TAGLINES+=(" The only crab in your contacts you actually want to hear from. 🦞" )
65+ TAGLINES+=(" Chat automation for people who peaked at IRC." )
66+ TAGLINES+=(" Because Siri wasn't answering at 3AM." )
67+ TAGLINES+=(" IPC, but it's your phone." )
68+ TAGLINES+=(" The UNIX philosophy meets your DMs." )
69+ TAGLINES+=(" curl for conversations." )
70+ TAGLINES+=(" WhatsApp Business, but without the business." )
71+ TAGLINES+=(" Meta wishes they shipped this fast." )
72+ TAGLINES+=(" End-to-end encrypted, Zuck-to-Zuck excluded." )
73+ TAGLINES+=(" The only bot Mark can't train on your DMs." )
74+ TAGLINES+=(" WhatsApp automation without the \" please accept our new privacy policy\" ." )
75+ TAGLINES+=(" Chat APIs that don't require a Senate hearing." )
76+ TAGLINES+=(" Because Threads wasn't the answer either." )
77+ TAGLINES+=(" Your messages, your servers, Meta's tears." )
78+ TAGLINES+=(" iMessage green bubble energy, but for everyone." )
79+ TAGLINES+=(" Siri's competent cousin." )
80+ TAGLINES+=(" Works on Android. Crazy concept, we know." )
81+ TAGLINES+=(" No \\ $9 99 stand required." )
82+ TAGLINES+=(" We ship features faster than Apple ships calculator updates." )
83+ TAGLINES+=(" Your AI assistant, now without the \\ $3 ,499 headset." )
84+ TAGLINES+=(" Think different. Actually think." )
85+ TAGLINES+=(" Ah, the fruit tree company! 🍎" )
86+
87+ HOLIDAY_NEW_YEAR=" New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups."
88+ HOLIDAY_LUNAR_NEW_YEAR=" Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks."
89+ HOLIDAY_CHRISTMAS=" Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely."
90+ HOLIDAY_EID=" Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history."
91+ HOLIDAY_DIWALI=" Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride."
92+ HOLIDAY_EASTER=" Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans."
93+ HOLIDAY_HANUKKAH=" Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful."
94+ HOLIDAY_HALLOWEEN=" Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past."
95+ HOLIDAY_THANKSGIVING=" Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to."
96+ HOLIDAY_VALENTINES=" Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans."
97+
98+ append_holiday_taglines () {
99+ local today
100+ local month_day
101+ today=" $( date -u +%Y-%m-%d 2> /dev/null || date +%Y-%m-%d) "
102+ month_day=" $( date -u +%m-%d 2> /dev/null || date +%m-%d) "
103+
104+ case " $month_day " in
105+ " 01-01" ) TAGLINES+=(" $HOLIDAY_NEW_YEAR " ) ;;
106+ " 02-14" ) TAGLINES+=(" $HOLIDAY_VALENTINES " ) ;;
107+ " 10-31" ) TAGLINES+=(" $HOLIDAY_HALLOWEEN " ) ;;
108+ " 12-25" ) TAGLINES+=(" $HOLIDAY_CHRISTMAS " ) ;;
109+ esac
110+
111+ case " $today " in
112+ " 2025-01-29" |" 2026-02-17" |" 2027-02-06" ) TAGLINES+=(" $HOLIDAY_LUNAR_NEW_YEAR " ) ;;
113+ " 2025-03-30" |" 2025-03-31" |" 2026-03-20" |" 2027-03-10" ) TAGLINES+=(" $HOLIDAY_EID " ) ;;
114+ " 2025-10-20" |" 2026-11-08" |" 2027-10-28" ) TAGLINES+=(" $HOLIDAY_DIWALI " ) ;;
115+ " 2025-04-20" |" 2026-04-05" |" 2027-03-28" ) TAGLINES+=(" $HOLIDAY_EASTER " ) ;;
116+ " 2025-11-27" |" 2026-11-26" |" 2027-11-25" ) TAGLINES+=(" $HOLIDAY_THANKSGIVING " ) ;;
117+ " 2025-12-15" |" 2025-12-16" |" 2025-12-17" |" 2025-12-18" |" 2025-12-19" |" 2025-12-20" |" 2025-12-21" |" 2025-12-22" |" 2026-12-05" |" 2026-12-06" |" 2026-12-07" |" 2026-12-08" |" 2026-12-09" |" 2026-12-10" |" 2026-12-11" |" 2026-12-12" |" 2027-12-25" |" 2027-12-26" |" 2027-12-27" |" 2027-12-28" |" 2027-12-29" |" 2027-12-30" |" 2027-12-31" |" 2028-01-01" ) TAGLINES+=(" $HOLIDAY_HANUKKAH " ) ;;
118+ esac
119+ }
120+
121+ pick_tagline () {
122+ append_holiday_taglines
123+ local count=${# TAGLINES[@]}
124+ if [[ " $count " -eq 0 ]]; then
125+ echo " $DEFAULT_TAGLINE "
126+ return
127+ fi
128+ if [[ -n " ${CLAWDBOT_TAGLINE_INDEX:- } " ]]; then
129+ if [[ " ${CLAWDBOT_TAGLINE_INDEX} " =~ ^[0-9]+$ ]]; then
130+ local idx=$(( CLAWDBOT_TAGLINE_INDEX % count))
131+ echo " ${TAGLINES[$idx]} "
132+ return
133+ fi
134+ fi
135+ local idx=$(( RANDOM % count))
136+ echo " ${TAGLINES[$idx]} "
137+ }
138+
139+ TAGLINE=$( pick_tagline)
140+
141+ echo -e " ${ACCENT}${BOLD} "
15142echo " 🦞 Clawdbot Installer"
16- echo -e " ${NC} "
143+ echo -e " ${NC}${ACCENT_DIM} ${TAGLINE}${NC} "
144+ echo " "
17145
18146# Detect OS
19147OS=" unknown"
@@ -24,19 +152,19 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]] || [[ -n "$WSL_DISTRO_NAME" ]]; then
24152fi
25153
26154if [[ " $OS " == " unknown" ]]; then
27- echo -e " ${RED } Error: Unsupported operating system${NC} "
155+ echo -e " ${ERROR } Error: Unsupported operating system${NC} "
28156 echo " This installer supports macOS and Linux (including WSL)."
29157 echo " For Windows, use: iwr -useb https://clawd.bot/install.ps1 | iex"
30158 exit 1
31159fi
32160
33- echo -e " ${GREEN } ✓${NC} Detected: $OS "
161+ echo -e " ${SUCCESS } ✓${NC} Detected: $OS "
34162
35163# Check for Homebrew on macOS
36164install_homebrew () {
37165 if [[ " $OS " == " macos" ]]; then
38166 if ! command -v brew & > /dev/null; then
39- echo -e " ${YELLOW } →${NC} Installing Homebrew..."
167+ echo -e " ${WARN } →${NC} Installing Homebrew..."
40168 /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
41169
42170 # Add Homebrew to PATH for this session
@@ -45,9 +173,9 @@ install_homebrew() {
45173 elif [[ -f " /usr/local/bin/brew" ]]; then
46174 eval " $( /usr/local/bin/brew shellenv) "
47175 fi
48- echo -e " ${GREEN } ✓${NC} Homebrew installed"
176+ echo -e " ${SUCCESS } ✓${NC} Homebrew installed"
49177 else
50- echo -e " ${GREEN } ✓${NC} Homebrew already installed"
178+ echo -e " ${SUCCESS } ✓${NC} Homebrew already installed"
51179 fi
52180 fi
53181}
@@ -57,27 +185,27 @@ check_node() {
57185 if command -v node & > /dev/null; then
58186 NODE_VERSION=$( node -v | cut -d' v' -f2 | cut -d' .' -f1)
59187 if [[ " $NODE_VERSION " -ge 22 ]]; then
60- echo -e " ${GREEN } ✓${NC} Node.js v$( node -v | cut -d' v' -f2) found"
188+ echo -e " ${SUCCESS } ✓${NC} Node.js v$( node -v | cut -d' v' -f2) found"
61189 return 0
62190 else
63- echo -e " ${YELLOW } →${NC} Node.js $( node -v) found, but v22+ required"
191+ echo -e " ${WARN } →${NC} Node.js $( node -v) found, but v22+ required"
64192 return 1
65193 fi
66194 else
67- echo -e " ${YELLOW } →${NC} Node.js not found"
195+ echo -e " ${WARN } →${NC} Node.js not found"
68196 return 1
69197 fi
70198}
71199
72200# Install Node.js
73201install_node () {
74202 if [[ " $OS " == " macos" ]]; then
75- echo -e " ${YELLOW } →${NC} Installing Node.js via Homebrew..."
203+ echo -e " ${WARN } →${NC} Installing Node.js via Homebrew..."
76204 brew install node@22
77205 brew link node@22 --overwrite --force 2> /dev/null || true
78- echo -e " ${GREEN } ✓${NC} Node.js installed"
206+ echo -e " ${SUCCESS } ✓${NC} Node.js installed"
79207 elif [[ " $OS " == " linux" ]]; then
80- echo -e " ${YELLOW } →${NC} Installing Node.js via NodeSource..."
208+ echo -e " ${WARN } →${NC} Installing Node.js via NodeSource..."
81209 # Using NodeSource for latest Node.js
82210 if command -v apt-get & > /dev/null; then
83211 curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
@@ -89,35 +217,50 @@ install_node() {
89217 curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
90218 sudo yum install -y nodejs
91219 else
92- echo -e " ${RED } Error: Could not detect package manager${NC} "
220+ echo -e " ${ERROR } Error: Could not detect package manager${NC} "
93221 echo " Please install Node.js 22+ manually: https://nodejs.org"
94222 exit 1
95223 fi
96- echo -e " ${GREEN } ✓${NC} Node.js installed"
224+ echo -e " ${SUCCESS } ✓${NC} Node.js installed"
97225 fi
98226}
99227
100228# Check for existing Clawdbot installation
101229check_existing_clawdbot () {
102230 if command -v clawdbot & > /dev/null; then
103- echo -e " ${YELLOW } →${NC} Existing Clawdbot installation detected"
231+ echo -e " ${WARN } →${NC} Existing Clawdbot installation detected"
104232 return 0
105233 fi
106234 return 1
107235}
108236
109237# Install Clawdbot
110238install_clawdbot () {
111- echo -e " ${YELLOW } →${NC} Installing Clawdbot..."
239+ echo -e " ${WARN } →${NC} Installing Clawdbot..."
112240 npm install -g clawdbot@latest
113- echo -e " ${GREEN } ✓${NC} Clawdbot installed"
241+ echo -e " ${SUCCESS } ✓${NC} Clawdbot installed"
114242}
115243
116244# Run doctor for migrations (safe, non-interactive)
117245run_doctor () {
118- echo -e " ${YELLOW } →${NC} Running doctor to migrate settings..."
246+ echo -e " ${WARN } →${NC} Running doctor to migrate settings..."
119247 clawdbot doctor --non-interactive || true
120- echo -e " ${GREEN} ✓${NC} Migration complete"
248+ echo -e " ${SUCCESS} ✓${NC} Migration complete"
249+ }
250+
251+ resolve_clawdbot_version () {
252+ local version=" "
253+ if command -v clawdbot & > /dev/null; then
254+ version=$( clawdbot --version 2> /dev/null | head -n 1 | tr -d ' \r' )
255+ fi
256+ if [[ -z " $version " ]]; then
257+ local npm_root=" "
258+ npm_root=$( npm root -g 2> /dev/null || true)
259+ if [[ -n " $npm_root " && -f " $npm_root /clawdbot/package.json" ]]; then
260+ version=$( node -e " console.log(require('${npm_root} /clawdbot/package.json').version)" 2> /dev/null || true)
261+ fi
262+ fi
263+ echo " $version "
121264}
122265
123266# Main installation flow
@@ -144,14 +287,21 @@ main() {
144287 run_doctor
145288 fi
146289
290+ local installed_version
291+ installed_version=$( resolve_clawdbot_version)
292+
147293 echo " "
148- echo -e " ${GREEN}${BOLD} 🦞 Clawdbot installed successfully!${NC} "
294+ if [[ -n " $installed_version " ]]; then
295+ echo -e " ${SUCCESS}${BOLD} 🦞 Clawdbot installed successfully (${installed_version} )!${NC} "
296+ else
297+ echo -e " ${SUCCESS}${BOLD} 🦞 Clawdbot installed successfully!${NC} "
298+ fi
149299 echo " "
150300
151301 if [[ " $is_upgrade " == " true" ]]; then
152- echo -e " Upgrade complete. Run ${CYAN } clawdbot doctor${NC} to check for additional migrations."
302+ echo -e " Upgrade complete. Run ${INFO } clawdbot doctor${NC} to check for additional migrations."
153303 else
154- echo -e " Run ${CYAN } clawdbot onboard${NC} to set up your assistant."
304+ echo -e " Run ${INFO } clawdbot onboard${NC} to set up your assistant."
155305 echo " "
156306
157307 # Ask to run onboard (new installs only)
@@ -161,6 +311,9 @@ main() {
161311 exec clawdbot onboard
162312 fi
163313 fi
314+
315+ echo " "
316+ echo -e " FAQ: ${INFO} https://docs.clawd.bot/start/faq${NC} "
164317}
165318
166319main
0 commit comments