scripts: add claude-start/stop worktree wrappers #19

Merged
k.renner merged 1 commits from chore/claude-worktree-scripts into master 2026-06-15 09:09:57 +00:00
Owner

Adds two helper scripts under scripts/ to run Claude Code in an isolated git worktree of the homelab repo.

  • claude-start.sh <name> [base-branch] [-- <claude args>] — creates (or reuses) a sibling worktree at ../homelab-<name> on a new branch off master, then exec claude inside it. Args after -- pass through to claude.
  • claude-stop.sh <name> [--force] [--delete-branch] — removes the worktree (refuses on uncommitted changes unless --force) and prunes; optional branch deletion.

Both derive the main repo from git --git-common-dir, so they work from the main checkout or any worktree. Verified end-to-end (create -> launch -> teardown).

Generated with Claude Code

Adds two helper scripts under `scripts/` to run Claude Code in an isolated git worktree of the homelab repo. - **`claude-start.sh <name> [base-branch] [-- <claude args>]`** — creates (or reuses) a sibling worktree at `../homelab-<name>` on a new branch off `master`, then `exec claude` inside it. Args after `--` pass through to claude. - **`claude-stop.sh <name> [--force] [--delete-branch]`** — removes the worktree (refuses on uncommitted changes unless `--force`) and prunes; optional branch deletion. Both derive the main repo from `git --git-common-dir`, so they work from the main checkout or any worktree. Verified end-to-end (create -> launch -> teardown). Generated with Claude Code
k.renner added 1 commit 2026-06-15 09:05:42 +00:00
claude-start.sh creates (or reuses) a sibling git worktree at
../homelab-<name> on a new branch off master and launches claude in it.
claude-stop.sh tears the worktree down, refusing on uncommitted changes
unless --force, with optional --delete-branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
k.renner merged commit c536f9d469 into master 2026-06-15 09:09:57 +00:00
Sign in to join this conversation.