From a352d6a5941924351872f2189fab8175889ac591 Mon Sep 17 00:00:00 2001 From: hmk Date: Mon, 11 May 2026 14:10:36 -0700 Subject: [PATCH 1/3] fix(install): correct README curl URLs and drop version from archive names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README pointed at try-bedazzled_Darwin_arm64.tar.gz but goreleaser produces lowercase os strings AND embeds the version, so the actual file was try-bedazzled_0.1.3_darwin_arm64.tar.gz — neither URL worked from releases/latest/download/. Drop {{ .Version }} from the archive name_template so files become try-bedazzled_darwin_arm64.tar.gz, matching the version-less pattern that releases/latest/download/ requires. Update README URLs to lowercase. Also remove the "not notarized yet" Gatekeeper warning — releases since v0.1.3 are signed and notarized. Co-Authored-By: Claude Opus 4.7 (1M context) --- .goreleaser.yaml | 2 +- README.md | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d438222..6197580 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,7 +28,7 @@ archives: formats: - tar.gz name_template: >- - {{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }} + {{ .ProjectName }}_{{ .Os }}_{{ .Arch }} checksum: name_template: checksums.txt diff --git a/README.md b/README.md index 3801122..04658b2 100644 --- a/README.md +++ b/README.md @@ -45,29 +45,21 @@ Pick the tarball for your OS/arch from [Releases](https://github.com/hmk/try-bed ```bash # macOS, Apple Silicon -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_Darwin_arm64.tar.gz +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_arm64.tar.gz # macOS, Intel -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_Darwin_amd64.tar.gz +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_amd64.tar.gz # Linux, amd64 -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_Linux_amd64.tar.gz +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_amd64.tar.gz # Linux, arm64 -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_Linux_arm64.tar.gz +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_arm64.tar.gz tar xzf try.tar.gz sudo mv try /usr/local/bin/ ``` -> **macOS Gatekeeper**: the published binaries aren't notarized yet. If the -> first run prints "cannot be opened because the developer cannot be -> verified", clear the quarantine flag once: -> -> ```bash -> xattr -d com.apple.quarantine /usr/local/bin/try -> ``` - ### Debian / RPM Each release also ships `.deb` and `.rpm` packages on the Releases page. From 277fdd7b76cd3832463c8a0d2f1d0bf8a05d99e6 Mon Sep 17 00:00:00 2001 From: hmk Date: Mon, 11 May 2026 14:23:41 -0700 Subject: [PATCH 2/3] feat(install): add one-line install script that wires up the shell function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous README put the binary install and the shell-rc edit in separate sections, which is the #1 way users end up with a broken setup ("I installed it but `try` does nothing"). The shell function wrapper isn't optional — it's how `try` actually `cd`s into the selected directory. install.sh handles both in one command: - Detects darwin/linux × amd64/arm64 - Downloads the matching tarball from the latest release - Drops the binary in /usr/local/bin (or $TRY_INSTALL_DIR) - Detects the user's shell and appends `eval "$(try init)"` to the appropriate rc file - Idempotent: a second run sees the marker and skips the rc edit README now points at: curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh Manual install paths (Go, raw download, deb/rpm) move to INSTALL.md. Co-Authored-By: Claude Opus 4.7 (1M context) --- INSTALL.md | 82 +++++++++++++++++++++++++++++++++ README.md | 50 ++------------------- install.sh | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+), 46 deletions(-) create mode 100644 INSTALL.md create mode 100755 install.sh diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..bf673dc --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,82 @@ +# Install + +The fast path is the install script in the [README](README.md). This file covers the alternatives. + +## Install script options + +The install script accepts a few env-var overrides: + +```bash +# Install to a custom directory (no sudo needed if writable) +TRY_INSTALL_DIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh + +# Pin to a specific version +TRY_VERSION=v0.1.3 curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh + +# Install the binary but skip editing your shell rc file +TRY_NO_RC_EDIT=1 curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh +``` + +## With Go + +```bash +go install github.com/hmk/try-bedazzled/cmd/try@latest +``` + +Then add the shell function manually (see "Manual shell setup" below). + +## Manual download + +Pick the tarball for your OS/arch from [Releases](https://github.com/hmk/try-bedazzled/releases/latest): + +```bash +# macOS, Apple Silicon +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_arm64.tar.gz + +# macOS, Intel +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_amd64.tar.gz + +# Linux, amd64 +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_amd64.tar.gz + +# Linux, arm64 +curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_arm64.tar.gz + +tar xzf try.tar.gz +sudo mv try /usr/local/bin/ +``` + +Then add the shell function manually (see "Manual shell setup" below). + +## Debian / RPM packages + +Each release ships `.deb` and `.rpm` packages on the [Releases page](https://github.com/hmk/try-bedazzled/releases/latest). + +```bash +# Debian/Ubuntu +sudo dpkg -i try-bedazzled_linux_amd64.deb + +# RHEL/Fedora +sudo rpm -i try-bedazzled_linux_amd64.rpm +``` + +Then add the shell function manually (see "Manual shell setup" below). + +## Manual shell setup + +`try` needs a shell function wrapper to be able to `cd` your shell into the selected directory. The install script adds it for you; the other paths above don't. + +**bash / zsh** (`.bashrc` or `.zshrc`): +```bash +eval "$(try init)" +``` + +**fish** (`config.fish`): +```fish +try init | source +``` + +Use a custom tries directory: +```bash +eval "$(try init ~/workspace/experiments)" +``` diff --git a/README.md b/README.md index 04658b2..348482f 100644 --- a/README.md +++ b/README.md @@ -33,57 +33,15 @@ Type to filter. Press Enter to `cd`. Type a new name and press Enter to create. ## Install -### With Go - ```bash -go install github.com/hmk/try-bedazzled/cmd/try@latest +curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh ``` -### curl (pre-built binary) - -Pick the tarball for your OS/arch from [Releases](https://github.com/hmk/try-bedazzled/releases/latest): - -```bash -# macOS, Apple Silicon -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_arm64.tar.gz - -# macOS, Intel -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_darwin_amd64.tar.gz - -# Linux, amd64 -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_amd64.tar.gz +Then restart your shell (or `source ~/.zshrc`) and run `try`. -# Linux, arm64 -curl -fsSL -o try.tar.gz https://github.com/hmk/try-bedazzled/releases/latest/download/try-bedazzled_linux_arm64.tar.gz +The installer downloads the latest release for your platform, drops the binary in `/usr/local/bin/`, and adds the shell function to your rc file. macOS binaries are signed and notarized. -tar xzf try.tar.gz -sudo mv try /usr/local/bin/ -``` - -### Debian / RPM - -Each release also ships `.deb` and `.rpm` packages on the Releases page. - ---- - -## Setup - -Add one line to your shell config and you're done: - -**bash / zsh** (`.bashrc` or `.zshrc`): -```bash -eval "$(try init)" -``` - -**fish** (`config.fish`): -```fish -try init | source -``` - -Use a custom directory: -```bash -eval "$(try init ~/workspace/experiments)" -``` +For other install paths (Go, manual download, custom directory), see [INSTALL.md](INSTALL.md). --- diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..14243cf --- /dev/null +++ b/install.sh @@ -0,0 +1,130 @@ +#!/usr/bin/env sh +# install.sh — install try-bedazzled and wire up the shell function. +# +# curl -fsSL https://raw.githubusercontent.com/hmk/try-bedazzled/main/install.sh | sh +# +# Env overrides: +# TRY_INSTALL_DIR install location for the binary (default: /usr/local/bin) +# TRY_VERSION release tag to install (default: latest) +# TRY_NO_RC_EDIT if set, skip editing the shell rc file + +set -eu + +REPO="hmk/try-bedazzled" +INSTALL_DIR="${TRY_INSTALL_DIR:-/usr/local/bin}" +VERSION="${TRY_VERSION:-latest}" + +bold() { printf '\033[1m%s\033[0m\n' "$1"; } +info() { printf ' %s\n' "$1"; } +warn() { printf '\033[33m %s\033[0m\n' "$1" >&2; } +die() { printf '\033[31merror:\033[0m %s\n' "$1" >&2; exit 1; } + +bold "try-bedazzled installer" + +# --- detect platform ---------------------------------------------------------- + +uname_s=$(uname -s) +uname_m=$(uname -m) + +case "$uname_s" in + Darwin) os=darwin ;; + Linux) os=linux ;; + *) die "unsupported OS: $uname_s (try Homebrew or download from GitHub Releases)" ;; +esac + +case "$uname_m" in + x86_64|amd64) arch=amd64 ;; + arm64|aarch64) arch=arm64 ;; + *) die "unsupported architecture: $uname_m" ;; +esac + +info "platform: ${os}_${arch}" + +# --- resolve download URL ----------------------------------------------------- + +if [ "$VERSION" = "latest" ]; then + url="https://github.com/${REPO}/releases/latest/download/try-bedazzled_${os}_${arch}.tar.gz" +else + url="https://github.com/${REPO}/releases/download/${VERSION}/try-bedazzled_${os}_${arch}.tar.gz" +fi + +info "download: $url" + +# --- download + extract ------------------------------------------------------- + +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT + +if ! curl -fsSL -o "$tmp/try.tar.gz" "$url"; then + die "download failed — check that ${VERSION} has a release asset for ${os}_${arch}" +fi + +tar -xzf "$tmp/try.tar.gz" -C "$tmp" + +if [ ! -x "$tmp/try" ]; then + die "downloaded archive does not contain a 'try' binary" +fi + +# --- install binary ----------------------------------------------------------- + +info "install: $INSTALL_DIR/try" + +if [ -w "$INSTALL_DIR" ]; then + install -m 0755 "$tmp/try" "$INSTALL_DIR/try" +else + if ! command -v sudo >/dev/null 2>&1; then + die "$INSTALL_DIR is not writable and sudo is not available — set TRY_INSTALL_DIR to a writable path" + fi + warn "$INSTALL_DIR not writable — using sudo" + sudo install -m 0755 "$tmp/try" "$INSTALL_DIR/try" +fi + +# --- wire up shell function --------------------------------------------------- + +if [ -n "${TRY_NO_RC_EDIT:-}" ]; then + info "rc file: skipped (TRY_NO_RC_EDIT set)" + echo + bold "Done." + echo " Add this line to your shell config to enable the 'try' function:" + echo " eval \"\$(try init)\" # bash/zsh" + echo " try init | source # fish" + exit 0 +fi + +shell_name=$(basename "${SHELL:-/bin/sh}") + +case "$shell_name" in + bash) rc="$HOME/.bashrc"; line='eval "$(try init)"' ;; + zsh) rc="$HOME/.zshrc"; line='eval "$(try init)"' ;; + fish) rc="$HOME/.config/fish/config.fish"; line='try init | source' ;; + *) + warn "unrecognized shell '$shell_name' — skipping rc edit" + echo + bold "Done." + echo " Add the appropriate line to your shell config:" + echo " eval \"\$(try init)\" # bash/zsh" + echo " try init | source # fish" + exit 0 + ;; +esac + +mkdir -p "$(dirname "$rc")" +[ -f "$rc" ] || : > "$rc" + +if grep -Fq 'try init' "$rc" 2>/dev/null; then + info "rc file: $rc (already configured)" +else + info "rc file: $rc (appending)" + { + echo '' + echo '# try-bedazzled (https://github.com/hmk/try-bedazzled)' + echo "$line" + } >> "$rc" +fi + +# --- done --------------------------------------------------------------------- + +echo +bold "Installed!" +echo " Restart your shell or run: source $rc" +echo " Then try it: try" From bf7437e376144486c8cc825cbea9a98f0ad7d111 Mon Sep 17 00:00:00 2001 From: hmk Date: Mon, 11 May 2026 14:26:04 -0700 Subject: [PATCH 3/3] =?UTF-8?q?docs(readme):=20warmer=20tone=20=E2=80=94?= =?UTF-8?q?=20no=20jabs=20at=20users=20for=20their=20theme=20preferences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace three lines that ribbed users for picking the calmer themes: - "or off, if you're a coward" → "every preference welcome" - "no rainbow (for grown-ups)" → "sparkle dialed back" - "people who hate joy" → "perfect for CI logs and quiet terminals" Unicorns and rainbow fuzzies the whole way through. 🦄 Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 348482f..7e31fee 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ A Go rewrite of [tobi/try-cli](https://github.com/tobi/try-cli) using [Charmbracelet](https://charm.sh) — the same dated-throwaway-folder workflow, now with shifting cursor hues, rainbow fuzzy hits, -gradient row highlights, and a theme picker that lets you turn the sparkle up to 11 (or off, if -you're a coward). +gradient row highlights, and a theme picker that lets you turn the sparkle up to 11 (or all the way +down to a calm monochrome — every preference welcome). 🦄 ![demo](demo.gif) @@ -83,10 +83,10 @@ Five built-in themes, switchable live with `try theme` — pick your sparkle lev | Theme | Vibe | |---|---| | `bedazzled` *(default)* | 🌈 Catppuccin Mocha pastels under a full rainbow finish — rainbow search rules, shifting cursor hues, rainbow fuzzy hits, gradient row highlight | -| `rainbow` | 💖 Hot-pink accent, all rainbow, no apologies — the loudest one | -| `catppuccin` | 🍮 Catppuccin Mocha pastels, no rainbow (for grown-ups) | +| `rainbow` | 💖 Hot-pink accent, all rainbow, all the time — the loudest one | +| `catppuccin` | 🍮 Catppuccin Mocha pastels, sparkle dialed back | | `dracula` | 🧛 Dark and saturated | -| `minimal` | 🪨 ASCII-safe, no unicode, no glitter — good for CI and people who hate joy | +| `minimal` | 🪨 ASCII-safe, no unicode, no glitter — perfect for CI logs and quiet terminals | Set in config or override per-session: