Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/content/hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ fi

## post-create

Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation.
Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation, copying caches needed by install.

```toml
[post-create]
copy = "wt step copy-ignored"
install = "npm ci"
env = "echo 'PORT={{ branch | hash_port }}' > .env.local"
```

## post-start

Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
Dev servers, long builds, file watchers. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.

```toml
[post-start]
copy = "wt step copy-ignored"
server = "npm run dev -- --port {{ branch | hash_port }}"
```

Expand Down Expand Up @@ -325,11 +325,11 @@ Background processes spawned by `post-start` outlive the worktree — pair them
Git worktrees share the repository but not untracked files. [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored) copies gitignored files between worktrees:

```toml
[post-start]
[post-create]
copy = "wt step copy-ignored"
```

Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

## Dev servers

Expand Down
2 changes: 1 addition & 1 deletion docs/content/step.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.

Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.

Use the `post-start` hook so the copy runs in the background. Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

### Language-specific notes

Expand Down
10 changes: 5 additions & 5 deletions skills/worktrunk/reference/hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ fi

## post-create

Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation.
Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation, copying caches needed by install.

```toml
[post-create]
copy = "wt step copy-ignored"
install = "npm ci"
env = "echo 'PORT={{ branch | hash_port }}' > .env.local"
```

## post-start

Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
Dev servers, long builds, file watchers. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.

```toml
[post-start]
copy = "wt step copy-ignored"
server = "npm run dev -- --port {{ branch | hash_port }}"
```

Expand Down Expand Up @@ -316,11 +316,11 @@ Background processes spawned by `post-start` outlive the worktree — pair them
Git worktrees share the repository but not untracked files. [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored) copies gitignored files between worktrees:

```toml
[post-start]
[post-create]
copy = "wt step copy-ignored"
```

Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

## Dev servers

Expand Down
2 changes: 1 addition & 1 deletion skills/worktrunk/reference/step.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.

Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.

Use the `post-start` hook so the copy runs in the background. Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

### Language-specific notes

Expand Down
10 changes: 5 additions & 5 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1138,21 +1138,21 @@ fi

## post-create

Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation.
Tasks that must complete before `post-start` hooks or `--execute` run: dependency installation, environment file generation, copying caches needed by install.

```toml
[post-create]
copy = "wt step copy-ignored"
install = "npm ci"
env = "echo 'PORT={{ branch | hash_port }}' > .env.local"
```

## post-start

Dev servers, long builds, file watchers, copying caches. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.
Dev servers, long builds, file watchers. Output logged to `.git/wt-logs/{branch}-{source}-post-start-{name}.log`.

```toml
[post-start]
copy = "wt step copy-ignored"
server = "npm run dev -- --port {{ branch | hash_port }}"
```

Expand Down Expand Up @@ -1412,11 +1412,11 @@ Background processes spawned by `post-start` outlive the worktree — pair them
Git worktrees share the repository but not untracked files. [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored) copies gitignored files between worktrees:

```toml
[post-start]
[post-create]
copy = "wt step copy-ignored"
```

Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

## Dev servers

Expand Down
2 changes: 1 addition & 1 deletion src/cli/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.

Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.

Use the `post-start` hook so the copy runs in the background. Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
Use `post-create` when subsequent hooks need the copied files — for example, copying `node_modules/` before `npm ci` so the install reuses cached packages. Use `post-start` instead when the copy is large and nothing depends on it immediately (e.g., Rust's `target/` directory).

## Language-specific notes

Expand Down
Loading