1# Configuration
2
3## Global Config
4
5Location: `~/.config/wt/config.lua`
6
7```lua
8return {
9 -- Path style for worktree directories
10 branch_path_style = "nested", -- or "flat"
11 flat_separator = "_", -- separator for flat style
12
13 -- Remote URL templates (${project} is substituted)
14 remotes = {
15 github = "git@github.com:myuser/${project}.git",
16 gitlab = "git@gitlab.com:myuser/${project}.git",
17 codeberg = "git@codeberg.org:myuser/${project}.git"
18 },
19
20 -- Which remotes to add by default
21 -- "prompt" = ask each time
22 -- {"github", "gitlab"} = use these automatically
23 -- nil = prompt if remotes exist
24 default_remotes = "prompt"
25}
26```
27
28## Project Config
29
30Location: `.wt.lua` in project root (alongside `.bare/`)
31
32```lua
33return {
34 hooks = {
35 -- Files to copy from source worktree
36 copy = {"Makefile", "*.mk", ".tool-versions"},
37
38 -- Files to symlink from source worktree
39 symlink = {".env", ".env.local", "node_modules"},
40
41 -- Commands to run in new worktree
42 run = {"make deps", "npm install"}
43 }
44}
45```
46
47