Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

refactor: replace dev scripts with Taskfile (#542)

Maximilian Roos56c26f289d60
diff --git a/CLAUDE.md b/CLAUDE.md
index 38b8c158f..623fcb355 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -62,10 +62,15 @@ cargo test --test integration --features shell-integration-tests
### Claude Code Web Environment
-When working in Claude Code web, run the setup script first:
+When working in Claude Code web, install the task runner and run setup:
```bash
-./dev/setup-claude-code-web.sh
+# Install task (go-task) - https://taskfile.dev
+sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/bin
+export PATH="$HOME/bin:$PATH"
+
+# Run setup
+task setup-web
```
This installs required shells (zsh, fish) for shell integration tests and builds the project. Also installs `gh` and other dev tools—run this if any command is not found. The permission tests (`test_permission_error_prevents_save`, `test_approval_prompt_permission_error`) automatically skip when running as root, which is common in containerized environments.
@@ -171,7 +176,7 @@ The `codecov/patch` CI check enforces coverage on changed lines — respond to f
### Running Coverage Locally
```bash
-./dev/coverage.sh
+task coverage
# Report: target/llvm-cov/html/index.html
```
@@ -183,7 +188,7 @@ When CI shows a codecov/patch failure, investigate before declaring "ready to me
1. Identify uncovered lines in your changes:
```bash
- ./dev/coverage.sh
+ task coverage
cargo llvm-cov report --show-missing-lines | grep <file>
git diff main...HEAD -- path/to/file.rs
```
diff --git a/Taskfile.yml b/Taskfile.yml
new file mode 100644
index 000000000..de7c8dfd9
--- /dev/null
+++ b/Taskfile.yml
@@ -0,0 +1,250 @@
+# https://taskfile.dev
+version: "3"
+
+vars:
+ REPO_ROOT:
+ sh: pwd
+ STATIC_DIR: "{{.REPO_ROOT}}/docs/static"
+ ASSETS_DIR: "{{.STATIC_DIR}}/assets"
+
+tasks:
+ # Development
+ coverage:
+ desc: Run tests with coverage report
+ cmd: cargo llvm-cov --html --features shell-integration-tests {{.CLI_ARGS}}
+
+ setup-web:
+ desc: Setup Claude Code web environment for development
+ platforms: [linux]
+ cmds:
+ - |
+ set -e
+ echo "========================================"
+ echo "Claude Code Web - Worktrunk Setup"
+ echo "========================================"
+
+ # Check project root
+ if [ ! -f "Cargo.toml" ] || ! grep -q 'name = "worktrunk"' Cargo.toml; then
+ echo "Error: Must be run from worktrunk project root"
+ exit 1
+ fi
+ echo "Found worktrunk project"
+
+ # Check/install Rust
+ echo ""
+ echo "Checking Rust toolchain..."
+ if ! command -v cargo &> /dev/null; then
+ echo "Cargo not found. Installing Rust..."
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+ source "$HOME/.cargo/env"
+ fi
+ echo "Rust version: $(rustc --version | awk '{print $2}')"
+
+ # Install shells
+ echo ""
+ echo "Installing shells for integration tests..."
+ if command -v apt-get &> /dev/null; then
+ export DEBIAN_FRONTEND=noninteractive
+ for f in /etc/apt/sources.list.d/*.list; do
+ [ -f "$f" ] && grep -q '^\[' "$f" 2>/dev/null && rm -f "$f"
+ done
+ if ! command -v zsh &> /dev/null || ! command -v fish &> /dev/null; then
+ apt-get update -qq
+ apt-get install -y -qq zsh fish
+ fi
+ fi
+ for shell in bash zsh fish; do
+ command -v "$shell" &> /dev/null || { echo "Error: $shell not found"; exit 1; }
+ echo "$shell available"
+ done
+
+ # Install gh CLI
+ echo ""
+ echo "Installing GitHub CLI..."
+ if command -v gh &> /dev/null; then
+ echo "gh already installed"
+ else
+ GH_VERSION="2.63.2"
+ ARCH="linux_amd64"
+ URL="https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_${ARCH}.tar.gz"
+ mkdir -p ~/bin
+ TEMP=$(mktemp -d)
+ curl -fsSL "$URL" | tar -xz -C "$TEMP"
+ mv "$TEMP/gh_${GH_VERSION}_${ARCH}/bin/gh" ~/bin/gh
+ chmod +x ~/bin/gh
+ rm -rf "$TEMP"
+ export PATH="$HOME/bin:$PATH"
+ echo "gh installed to ~/bin/gh"
+ fi
+
+ # Build
+ echo ""
+ echo "Building worktrunk..."
+ cargo build 2>&1 | tail -5
+ echo "Build successful"
+
+ # Install dev tools
+ echo ""
+ echo "Installing development tools..."
+ cargo install cargo-insta cargo-nextest --quiet
+ cargo install --path . --quiet
+ echo "Installed cargo-insta, cargo-nextest, worktrunk"
+
+ echo ""
+ echo "Setup complete! Run 'wt --help' to get started."
+
+ # Assets
+ fetch-assets:
+ desc: Fetch assets from worktrunk-assets repo
+ cmds:
+ - |
+ set -euo pipefail
+ echo "Fetching assets..."
+ rm -rf "{{.ASSETS_DIR}}"
+ mkdir -p "{{.ASSETS_DIR}}"
+ TMPFILE=$(mktemp)
+ curl -fsSL "https://github.com/max-sixty/worktrunk-assets/archive/refs/heads/main.tar.gz" -o "$TMPFILE"
+ tar -xzf "$TMPFILE" --strip-components=2 -C "{{.ASSETS_DIR}}" "worktrunk-assets-main/assets"
+ rm "$TMPFILE"
+ echo "Done. Assets in {{.ASSETS_DIR}}/"
+
+ publish-assets:
+ desc: Publish assets to worktrunk-assets repo
+ dir: "{{.REPO_ROOT}}"
+ cmds:
+ - |
+ set -euo pipefail
+ ASSETS_REPO="../worktrunk-assets"
+ LOCAL_ASSETS="{{.ASSETS_DIR}}"
+
+ # Clone if needed
+ if [[ ! -d "$ASSETS_REPO/.git" ]]; then
+ if ! command -v gh &>/dev/null; then
+ echo "Error: gh CLI required. Install from https://cli.github.com/"
+ exit 1
+ fi
+ echo "Cloning assets repo..."
+ gh repo clone max-sixty/worktrunk-assets "$ASSETS_REPO" || {
+ echo "Failed to clone assets repo"
+ exit 1
+ }
+ fi
+
+ cd "$ASSETS_REPO"
+ git pull --ff-only || {
+ echo "Failed to update assets repo. Check for uncommitted changes."
+ exit 1
+ }
+
+ rsync -av --delete "$LOCAL_ASSETS/" "$ASSETS_REPO/assets/"
+
+ if git diff --quiet; then
+ echo "No changes to publish"
+ exit 0
+ fi
+
+ git diff --stat
+ git add -A
+ git commit -m "Update assets"
+ git push
+
+ echo ""
+ echo "Published: https://github.com/max-sixty/worktrunk-assets"
+
+ # Social cards and logo
+ build-social-cards:
+ desc: Build social card ONGs from SVG sources
+ dir: "{{.STATIC_DIR}}"
+ preconditions:
+ - sh: command -v rsvg-convert
+ msg: "rsvg-convert required. Install with: brew install librsvg"
+ cmds:
+ - |
+ set -euo pipefail
+ FONT_DIR="{{.REPO_ROOT}}/.fonts"
+ OUTPUT_DIR="{{.ASSETS_DIR}}/social"
+
+ ensure_font() {
+ local name="$1"
+ local url="$2"
+ if fc-list | grep -qi "$name"; then
+ return 0
+ fi
+ echo "Downloading $name..."
+ mkdir -p "$FONT_DIR"
+ local zip="$FONT_DIR/${name// /_}.zip"
+ curl -fsSL "$url" -o "$zip"
+ unzip -qo "$zip" -d "$FONT_DIR"
+ rm "$zip"
+ }
+
+ ensure_font "Inter" "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip"
+ ensure_font "Plus Jakarta Sans" "https://github.com/tokotype/PlusJakartaSans/releases/download/2.7.1/PlusJakartaSans-2.7.1.zip"
+
+ # Fontconfig setup
+ export FONTCONFIG_FILE="$FONT_DIR/fonts.conf"
+ cat > "$FONT_DIR/fonts.conf" << EOF
+ <?xml version="1.0"?>
+ <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
+ <fontconfig>
+ <dir>$FONT_DIR</dir>
+ <cachedir>$FONT_DIR/cache</cachedir>
+ <include ignore_missing="yes">/etc/fonts/fonts.conf</include>
+ </fontconfig>
+ EOF
+ mkdir -p "$FONT_DIR/cache"
+ fc-cache -f "$FONT_DIR" 2>/dev/null
+
+ for font in "Inter" "Plus Jakarta Sans"; do
+ if ! fc-list : family | grep -qi "$font"; then
+ echo "Error: Font '$font' not found after download" >&2
+ exit 1
+ fi
+ done
+
+ mkdir -p "$OUTPUT_DIR"
+ echo "Building social cards..."
+ rsvg-convert social-card.svg -o "$OUTPUT_DIR/social-card.png"
+ rsvg-convert github-social-card.svg -o "$OUTPUT_DIR/github-social-card.png"
+ echo "Done:"
+ ls -lh "$OUTPUT_DIR"/*.png
+
+ generate-logo:
+ desc: Generate logo using Gemini AI
+ dir: "{{.REPO_ROOT}}"
+ preconditions:
+ - sh: command -v gemimg
+ msg: "gemimg required. Install with: uv tool install gemimg"
+ - sh: command -v magick
+ msg: "imagemagick required. Install with: brew install imagemagick"
+ - sh: command -v rembg
+ msg: "rembg required. Install with: uv tool install rembg[cli]"
+ - sh: test -f dev/logo-prompt.json
+ msg: "dev/logo-prompt.json not found"
+ cmds:
+ - |
+ set -euo pipefail
+ RAW_FILE=".tmp/logo-raw.png"
+ SIZE_1X=512
+ SIZE_2X=1024
+ SIZE_FAVICON=32
+
+ mkdir -p .tmp
+
+ echo "Generating logo..."
+ gemimg "$(cat dev/logo-prompt.json)" \
+ --model gemini-3-pro-image-preview \
+ --aspect-ratio 1:1 \
+ -o "$RAW_FILE"
+
+ echo "Removing background..."
+ rembg i "$RAW_FILE" "$RAW_FILE"
+
+ echo "Processing sizes..."
+ magick "$RAW_FILE" -resize "${SIZE_1X}x${SIZE_1X}" "{{.STATIC_DIR}}/logo.png"
+ magick "$RAW_FILE" -resize "${SIZE_2X}x${SIZE_2X}" "{{.STATIC_DIR}}/[email protected]"
+ magick "$RAW_FILE" -resize "${SIZE_FAVICON}x${SIZE_FAVICON}" "{{.STATIC_DIR}}/favicon.png"
+ rm "$RAW_FILE"
+
+ echo "Done. Generated:"
+ ls -la "{{.STATIC_DIR}}"/logo.png "{{.STATIC_DIR}}"/[email protected] "{{.STATIC_DIR}}"/favicon.png
diff --git a/dev/build-social-cards b/dev/build-social-cards
deleted file mode 100755
index 582d4fe78..000000000
--- a/dev/build-social-cards
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env bash
-# Regenerate social card ONGs from SVG sources
-# Requires: rsvg-convert (from librsvg)
-# Fonts are downloaded automatically if not installed
-
-set -euo pipefail
-
-SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
-STATIC_DIR="$SCRIPT_DIR/../docs/static"
-OUTPUT_DIR="$STATIC_DIR/assets/social"
-FONT_DIR="$SCRIPT_DIR/../.fonts"
-
-# Download font from GitHub releases if not installed
-ensure_font() {
- local name="$1"
- local url="$2"
-
- if fc-list | grep -qi "$name"; then
- return 0
- fi
-
- echo "Downloading $name..."
- mkdir -p "$FONT_DIR"
- local zip="$FONT_DIR/${name// /_}.zip"
- curl -fsSL "$url" -o "$zip"
- unzip -qo "$zip" -d "$FONT_DIR"
- rm "$zip"
-}
-
-# Font sources (GitHub releases)
-ensure_font "Inter" "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip"
-ensure_font "Plus Jakarta Sans" "https://github.com/tokotype/PlusJakartaSans/releases/download/2.7.1/PlusJakartaSans-2.7.1.zip"
-
-# Create fontconfig that includes our downloaded fonts
-export FONTCONFIG_FILE="$FONT_DIR/fonts.conf"
-cat > "$FONT_DIR/fonts.conf" << EOF
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
-<fontconfig>
- <dir>$FONT_DIR</dir>
- <cachedir>$FONT_DIR/cache</cachedir>
- <include ignore_missing="yes">/etc/fonts/fonts.conf</include>
-</fontconfig>
-EOF
-mkdir -p "$FONT_DIR/cache"
-
-# Rebuild font cache
-fc-cache -f "$FONT_DIR" 2>/dev/null
-
-# Verify fonts are available
-for font in "Inter" "Plus Jakarta Sans"; do
- if ! fc-list : family | grep -qi "$font"; then
- echo "Error: Font '$font' not found after download" >&2
- exit 1
- fi
-done
-
-mkdir -p "$OUTPUT_DIR"
-cd "$STATIC_DIR"
-echo "Building social cards..."
-
-# Open Graph card (1200x630)
-rsvg-convert social-card.svg -o "$OUTPUT_DIR/social-card.png"
-
-# GitHub card (1280x640)
-rsvg-convert github-social-card.svg -o "$OUTPUT_DIR/github-social-card.png"
-
-echo "Done:"
-ls -lh "$OUTPUT_DIR"/*.png
diff --git a/dev/coverage.sh b/dev/coverage.sh
deleted file mode 100755
index 1ae9efdbc..000000000
--- a/dev/coverage.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env bash
-exec cargo llvm-cov --html --features shell-integration-tests "$@"
diff --git a/dev/fetch-assets b/dev/fetch-assets
deleted file mode 100755
index 02b100e78..000000000
--- a/dev/fetch-assets
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-# Fetch assets from worktrunk-assets repo for local development
-set -euo pipefail
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-REPO_ROOT="$(dirname "$SCRIPT_DIR")"
-ASSETS_DIR="$REPO_ROOT/docs/static/assets"
-
-echo "Fetching assets..."
-rm -rf "$ASSETS_DIR"
-mkdir -p "$ASSETS_DIR"
-
-# Download and extract
-TMPFILE=$(mktemp)
-curl -fsSL "https://github.com/max-sixty/worktrunk-assets/archive/refs/heads/main.tar.gz" -o "$TMPFILE"
-tar -xzf "$TMPFILE" --strip-components=2 -C "$ASSETS_DIR" "worktrunk-assets-main/assets"
-rm "$TMPFILE"
-
-echo "Done. Assets in $ASSETS_DIR/"
diff --git a/dev/generate-logo.sh b/dev/generate-logo.sh
deleted file mode 100755
index 24bf7e02a..000000000
--- a/dev/generate-logo.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env bash
-# Generate the Worktrunk logo from the JSON prompt
-#
-# Requirements:
-# - gemimg: uv tool install gemimg (or run with: uvx gemimg)
-# - rembg: uv tool install rembg[cli]
-# - imagemagick: brew install imagemagick
-#
-# Usage:
-# ./dev/generate-logo.sh
-#
-# Generates logo.png, [email protected], and favicon.png directly into docs/static/.
-# Re-run if you don't like the result.
-
-set -euo pipefail
-
-cd "$(dirname "$0")/.."
-
-PROMPT_FILE="dev/logo-prompt.json"
-STATIC_DIR="docs/static"
-RAW_FILE=".tmp/logo-raw.png"
-SIZE_1X=512
-SIZE_2X=1024
-SIZE_FAVICON=32
-
-if [[ ! -f "$PROMPT_FILE" ]]; then
- echo "Error: $PROMPT_FILE not found"
- exit 1
-fi
-
-if ! command -v gemimg &> /dev/null; then
- echo "Error: gemimg not found. Install with: uv tool install gemimg"
- exit 1
-fi
-
-if ! command -v magick &> /dev/null; then
- echo "Error: imagemagick not found. Install with: brew install imagemagick"
- exit 1
-fi
-
-if ! command -v rembg &> /dev/null; then
- echo "Error: rembg not found. Install with: uv tool install rembg[cli]"
- exit 1
-fi
-
-mkdir -p .tmp
-
-echo "Generating logo..."
-gemimg "$(cat "$PROMPT_FILE")" \
- --model gemini-3-pro-image-preview \
- --aspect-ratio 1:1 \
- -o "$RAW_FILE"
-
-echo "Removing background..."
-rembg i "$RAW_FILE" "$RAW_FILE"
-
-echo "Processing sizes..."
-
-# 1x version (512px)
-magick "$RAW_FILE" -resize "${SIZE_1X}x${SIZE_1X}" "$STATIC_DIR/logo.png"
-
-# 2x version (1024px)
-magick "$RAW_FILE" -resize "${SIZE_2X}x${SIZE_2X}" "$STATIC_DIR/[email protected]"
-
-# Favicon (32px)
-magick "$RAW_FILE" -resize "${SIZE_FAVICON}x${SIZE_FAVICON}" "$STATIC_DIR/favicon.png"
-
-rm "$RAW_FILE"
-
-echo "Done. Generated:"
-ls -la "$STATIC_DIR"/logo.png "$STATIC_DIR"/[email protected] "$STATIC_DIR"/favicon.png
diff --git a/dev/publish-assets b/dev/publish-assets
deleted file mode 100755
index f4d7d10f2..000000000
--- a/dev/publish-assets
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-# Publish assets to the worktrunk-assets repo
-set -euo pipefail
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-REPO_ROOT="$(dirname "$SCRIPT_DIR")"
-ASSETS_REPO="$REPO_ROOT/../worktrunk-assets"
-LOCAL_ASSETS="$REPO_ROOT/docs/static/assets"
-
-# Clone assets repo if needed
-if [[ ! -d "$ASSETS_REPO/.git" ]]; then
- if ! command -v gh &>/dev/null; then
- echo "Error: gh CLI required. Install from https://cli.github.com/"
- exit 1
- fi
- echo "Cloning assets repo..."
- if ! gh repo clone max-sixty/worktrunk-assets "$ASSETS_REPO"; then
- echo "Failed to clone assets repo"
- exit 1
- fi
-fi
-
-# Update assets repo
-cd "$ASSETS_REPO"
-if ! git pull --ff-only; then
- echo "Failed to update assets repo. Check for uncommitted changes."
- exit 1
-fi
-
-# Sync local assets to repo
-rsync -av --delete "$LOCAL_ASSETS/" "$ASSETS_REPO/assets/"
-
-# Check for changes
-if git diff --quiet; then
- echo "No changes to publish"
- exit 0
-fi
-
-# Commit and push
-git diff --stat
-git add -A
-git commit -m "Update assets"
-git push
-
-echo ""
-echo "Published: https://github.com/max-sixty/worktrunk-assets"
diff --git a/dev/setup-claude-code-web.sh b/dev/setup-claude-code-web.sh
deleted file mode 100755
index 772b79267..000000000
--- a/dev/setup-claude-code-web.sh
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/bash
-###############################################################################
-# Claude Code Web - Environment Setup Script
-###############################################################################
-#
-# This script prepares a fresh Claude Code web environment for worktrunk
-# development. It installs required dependencies but does NOT run tests.
-#
-# What it does:
-# - Verifies Rust toolchain (1.90.0)
-# - Installs required shells (zsh, fish) on Debian/Ubuntu
-# - Installs GitHub CLI (gh) for working with PRs/issues
-# - Builds the project
-# - Installs dev tools: cargo-insta, cargo-nextest, worktrunk
-#
-# After running this script, run tests with:
-# cargo test --lib --bins # Unit tests
-# cargo test --test integration # Integration tests
-# cargo run -- beta run-hook pre-merge # All tests (via pre-merge hook)
-#
-# Usage:
-# ./dev/setup-claude-code-web.sh
-#
-###############################################################################
-
-set -e # Exit on error
-
-echo "========================================"
-echo "Claude Code Web - Worktrunk Setup"
-echo "========================================"
-echo ""
-
-# Colors for output
-GREEN='\033[0;32m'
-YELLOW='\033[1;33m'
-RED='\033[0;31m'
-NC='\033[0m' # No Color
-
-# Function to print status messages
-print_status() {
- echo -e "${GREEN}✓${NC} $1"
-}
-
-print_warning() {
- echo -e "${YELLOW}⚠${NC} $1"
-}
-
-print_error() {
- echo -e "${RED}✗${NC} $1"
-}
-
-# Check if we're in the right directory
-if [ ! -f "Cargo.toml" ] || ! grep -q "name = \"worktrunk\"" Cargo.toml; then
- print_error "Error: Must be run from worktrunk project root"
- exit 1
-fi
-
-print_status "Found worktrunk project"
-
-# Check Rust installation
-echo ""
-echo "Checking Rust toolchain..."
-if ! command -v cargo &> /dev/null; then
- print_error "Cargo not found. Installing Rust..."
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source "$HOME/.cargo/env"
-fi
-
-RUST_VERSION=$(rustc --version | awk '{print $2}')
-print_status "Rust version: $RUST_VERSION"
-
-# Check required Rust version from rust-toolchain.toml
-REQUIRED_VERSION=$(grep 'channel' rust-toolchain.toml | cut -d'"' -f2)
-if [ "$RUST_VERSION" != "$REQUIRED_VERSION" ]; then
- print_warning "Expected Rust $REQUIRED_VERSION, but found $RUST_VERSION"
- echo " rustup should automatically use the correct version from rust-toolchain.toml"
-fi
-
-# Install shells for integration tests
-echo ""
-echo "Installing shells for integration tests..."
-if command -v apt-get &> /dev/null; then
- export DEBIAN_FRONTEND=noninteractive
-
- # Remove malformed sources files (common in container environments)
- for f in /etc/apt/sources.list.d/*.list; do
- [ -f "$f" ] && grep -q '^\[' "$f" 2>/dev/null && rm -f "$f"
- done
-
- if ! command -v zsh &> /dev/null || ! command -v fish &> /dev/null; then
- apt-get update -qq
- apt-get install -y -qq zsh fish
- fi
-fi
-for shell in bash zsh fish; do
- command -v "$shell" &> /dev/null || { echo "Error: $shell not found"; exit 1; }
- print_status "$shell available"
-done
-
-# Install GitHub CLI (gh)
-echo ""
-echo "Installing GitHub CLI..."
-if command -v gh &> /dev/null; then
- print_status "gh already installed"
-else
- GH_VERSION="2.63.2"
- ARCH="linux_amd64"
- URL="https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_${ARCH}.tar.gz"
-
- mkdir -p ~/bin
- TEMP=$(mktemp -d)
- curl -fsSL "$URL" | tar -xz -C "$TEMP"
- mv "$TEMP/gh_${GH_VERSION}_${ARCH}/bin/gh" ~/bin/gh
- chmod +x ~/bin/gh
- rm -rf "$TEMP"
-
- export PATH="$HOME/bin:$PATH"
- print_status "gh installed to ~/bin/gh"
-fi
-
-# Build the project
-echo ""
-echo "Building worktrunk..."
-if cargo build 2>&1 | tail -5; then
- print_status "Build successful"
-else
- print_error "Build failed"
- exit 1
-fi
-
-# Install development tools
-echo ""
-echo "Installing development tools..."
-cargo install cargo-insta cargo-nextest --quiet
-cargo install --path . --quiet
-print_status "Installed cargo-insta, cargo-nextest, worktrunk"
-
-echo ""
-print_status "Setup complete! Run 'wt --help' to get started."
diff --git a/dev/update-homebrew.sh b/dev/update-homebrew.sh
deleted file mode 100755
index 99a6eb65b..000000000
--- a/dev/update-homebrew.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# Update homebrew-worktrunk formula with current version from Cargo.toml.
-# Fetches pre-computed SHA256 hashes from GitHub release assets.
-# macOS only (BSD sed syntax). Requires sibling ../homebrew-worktrunk checkout.
-set -e
-
-GREEN='\033[0;32m'; RED='\033[0;31m'; NC='\033[0m'
-ok() { echo -e "${GREEN}✓${NC} $1"; }
-err() { echo -e "${RED}✗${NC} $1"; exit 1; }
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
-HOMEBREW_REPO="$(cd "$PROJECT_ROOT/../homebrew-worktrunk" 2>/dev/null && pwd)" || true
-FORMULA="$HOMEBREW_REPO/Formula/wt.rb"
-
-[[ -f "$FORMULA" ]] || err "Formula not found. Clone homebrew-worktrunk as sibling directory."
-git -C "$HOMEBREW_REPO" diff --quiet && git -C "$HOMEBREW_REPO" diff --cached --quiet || err "homebrew-worktrunk has uncommitted changes"
-
-VERSION=$(grep '^version = ' "$PROJECT_ROOT/Cargo.toml" | head -1 | sed 's/version = "\(.*\)"/\1/')
-[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || err "Invalid version: $VERSION"
-ok "Version: $VERSION"
-
-BASE="https://github.com/max-sixty/worktrunk/releases/download/v${VERSION}"
-
-# Fetch pre-computed SHA256 from release assets (cargo-dist publishes .sha256 files)
-fetch_sha() {
- local sha=$(curl -sfL "$BASE/worktrunk-$1.tar.xz.sha256" | cut -d' ' -f1)
- [[ ${#sha} -eq 64 ]] || err "Failed to fetch SHA256 for $1"
- echo "$sha"
-}
-
-SHA1=$(fetch_sha "aarch64-apple-darwin")
-SHA2=$(fetch_sha "x86_64-apple-darwin")
-SHA3=$(fetch_sha "x86_64-unknown-linux-musl")
-ok "Fetched SHA256 hashes"
-
-# Update formula: version, URLs, and SHA256 values (in order they appear)
-sed -i '' "s|version \"[0-9.]*\"|version \"$VERSION\"|" "$FORMULA"
-sed -i '' "s|/v[0-9.]*/worktrunk-|/v${VERSION}/worktrunk-|g" "$FORMULA"
-
-TMPFILE=$(mktemp)
-awk -v s1="$SHA1" -v s2="$SHA2" -v s3="$SHA3" '
-/sha256 "[a-f0-9]{64}"/ { n++; gsub(/sha256 "[a-f0-9]{64}"/, "sha256 \"" (n==1?s1:n==2?s2:s3) "\"") }
-{ print }' "$FORMULA" > "$TMPFILE" && mv "$TMPFILE" "$FORMULA"
-
-grep -q "version \"${VERSION}\"" "$FORMULA" || err "Failed to update version"
-ok "Formula updated"
-
-cd "$HOMEBREW_REPO"
-git add Formula/wt.rb
-if git diff --cached --quiet; then
- ok "Already up to date (v${VERSION})"
-else
- git commit -m "Update to v${VERSION}"
- git push
- ok "Pushed v${VERSION} to homebrew-worktrunk"
-fi
diff --git a/docs/CLAUDE.md b/docs/CLAUDE.md
index 202d1d46f..9cc09e4fb 100644
--- a/docs/CLAUDE.md
+++ b/docs/CLAUDE.md
@@ -275,7 +275,7 @@ Demo GIFs (~2MB each) are stored in a separate `worktrunk-assets` repo to avoid
**For local development:**
```bash
-./dev/fetch-assets # Download published assets
+task fetch-assets # Download published assets
```
**To regenerate demos** (required after CLI output changes):
@@ -283,7 +283,7 @@ Demo GIFs (~2MB each) are stored in a separate `worktrunk-assets` repo to avoid
```bash
./docs/demos/build docs # Doc site demos (light + dark)
./docs/demos/build social # Social media demos (light only)
-./dev/publish-assets # Publish to assets repo
+task publish-assets # Publish to assets repo
```
Deploy runs `fetch-assets` before building.
@@ -301,8 +301,8 @@ Social cards follow the same assets pattern as demos.
**To regenerate** (after changing tagline, logo, or layout):
```bash
-./dev/build-social-cards # SVG → PNG (downloads fonts if needed)
-./dev/publish-assets # Publish to assets repo
+task build-social-cards # SVG → PNG (downloads fonts if needed)
+task publish-assets # Publish to assets repo
```
The build script automatically downloads Inter and Plus Jakarta Sans fonts from GitHub if not installed locally. Requires `rsvg-convert` (from librsvg).
diff --git a/docs/demos/CLAUDE.md b/docs/demos/CLAUDE.md
index 7c78d0279..7db42963c 100644
--- a/docs/demos/CLAUDE.md
+++ b/docs/demos/CLAUDE.md
@@ -65,7 +65,7 @@ This uses a small amount of API credits per recording (Claude starts, renders it
After building, publish to the assets repo:
```bash
-./dev/publish-assets
+task publish-assets
```
This copies `docs/static/assets/{docs,social}/` to the `worktrunk-assets` repo (sibling directory), commits, and pushes. The script clones the repo via `gh` if missing.
@@ -73,7 +73,7 @@ This copies `docs/static/assets/{docs,social}/` to the `worktrunk-assets` repo (
To fetch published assets (without rebuilding):
```bash
-./dev/fetch-assets
+task fetch-assets
```
Both build and fetch output to the same location (`docs/static/assets/`), so local builds override fetched assets.