DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to automate setup in every new worktree with hooks with Worktrunk

Run commands on create and merge so each worktree installs dependencies and gets its own dev server port.

Short answer: Read the Hooks docs at Worktrunk.dev/hook for the hook types such as post-start; then add a post-start hook that installs dependencies and starts your dev server; use the hash_port template filter to give each worktree a unique port. All steps.

Who it is forA developer who needs each parallel worktree ready to run without manual setup.

The problemEvery new worktree needs dependencies and a dev server, and ten of them collide on ports and rebuilds.

The outcomeNew worktrees that set themselves up, share build caches and use a unique port each.

What you need first

  • git
  • Homebrew or Cargo to install
  • Shell integration via `wt config shell install` so commands can change directories
  • An agent such as Claude Code or Codex

Steps

  1. Read the Hooks docs at Worktrunk.dev/hook for the hook types such as post-start
  2. Add a post-start hook that installs dependencies and starts your dev server
  3. Use the hash_port template filter to give each worktree a unique port
  4. Use Share build caches so ten worktrees get target/, node_modules/, etc without building or copying them

Prompt for your agent

Using worktrunk, set up a post-start hook for this repo that installs dependencies and starts the dev server on a `hash_port` port, and share build caches between worktrees. Show me the config before saving.

Caveat. Shared build caches need APFS, btrfs or XFS, and the README points to the docs for hook syntax.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for max-sixty/worktrunk and "Automate setup in every new worktree with hooks"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer