Skip to content

Quick start

Run these commands inside a Git repository.

Terminal window
hwt create --branch feat/my-change

hwt uses the current branch as the base, asks Herdr to create a linked worktree and workspace, applies your configuration, and leaves focus where it is.

Focus the new workspace immediately with --focus:

Terminal window
hwt create --branch feat/my-change --focus

Generate .herdr-worktree.yaml:

Terminal window
hwt config init

Then describe what each new checkout needs:

# yaml-language-server: $schema=https://raw.githubusercontent.com/dkarter/hwt/main/schema/herdr-worktree.schema.json
agent: opencode --port
files:
copy:
- .env.local
post_create:
- mise install

Validate the resolved global and repository configuration:

Terminal window
hwt config validate
Terminal window
hwt list

From inside the Herdr workspace:

Terminal window
hwt remove

From elsewhere, provide its workspace ID:

Terminal window
hwt remove --workspace w_8Jx2

hwt refuses to remove a dirty or locked worktree. Review the checkout before using --force.