Last active 6 days ago

Interactive developer environment bootstrapper using official upstream downloads and signed OS-vendor packages.

weehong revised this gist 5 months ago. Go to revision

1 file changed, 36 insertions, 23 deletions

menu.sh

@@ -188,37 +188,52 @@ install_dotnet() {
188 188 # =============================
189 189
190 190 install_docker() {
191 - if require_cmd docker; then log "Docker exists"; return; fi
192 - log "Installing Docker from official source..."
191 + if require_cmd docker; then log "Docker exists"; else
192 + log "Installing Docker from official source..."
193 +
194 + if [[ "$OS" == "macOS" ]]; then
195 + [[ "$SYS_ARCH" == "arm64" ]] && DOCKER_MAC_ARCH="arm64" || DOCKER_MAC_ARCH="amd64"
196 + DMG_URL="https://desktop.docker.com/mac/main/${DOCKER_MAC_ARCH}/Docker.dmg"
197 + curl -fsSL -o /tmp/Docker.dmg "$DMG_URL"
198 + hdiutil attach /tmp/Docker.dmg -nobrowse -mountpoint /Volumes/Docker
199 + sudo cp -a /Volumes/Docker/Docker.app /Applications/
200 + hdiutil detach /Volumes/Docker
201 + rm /tmp/Docker.dmg
202 +
203 + log "Starting Docker Desktop..."
204 + open /Applications/Docker.app
205 + log "Please complete the setup in the Docker Desktop UI."
206 + else
207 + # Linux install
208 + curl -fsSL https://get.docker.com | sudo sh
209 + fi
210 + fi
193 211
194 - if [[ "$OS" == "macOS" ]]; then
195 - [[ "$SYS_ARCH" == "arm64" ]] && DOCKER_MAC_ARCH="arm64" || DOCKER_MAC_ARCH="amd64"
196 - DMG_URL="https://desktop.docker.com/mac/main/${DOCKER_MAC_ARCH}/Docker.dmg"
197 - curl -fsSL -o /tmp/Docker.dmg "$DMG_URL"
198 - hdiutil attach /tmp/Docker.dmg -nobrowse -mountpoint /Volumes/Docker
199 - sudo cp -a /Volumes/Docker/Docker.app /Applications/
200 - hdiutil detach /Volumes/Docker
201 - rm /tmp/Docker.dmg
212 + # Post-install logic for Linux (Ubuntu/WSL)
213 + if [[ "$OS" != "macOS" ]]; then
214 + log "Applying Linux post-install actions..."
202 215
203 - # macOS Post-install: Launch Docker to start the daemon process
204 - log "Starting Docker Desktop..."
205 - open /Applications/Docker.app
206 - log "Please complete the setup in the Docker Desktop UI."
207 - else
208 - # Linux install
209 - curl -fsSL https://get.docker.com | sudo sh
210 -
211 - # Linux Post-install: Add user to group
216 + # 1. Create docker group and add user
217 + sudo groupadd -f docker
212 218 sudo usermod -aG docker "$USER"
213 219
214 - # Linux Post-install: Enable and start Docker services on boot
220 + # 2. Enable and start Docker services
215 221 if command -v systemctl >/dev/null 2>&1; then
216 222 sudo systemctl enable --now docker.service
217 223 sudo systemctl enable --now containerd.service
224 + elif [[ "$OS" == "WSL" ]]; then
225 + sudo service docker start
226 + fi
227 +
228 + # 3. Immediate Socket Fix
229 + if [[ -S /var/run/docker.sock ]]; then
230 + log "Fixing ownership of /var/run/docker.sock..."
231 + sudo chown root:docker /var/run/docker.sock
232 + sudo chmod 660 /var/run/docker.sock
218 233 fi
219 234
220 235 log "Added $USER to the docker group."
221 - log "CRITICAL: To apply group changes immediately without logging out, run: newgrp docker"
236 + log "CRITICAL: To apply group changes immediately, run: newgrp docker"
222 237 fi
223 238 }
224 239
@@ -246,7 +261,6 @@ install_gcloud() {
246 261 log "Installing Google Cloud CLI..."
247 262 curl -fsSL https://sdk.cloud.google.com | bash -s -- --disable-prompts
248 263
249 - # Use the dot operator which is more POSIX compliant
250 264 add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.bash.inc" ] && . "$HOME/google-cloud-sdk/path.bash.inc"'
251 265 }
252 266
@@ -254,7 +268,6 @@ install_firebase() {
254 268 if require_cmd firebase; then warn "Firebase CLI exists"; return; fi
255 269 log "Installing Firebase CLI via NPM to ensure ARM64 compatibility..."
256 270
257 - # Check if npm exists, if not, try to load nvm or warn user
258 271 if ! require_cmd npm; then
259 272 err "NPM not found. Please install NVM (Option 3) first."
260 273 return 1

weehong revised this gist 5 months ago. Go to revision

1 file changed, 5 insertions, 25 deletions

menu.sh

@@ -280,35 +280,15 @@ install_gh() {
280 280 }
281 281
282 282 install_infisical() {
283 - if require_cmd infisical; then warn "Infisical exists"; return; fi
284 - log "Fetching latest Infisical binary from GitHub Releases..."
285 -
286 - # Fetch latest version and handle potential API rate limits
287 - LATEST_INF=$(curl -s https://api.github.com/repos/Infisical/infisical-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
288 -
289 - if [[ -z "$LATEST_INF" ]]; then
290 - err "Failed to fetch latest Infisical version. You might have hit a GitHub API rate limit."
291 - return 1
292 - fi
293 -
294 - TAR_FILE="infisical_${LATEST_INF}_${OS_LOWER}_${SYS_ARCH}.tar.gz"
295 - DOWNLOAD_URL="https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}"
296 -
297 - log "Downloading Infisical v${LATEST_INF}..."
283 + if require_cmd infisical; then warn "Infisical CLI exists"; return; fi
284 + log "Installing Infisical CLI via NPM..."
298 285
299 - # The -f flag in curl makes it fail silently on server errors, but we check the return code
300 - if ! curl -fsSL -o /tmp/infisical.tar.gz "$DOWNLOAD_URL"; then
301 - err "Download failed! URL might be incorrect: $DOWNLOAD_URL"
302 - rm -f /tmp/infisical.tar.gz
286 + if ! require_cmd npm; then
287 + err "NPM not found. Please install NVM (Option 3) first."
303 288 return 1
304 289 fi
305 -
306 - # Extract and cleanup
307 - tar -xzf /tmp/infisical.tar.gz -C /tmp
308 - sudo mv /tmp/infisical /usr/local/bin/
309 - rm -f /tmp/infisical.tar.gz
310 290
311 - log "Infisical successfully installed."
291 + npm install -g @infisical/cli
312 292 }
313 293
314 294 # =============================

weehong revised this gist 5 months ago. Go to revision

1 file changed, 22 insertions, 2 deletions

menu.sh

@@ -282,13 +282,33 @@ install_gh() {
282 282 install_infisical() {
283 283 if require_cmd infisical; then warn "Infisical exists"; return; fi
284 284 log "Fetching latest Infisical binary from GitHub Releases..."
285 +
286 + # Fetch latest version and handle potential API rate limits
285 287 LATEST_INF=$(curl -s https://api.github.com/repos/Infisical/infisical-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
288 +
289 + if [[ -z "$LATEST_INF" ]]; then
290 + err "Failed to fetch latest Infisical version. You might have hit a GitHub API rate limit."
291 + return 1
292 + fi
293 +
286 294 TAR_FILE="infisical_${LATEST_INF}_${OS_LOWER}_${SYS_ARCH}.tar.gz"
295 + DOWNLOAD_URL="https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}"
287 296
288 - curl -fsSL -o /tmp/infisical.tar.gz "https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}"
297 + log "Downloading Infisical v${LATEST_INF}..."
298 +
299 + # The -f flag in curl makes it fail silently on server errors, but we check the return code
300 + if ! curl -fsSL -o /tmp/infisical.tar.gz "$DOWNLOAD_URL"; then
301 + err "Download failed! URL might be incorrect: $DOWNLOAD_URL"
302 + rm -f /tmp/infisical.tar.gz
303 + return 1
304 + fi
305 +
306 + # Extract and cleanup
289 307 tar -xzf /tmp/infisical.tar.gz -C /tmp
290 308 sudo mv /tmp/infisical /usr/local/bin/
291 - rm /tmp/infisical.tar.gz
309 + rm -f /tmp/infisical.tar.gz
310 +
311 + log "Infisical successfully installed."
292 312 }
293 313
294 314 # =============================

weehong revised this gist 5 months ago. Go to revision

1 file changed, 13 insertions, 4 deletions

menu.sh

@@ -245,13 +245,22 @@ install_gcloud() {
245 245 if require_cmd gcloud; then warn "Google Cloud CLI exists"; return; fi
246 246 log "Installing Google Cloud CLI..."
247 247 curl -fsSL https://sdk.cloud.google.com | bash -s -- --disable-prompts
248 - add_to_path_config "GCLOUD" 'source "$HOME/google-cloud-sdk/path.bash.inc"'
248 +
249 + # Use the dot operator which is more POSIX compliant
250 + add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.bash.inc" ] && . "$HOME/google-cloud-sdk/path.bash.inc"'
249 251 }
250 252
251 253 install_firebase() {
252 254 if require_cmd firebase; then warn "Firebase CLI exists"; return; fi
253 - log "Installing Standalone Firebase CLI..."
254 - curl -sL https://firebase.tools | bash
255 + log "Installing Firebase CLI via NPM to ensure ARM64 compatibility..."
256 +
257 + # Check if npm exists, if not, try to load nvm or warn user
258 + if ! require_cmd npm; then
259 + err "NPM not found. Please install NVM (Option 3) first."
260 + return 1
261 + fi
262 +
263 + npm install -g firebase-tools
255 264 }
256 265
257 266 # =============================
@@ -315,7 +324,7 @@ show_menu() {
315 324 echo " 8) Docker (Official DMG/sh)"
316 325 echo " 9) AWS CLI (Official Bin)"
317 326 echo " 10) Google Cloud CLI (gcloud)"
318 - echo " 11) Firebase CLI (Standalone)"
327 + echo " 11) Firebase CLI (NPM/ARM64 Safe)"
319 328 echo -e "${YELLOW}--- Dev Tools & Security ---${NC}"
320 329 echo " 12) GitHub CLI (Official Bin)"
321 330 echo " 13) Infisical (Official Bin)"

weehong revised this gist 5 months ago. Go to revision

1 file changed, 17 insertions, 1 deletion

menu.sh

@@ -199,10 +199,26 @@ install_docker() {
199 199 sudo cp -a /Volumes/Docker/Docker.app /Applications/
200 200 hdiutil detach /Volumes/Docker
201 201 rm /tmp/Docker.dmg
202 +
203 + # macOS Post-install: Launch Docker to start the daemon process
204 + log "Starting Docker Desktop..."
205 + open /Applications/Docker.app
206 + log "Please complete the setup in the Docker Desktop UI."
202 207 else
208 + # Linux install
203 209 curl -fsSL https://get.docker.com | sudo sh
210 +
211 + # Linux Post-install: Add user to group
204 212 sudo usermod -aG docker "$USER"
205 - log "Added $USER to docker group. You may need to logout/login."
213 +
214 + # Linux Post-install: Enable and start Docker services on boot
215 + if command -v systemctl >/dev/null 2>&1; then
216 + sudo systemctl enable --now docker.service
217 + sudo systemctl enable --now containerd.service
218 + fi
219 +
220 + log "Added $USER to the docker group."
221 + log "CRITICAL: To apply group changes immediately without logging out, run: newgrp docker"
206 222 fi
207 223 }
208 224

weehong revised this gist 5 months ago. Go to revision

No changes

weehong revised this gist 5 months ago. Go to revision

1 file changed, 2 insertions, 2 deletions

menu.sh

@@ -274,9 +274,9 @@ install_claude() { log "Installing Claude Code..."; curl -fsSL https://claude.ai
274 274 install_opencode() { log "Installing OpenCode..."; curl -fsSL https://opencode.ai/install | bash; }
275 275
276 276 install_codex() {
277 - log "Installing OpenAI Codex CLI..."
277 + log "Installing @openai/codex..."
278 278 if ! require_cmd npm; then err "Node.js/NPM is required. Install NVM (3) first."; return 1; fi
279 - npm install -g openai
279 + npm i -g @openai/codex
280 280 }
281 281
282 282 # =============================

weehong revised this gist 5 months ago. Go to revision

1 file changed, 14 insertions, 7 deletions

menu.sh

@@ -288,17 +288,24 @@ show_menu() {
288 288 echo -e "${GREEN} DEVELOPER ENVIRONMENT INSTALLER (Strict) ${NC}"
289 289 echo -e "${BLUE}==================================================${NC}"
290 290 echo -e "${YELLOW}--- Core Runtimes & Managers ---${NC}"
291 - echo " 1) Build Tools (GCC/Make) 2) Homebrew (Optional)"
292 - echo " 3) NVM (Node.js) 4) Python 3 (Official API)"
293 - echo " 5) Go (Official -> /usr/local) 6) SDKMAN (Java/Kotlin)"
291 + echo " 1) Build Tools (GCC/Make)"
292 + echo " 2) Homebrew (Optional)"
293 + echo " 3) NVM (Node.js)"
294 + echo " 4) Python 3 (Official API)"
295 + echo " 5) Go (Official -> /usr/local)"
296 + echo " 6) SDKMAN (Java/Kotlin)"
294 297 echo " 7) .NET (Official Script)"
295 298 echo -e "${YELLOW}--- Cloud & Infrastructure ---${NC}"
296 - echo " 8) Docker (Official DMG/sh) 9) AWS CLI (Official Bin)"
297 - echo " 10) Google Cloud CLI (gcloud) 11) Firebase CLI (Standalone)"
299 + echo " 8) Docker (Official DMG/sh)"
300 + echo " 9) AWS CLI (Official Bin)"
301 + echo " 10) Google Cloud CLI (gcloud)"
302 + echo " 11) Firebase CLI (Standalone)"
298 303 echo -e "${YELLOW}--- Dev Tools & Security ---${NC}"
299 - echo " 12) GitHub CLI (Official Bin) 13) Infisical (Official Bin)"
304 + echo " 12) GitHub CLI (Official Bin)"
305 + echo " 13) Infisical (Official Bin)"
300 306 echo -e "${YELLOW}--- AI & Agentic Tools ---${NC}"
301 - echo " 14) Claude Code CLI 15) OpenCode (opencode.ai)"
307 + echo " 14) Claude Code CLI"
308 + echo " 15) OpenCode (opencode.ai)"
302 309 echo " 16) OpenAI Codex CLI"
303 310 echo -e "${BLUE}==================================================${NC}"
304 311 echo " 99) Quit"

weehong revised this gist 5 months ago. Go to revision

1 file changed, 24 insertions, 24 deletions

menu.sh

@@ -10,10 +10,10 @@ YELLOW="\033[1;33m"
10 10 BLUE="\033[0;34m"
11 11 NC="\033[0m"
12 12
13 - log() { echo -e "${GREEN}â–¶ $*${NC}"; }
14 - warn() { echo -e "${YELLOW}âš $*${NC}"; }
15 - err() { echo -e "${RED}✖ $*${NC}"; }
16 - info() { echo -e "${BLUE}ℹ $*${NC}"; }
13 + log() { echo -e "${GREEN}▶ $*${NC}"; }
14 + warn() { echo -e "${YELLOW}⚠ $*${NC}"; }
15 + err() { echo -e "${RED}✖ $*${NC}"; }
16 + info() { echo -e "${BLUE}ℹ $*${NC}"; }
17 17
18 18 # =============================
19 19 # HELPERS & SYSTEM DETECTION
@@ -98,7 +98,7 @@ install_nvm() {
98 98 warn "NVM is already installed."
99 99 else
100 100 log "Installing NVM..."
101 - curl -fsSL [https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh](https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh) | bash
101 + curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
102 102 fi
103 103
104 104 # Load NVM for the current session to ensure the 'nvm' command is available immediately
@@ -131,17 +131,17 @@ install_nvm() {
131 131
132 132 install_python() {
133 133 log "Fetching latest Python 3 version from official API..."
134 - LATEST_PY=$(curl -s [https://api.github.com/repos/python/cpython/releases/latest](https://api.github.com/repos/python/cpython/releases/latest) | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
134 + LATEST_PY=$(curl -s https://api.github.com/repos/python/cpython/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
135 135 [[ -z "$LATEST_PY" ]] && LATEST_PY="3.12.3"
136 136
137 137 log "Installing Python $LATEST_PY directly from Python.org..."
138 138 if [[ "$OS" == "macOS" ]]; then
139 - PKG_URL="[https://www.python.org/ftp/python/$](https://www.python.org/ftp/python/$){LATEST_PY}/python-${LATEST_PY}-macos11.pkg"
139 + PKG_URL="https://www.python.org/ftp/python/${LATEST_PY}/python-${LATEST_PY}-macos11.pkg"
140 140 curl -fsSL -o /tmp/python.pkg "$PKG_URL"
141 141 sudo installer -pkg /tmp/python.pkg -target /
142 142 rm /tmp/python.pkg
143 143 else
144 - SRC_URL="[https://www.python.org/ftp/python/$](https://www.python.org/ftp/python/$){LATEST_PY}/Python-${LATEST_PY}.tgz"
144 + SRC_URL="https://www.python.org/ftp/python/${LATEST_PY}/Python-${LATEST_PY}.tgz"
145 145 curl -fsSL -o /tmp/Python.tgz "$SRC_URL"
146 146 cd /tmp && tar -xzf Python.tgz && cd "Python-${LATEST_PY}"
147 147 ./configure --enable-optimizations
@@ -158,11 +158,11 @@ install_python() {
158 158
159 159 install_go() {
160 160 log "Fetching latest Go version from official source..."
161 - LATEST_GO=$(curl -sL [https://go.dev/VERSION?m=text](https://go.dev/VERSION?m=text) | head -n 1)
161 + LATEST_GO=$(curl -sL https://go.dev/VERSION?m=text | head -n 1)
162 162 TAR_FILE="${LATEST_GO}.${OS_LOWER}-${SYS_ARCH}.tar.gz"
163 163
164 164 log "Downloading $TAR_FILE..."
165 - curl -fsSL -o /tmp/go.tar.gz "[https://go.dev/dl/$TAR_FILE](https://go.dev/dl/$TAR_FILE)"
165 + curl -fsSL -o /tmp/go.tar.gz "https://go.dev/dl/$TAR_FILE"
166 166
167 167 log "Installing to /usr/local/go..."
168 168 sudo rm -rf /usr/local/go
@@ -174,12 +174,12 @@ install_go() {
174 174 install_sdkman() {
175 175 if [ -d "$HOME/.sdkman" ]; then warn "SDKMAN already exists"; return; fi
176 176 log "Installing SDKMAN..."
177 - curl -s "[https://get.sdkman.io](https://get.sdkman.io)" | bash
177 + curl -s "https://get.sdkman.io" | bash
178 178 }
179 179
180 180 install_dotnet() {
181 181 log "Installing .NET from official script..."
182 - curl -fsSL [https://dot.net/v1/dotnet-install.sh](https://dot.net/v1/dotnet-install.sh) | bash
182 + curl -fsSL https://dot.net/v1/dotnet-install.sh | bash
183 183 add_to_path_config "DOTNET_TOOLS" 'export PATH="$PATH:$HOME/.dotnet/tools"'
184 184 }
185 185
@@ -193,14 +193,14 @@ install_docker() {
193 193
194 194 if [[ "$OS" == "macOS" ]]; then
195 195 [[ "$SYS_ARCH" == "arm64" ]] && DOCKER_MAC_ARCH="arm64" || DOCKER_MAC_ARCH="amd64"
196 - DMG_URL="[https://desktop.docker.com/mac/main/$](https://desktop.docker.com/mac/main/$){DOCKER_MAC_ARCH}/Docker.dmg"
196 + DMG_URL="https://desktop.docker.com/mac/main/${DOCKER_MAC_ARCH}/Docker.dmg"
197 197 curl -fsSL -o /tmp/Docker.dmg "$DMG_URL"
198 198 hdiutil attach /tmp/Docker.dmg -nobrowse -mountpoint /Volumes/Docker
199 199 sudo cp -a /Volumes/Docker/Docker.app /Applications/
200 200 hdiutil detach /Volumes/Docker
201 201 rm /tmp/Docker.dmg
202 202 else
203 - curl -fsSL [https://get.docker.com](https://get.docker.com) | sudo sh
203 + curl -fsSL https://get.docker.com | sudo sh
204 204 sudo usermod -aG docker "$USER"
205 205 log "Added $USER to docker group. You may need to logout/login."
206 206 fi
@@ -211,7 +211,7 @@ install_aws() {
211 211 log "Installing AWS CLI directly from Amazon..."
212 212
213 213 if [[ "$OS" == "macOS" ]]; then
214 - curl -fsSL -o /tmp/AWSCLIV2.pkg "[https://awscli.amazonaws.com/AWSCLIV2.pkg](https://awscli.amazonaws.com/AWSCLIV2.pkg)"
214 + curl -fsSL -o /tmp/AWSCLIV2.pkg "https://awscli.amazonaws.com/AWSCLIV2.pkg"
215 215 sudo installer -pkg /tmp/AWSCLIV2.pkg -target /
216 216 rm /tmp/AWSCLIV2.pkg
217 217 else
@@ -219,7 +219,7 @@ install_aws() {
219 219 err "unzip is required. Please install 'Build Tools' (Option 1) first."
220 220 return 1
221 221 fi
222 - curl -fsSL -o /tmp/awscliv2.zip "[https://awscli.amazonaws.com/awscli-exe-linux-$](https://awscli.amazonaws.com/awscli-exe-linux-$){AWS_ARCH}.zip"
222 + curl -fsSL -o /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-${AWS_ARCH}.zip"
223 223 cd /tmp && unzip -q awscliv2.zip && sudo ./aws/install
224 224 rm -rf /tmp/awscliv2.zip /tmp/aws
225 225 fi
@@ -228,14 +228,14 @@ install_aws() {
228 228 install_gcloud() {
229 229 if require_cmd gcloud; then warn "Google Cloud CLI exists"; return; fi
230 230 log "Installing Google Cloud CLI..."
231 - curl -fsSL [https://sdk.cloud.google.com](https://sdk.cloud.google.com) | bash -s -- --disable-prompts
231 + curl -fsSL https://sdk.cloud.google.com | bash -s -- --disable-prompts
232 232 add_to_path_config "GCLOUD" 'source "$HOME/google-cloud-sdk/path.bash.inc"'
233 233 }
234 234
235 235 install_firebase() {
236 236 if require_cmd firebase; then warn "Firebase CLI exists"; return; fi
237 237 log "Installing Standalone Firebase CLI..."
238 - curl -sL [https://firebase.tools](https://firebase.tools) | bash
238 + curl -sL https://firebase.tools | bash
239 239 }
240 240
241 241 # =============================
@@ -245,10 +245,10 @@ install_firebase() {
245 245 install_gh() {
246 246 if require_cmd gh; then warn "GitHub CLI exists"; return; fi
247 247 log "Fetching latest GitHub CLI version..."
248 - LATEST_GH=$(curl -s [https://api.github.com/repos/cli/cli/releases/latest](https://api.github.com/repos/cli/cli/releases/latest) | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
248 + LATEST_GH=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
249 249 TAR_NAME="gh_${LATEST_GH}_${OS_LOWER}_${SYS_ARCH}"
250 250
251 - curl -fsSL -o /tmp/gh.tar.gz "[https://github.com/cli/cli/releases/download/v$](https://github.com/cli/cli/releases/download/v$){LATEST_GH}/${TAR_NAME}.tar.gz"
251 + curl -fsSL -o /tmp/gh.tar.gz "https://github.com/cli/cli/releases/download/v${LATEST_GH}/${TAR_NAME}.tar.gz"
252 252 tar -xzf /tmp/gh.tar.gz -C /tmp
253 253 sudo mv "/tmp/${TAR_NAME}/bin/gh" /usr/local/bin/
254 254 sudo rm -rf "/tmp/${TAR_NAME}" /tmp/gh.tar.gz
@@ -257,10 +257,10 @@ install_gh() {
257 257 install_infisical() {
258 258 if require_cmd infisical; then warn "Infisical exists"; return; fi
259 259 log "Fetching latest Infisical binary from GitHub Releases..."
260 - LATEST_INF=$(curl -s [https://api.github.com/repos/Infisical/infisical-cli/releases/latest](https://api.github.com/repos/Infisical/infisical-cli/releases/latest) | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
260 + LATEST_INF=$(curl -s https://api.github.com/repos/Infisical/infisical-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
261 261 TAR_FILE="infisical_${LATEST_INF}_${OS_LOWER}_${SYS_ARCH}.tar.gz"
262 262
263 - curl -fsSL -o /tmp/infisical.tar.gz "[https://github.com/Infisical/infisical-cli/releases/download/v$](https://github.com/Infisical/infisical-cli/releases/download/v$){LATEST_INF}/${TAR_FILE}"
263 + curl -fsSL -o /tmp/infisical.tar.gz "https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}"
264 264 tar -xzf /tmp/infisical.tar.gz -C /tmp
265 265 sudo mv /tmp/infisical /usr/local/bin/
266 266 rm /tmp/infisical.tar.gz
@@ -270,8 +270,8 @@ install_infisical() {
270 270 # AI & AGENTIC TOOLS
271 271 # =============================
272 272
273 - install_claude() { log "Installing Claude Code..."; curl -fsSL [https://claude.ai/install.sh](https://claude.ai/install.sh) | bash; }
274 - install_opencode() { log "Installing OpenCode..."; curl -fsSL [https://opencode.ai/install](https://opencode.ai/install) | bash; }
273 + install_claude() { log "Installing Claude Code..."; curl -fsSL https://claude.ai/install.sh | bash; }
274 + install_opencode() { log "Installing OpenCode..."; curl -fsSL https://opencode.ai/install | bash; }
275 275
276 276 install_codex() {
277 277 log "Installing OpenAI Codex CLI..."

weehong revised this gist 5 months ago. Go to revision

1 file changed, 8 insertions, 15 deletions

menu.sh

@@ -80,7 +80,7 @@ install_build_tools() {
80 80 install_brew() {
81 81 if require_cmd brew; then warn "Homebrew already installed"; return; fi
82 82 log "Installing Homebrew from Official Source..."
83 - /bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"
83 + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
84 84
85 85 if [[ "$OS_LOWER" == "linux" ]]; then
86 86 add_to_path_config "HOMEBREW" 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'
@@ -288,24 +288,17 @@ show_menu() {
288 288 echo -e "${GREEN} DEVELOPER ENVIRONMENT INSTALLER (Strict) ${NC}"
289 289 echo -e "${BLUE}==================================================${NC}"
290 290 echo -e "${YELLOW}--- Core Runtimes & Managers ---${NC}"
291 - echo " 1) Build Tools (GCC/Make)"
292 - echo " 2) Homebrew (Optional)"
293 - echo " 3) NVM (Node.js)"
294 - echo " 4) Python 3 (Official API)"
295 - echo " 5) Go (Official -> /usr/local)"
296 - echo " 6) SDKMAN (Java/Kotlin)"
291 + echo " 1) Build Tools (GCC/Make) 2) Homebrew (Optional)"
292 + echo " 3) NVM (Node.js) 4) Python 3 (Official API)"
293 + echo " 5) Go (Official -> /usr/local) 6) SDKMAN (Java/Kotlin)"
297 294 echo " 7) .NET (Official Script)"
298 295 echo -e "${YELLOW}--- Cloud & Infrastructure ---${NC}"
299 - echo " 8) Docker (Official DMG/sh)"
300 - echo " 9) AWS CLI (Official Bin)"
301 - echo " 10) Google Cloud CLI (gcloud)"
302 - echo " 11) Firebase CLI (Standalone)"
296 + echo " 8) Docker (Official DMG/sh) 9) AWS CLI (Official Bin)"
297 + echo " 10) Google Cloud CLI (gcloud) 11) Firebase CLI (Standalone)"
303 298 echo -e "${YELLOW}--- Dev Tools & Security ---${NC}"
304 - echo " 12) GitHub CLI (Official Bin)"
305 - echo " 13) Infisical (Official Bin)"
299 + echo " 12) GitHub CLI (Official Bin) 13) Infisical (Official Bin)"
306 300 echo -e "${YELLOW}--- AI & Agentic Tools ---${NC}"
307 - echo " 14) Claude Code CLI"
308 - echo " 15) OpenCode (opencode.ai)"
301 + echo " 14) Claude Code CLI 15) OpenCode (opencode.ai)"
309 302 echo " 16) OpenAI Codex CLI"
310 303 echo -e "${BLUE}==================================================${NC}"
311 304 echo " 99) Quit"