Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/herdr-installer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tk-dotfiles': minor
---

Add herdr topic installer that auto-installs the herdr CLI via the upstream curl installer when missing, and self-updates it via the built-in `herdr update` command on dot update.
11 changes: 11 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,17 @@ The `iterm2/` topic installs uv-managed CLI tools that complement iTerm2 (e.g.,

- Edit `UV_TOOLS=()` in `iterm2/install.sh` and re-run `dot install` or `dot update`

### herdr CLI

The `herdr/` topic installs the `herdr` CLI (terminal workspace manager for AI coding agents), which is distributed only via a curl installer (not Homebrew):

- Installed via `curl -fsSL https://herdr.dev/install.sh | sh` (binary lands in `~/.local/bin`; `system/path.zsh` adds that directory to `$PATH` for the user's zsh shell, so `herdr` is available in normal terminal use after a shell restart)
- Detection uses `command -v herdr`
- Runs in both `dot install` and `dot update`:
- `dot install` (DOT_MODE=install): installs herdr if missing, otherwise skips
- `dot update` (DOT_MODE=update): installs if missing, otherwise self-updates via the built-in `herdr update` command
- Failures emit a warning and continue — never abort the broader `dot` run

### Claude MCP Servers

The `claude/` topic configures Model Context Protocol (MCP) servers for Claude Desktop and Claude Code:
Expand Down
10 changes: 10 additions & 0 deletions bin/dot
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,11 @@ cmd_install() {
DOT_MODE=install source "$DOTFILES/iterm2/install.sh"
fi

# Run herdr installer
if [ -f "$DOTFILES/herdr/install.sh" ]; then
DOT_MODE=install source "$DOTFILES/herdr/install.sh"
fi

# Run zsh installer
if [ -f "$DOTFILES/zsh/install.sh" ]; then
source "$DOTFILES/zsh/install.sh"
Expand Down Expand Up @@ -454,6 +459,11 @@ cmd_update() {
DOT_MODE=update source "$DOTFILES/iterm2/install.sh"
fi

# Run herdr installer in update mode
if [ -f "$DOTFILES/herdr/install.sh" ]; then
DOT_MODE=update source "$DOTFILES/herdr/install.sh"
fi

# Update npm global packages (if FNM/Node is available)
if command -v npm &> /dev/null; then
NPM_GLOBALS=(
Expand Down
39 changes: 39 additions & 0 deletions herdr/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# herdr installer
# Installs the herdr CLI (terminal workspace manager for AI coding agents)
# via the upstream curl installer, and self-updates it via `herdr update`.
# Sourced by bin/dot from cmd_install and cmd_update.
# Reads $DOT_MODE (install|update) to branch upgrade behavior.

echo ""
echo "🐂 Setting up herdr..."

# Default mode is install if not set
DOT_MODE="${DOT_MODE:-install}"

if command -v herdr &> /dev/null; then
if [ "$DOT_MODE" = "update" ]; then
echo " 🔄 Updating herdr..."
herdr update 2>&1 | sed 's/^/ /'
if [ "${PIPESTATUS[0]}" -eq 0 ]; then
echo " ✓ herdr update complete"
else
echo " ⚠️ Failed to update herdr (continuing)"
fi
else
echo " ✓ herdr already installed"
fi
else
echo " 📦 Installing herdr..."
curl -fsSL https://herdr.dev/install.sh | sh 2>&1 | sed 's/^/ /'
# PIPESTATUS indices: [0]=curl, [1]=sh installer, [2]=sed
installer_status="${PIPESTATUS[1]}"
if [ "$installer_status" -eq 0 ] && [ -x "$HOME/.local/bin/herdr" ]; then
echo " ✓ herdr installed"
Comment thread
akornmeier marked this conversation as resolved.
else
echo " ⚠️ Failed to install herdr (continuing)"
fi
Comment thread
akornmeier marked this conversation as resolved.
fi

echo " ✓ herdr setup complete"
Loading