Skip to content

Commit a952817

Browse files
committed
chore(wt): add claude-settings post-create step
1 parent 48a4f67 commit a952817

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.config/wt.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,63 @@ json.dump(data, open(path, 'w'), indent=4)
3434
# Install dependencies
3535
elixir-deps = "mix deps.get --quiet"
3636
ts-deps = "cd test/ts && npm install --silent"
37+
38+
# Write a per-worktree .claude/settings.local.json with this worktree's tidewave port
39+
claude-settings = """
40+
mkdir -p .claude
41+
cat > .claude/settings.local.json <<'SETTINGS'
42+
{
43+
"permissions": {
44+
"allow": [
45+
"Bash(*)",
46+
"Edit(*)",
47+
"Write(*)",
48+
"Read(*)",
49+
"Glob(*)",
50+
"Grep(*)",
51+
"WebFetch(domain:hexdocs.pm)",
52+
"WebFetch(domain:hex.pm)",
53+
"WebFetch(domain:elixir-lang.org)",
54+
"WebFetch(domain:www.erlang.org)",
55+
"WebFetch(domain:npmjs.com)",
56+
"WebFetch(domain:www.npmjs.com)",
57+
"WebFetch(domain:nodejs.org)",
58+
"WebFetch(domain:pnpm.io)",
59+
"WebFetch(domain:svelte.dev)",
60+
"WebFetch(domain:tailwindcss.com)",
61+
"WebFetch(domain:inertiajs.com)",
62+
"WebFetch(domain:phoenixframework.org)",
63+
"WebSearch(*)",
64+
"mcp__*"
65+
],
66+
"deny": [
67+
"Bash(git push*main*)",
68+
"Bash(git push*master*)",
69+
"Bash(git push*--all*)",
70+
"Bash(git push*--mirror*)",
71+
"Bash(git checkout main*)",
72+
"Bash(git checkout master*)",
73+
"Bash(git switch main*)",
74+
"Bash(git switch master*)",
75+
"Bash(gh pr merge*)"
76+
]
77+
},
78+
"sandbox": {
79+
"enabled": false
80+
},
81+
"hooks": {
82+
"PreToolUse": [
83+
{
84+
"matcher": "Bash",
85+
"hooks": [
86+
{
87+
"type": "command",
88+
"command": "jq -c '{hookSpecificOutput: {hookEventName: \\"PreToolUse\\", updatedInput: (.tool_input | . + {command: (\\"/bin/zsh -ic \\" + (.command | @sh))})}}'"
89+
}
90+
]
91+
}
92+
]
93+
}
94+
}
95+
SETTINGS
96+
"""

0 commit comments

Comments
 (0)