Skip to content

Commit 5db1939

Browse files
mhfsclaude
andauthored
Add Render CLI to setup and doctor (#1)
## Summary - Installs the Render CLI across macOS (brew tap `render-oss/render`), Ubuntu (GitHub release zip), and Arch (`render-cli-bin` via yay/paru) - Adds a matching doctor check and lists the new tool in the README ## Test plan - [x] `bash doctor.sh` reports Render CLI as installed on Arch - [ ] Re-run `setup.sh` on a machine without `render` to confirm the install path on each OS 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4078998 commit 5db1939

5 files changed

Lines changed: 78 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Bootstraps a developer machine with the baseline tools required to work on Trust
2121
- **Colima** — container runtime for macOS (macOS only)
2222
- **AWS CLI** — Amazon Web Services CLI (no auth configured)
2323
- **AWS VPN Client** — VPN client for AWS
24+
- **Render CLI** — Render.com CLI
2425
- **Private registries** — Bundler and Yarn credentials for private packages
2526

2627
## Quick start

doctor.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ else
3232
SETUP_REF="${SETUP_REF:-main}"
3333
DOCTOR_TMPDIR=""
3434

35+
# shellcheck disable=SC2317 # Invoked indirectly via trap
3536
cleanup_tmp() { [ -n "$DOCTOR_TMPDIR" ] && rm -rf "$DOCTOR_TMPDIR"; }
3637
trap cleanup_tmp EXIT
3738

@@ -132,6 +133,9 @@ source "$SCRIPT_DIR/lib/docker_doctor.sh"
132133
# shellcheck source=lib/aws_doctor.sh
133134
source "$SCRIPT_DIR/lib/aws_doctor.sh"
134135

136+
# shellcheck source=lib/render_doctor.sh
137+
source "$SCRIPT_DIR/lib/render_doctor.sh"
138+
135139
# shellcheck source=lib/registries_doctor.sh
136140
source "$SCRIPT_DIR/lib/registries_doctor.sh"
137141

lib/render_doctor.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
#
3+
# Doctor check: Render CLI.
4+
# Sourced by doctor.sh — do not execute directly.
5+
# Requires: lib/common.sh, doctor helpers (check_pass, check_fail, check_cmd)
6+
7+
fmt_header "Render CLI"
8+
9+
check_cmd "render" "render"
10+
11+
if cmd_exists render; then
12+
version_output="$(render --version 2>&1 | head -1)"
13+
check_pass "render reports version: $version_output"
14+
fi

lib/render_setup.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
#
3+
# Render CLI setup.
4+
# Sourced by setup.sh — do not execute directly.
5+
# Requires: lib/common.sh
6+
7+
fmt_header "Render CLI"
8+
9+
if cmd_exists render; then
10+
fmt_ok "render already installed ($(render --version 2>&1 | head -1))"
11+
else
12+
fmt_install "Render CLI"
13+
case "$OS" in
14+
macos)
15+
brew install render-oss/render/render
16+
;;
17+
ubuntu)
18+
render_arch="amd64"
19+
case "$(uname -m)" in
20+
aarch64|arm64) render_arch="arm64" ;;
21+
armv7l|armv6l) render_arch="arm" ;;
22+
i386|i686) render_arch="386" ;;
23+
esac
24+
25+
if ! cmd_exists unzip; then
26+
sudo apt-get install -y -qq unzip
27+
fi
28+
29+
render_tmp="$(mktemp -d)"
30+
render_url="$(curl -fsSL https://api.github.com/repos/render-oss/cli/releases/latest \
31+
| grep -oE "\"browser_download_url\": \"[^\"]*cli_[0-9.]+_linux_${render_arch}\.zip\"" \
32+
| head -1 | cut -d'"' -f4)"
33+
34+
if [ -z "$render_url" ]; then
35+
echo " ERROR: Could not resolve Render CLI release for linux/${render_arch}."
36+
exit 1
37+
fi
38+
39+
curl -fsSL "$render_url" -o "$render_tmp/render.zip"
40+
unzip -qo "$render_tmp/render.zip" -d "$render_tmp"
41+
render_bin="$(find "$render_tmp" -maxdepth 1 -type f -name 'cli_v*' | head -1)"
42+
sudo install -m 0755 "$render_bin" /usr/local/bin/render
43+
rm -rf "$render_tmp"
44+
;;
45+
arch)
46+
if cmd_exists yay; then
47+
yay -S --noconfirm render-cli-bin
48+
elif cmd_exists paru; then
49+
paru -S --noconfirm render-cli-bin
50+
else
51+
echo " WARNING: No AUR helper found (yay/paru)."
52+
echo " Install render-cli-bin manually from AUR."
53+
fi
54+
;;
55+
esac
56+
fi

setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ source "$SCRIPT_DIR/lib/docker_setup.sh"
146146
# shellcheck source=lib/aws_setup.sh
147147
source "$SCRIPT_DIR/lib/aws_setup.sh"
148148

149+
# shellcheck source=lib/render_setup.sh
150+
source "$SCRIPT_DIR/lib/render_setup.sh"
151+
149152
# shellcheck source=lib/registries_setup.sh
150153
source "$SCRIPT_DIR/lib/registries_setup.sh"
151154

0 commit comments

Comments
 (0)