Quick Start

Spin up two worktree stacks running concurrently in under a minute.

1. Create a worktree and start its stack

From your main repo root:

docktree up --create feature/shopping-cart

Docktree creates the worktree, allocates unique ports, generates a Compose override, and runs docker compose up -d.

2. Start a second worktree concurrently

docktree up --create feature/user-auth

Both stacks now run simultaneously with isolated ports, containers, and volumes.

3. Check what's running

docktree status --all
  feature/shopping-cart   3 services   running
  feature/user-auth       3 services   running

4. View allocated ports

docktree ports --all
  feature/shopping-cart
    web    → 127.0.0.1:41001
    db     → 127.0.0.1:41002
    redis  → 127.0.0.1:41003

  feature/user-auth
    web    → 127.0.0.1:41011
    db     → 127.0.0.1:41012
    redis  → 127.0.0.1:41013

5. Stop a worktree's stack

cd ../myproject.worktrees/feature/shopping-cart
docktree down

Or stop all worktree stacks at once:

docktree down --all

6. Clean up stale resources

When you remove a worktree with git worktree remove, its Docker resources become stale. Reclaim them:

docktree clean --yes

Next steps