Should `wt.toml` be git ignored?
The thing is, this config file may not be interesting to be in the repo but if this isn't in the repo any commands that depend on hooks or configs that are set will not going to come over to other worktree when you switch to a new folder.
For example, if you set the [list] on the wt.toml that is in the primary worktree the wt list will return with your config but if you switch to another worktree and run wt list your settings are not going to be there since it won't have any wt.toml file.
I suppose I could copy the config file in the post-create hook but that kinda makes it hard to replicate changes to each file if there's some config change.
I reckon the best dx is having the config file committed to git so maybe we should update docs to recommend that?
the project config is designed to be committed and shared. the user config is the one with personal preferences such as [list]
@claude how could we improve the docs to make this clearer?
Claude finished @max-sixty's task in 1m 5s —— View job
Analyzing documentation for config clarity
- [x] Gather context about current documentation
- [x] Identify gaps in project vs user config explanation
- [x] Propose specific improvements
Analysis
I've reviewed the documentation and identified the issue. The distinction between project config and user config exists but isn't prominent enough in key places where users first encounter configuration.
Current state:
- The
docs/content/config.mdpage does explain both configs in the "Configuration files" table (lines 39-44) - However, this explanation appears AFTER the examples section
- The
wt config createhelp text shows project config creation but doesn't emphasize the distinction - The example config files (
wt.example.tomlandconfig.example.toml) have good headers but the purpose distinction could be clearer
The confusion in issue #626:
The user thought [list] config belongs in wt.toml (project config), when it should be in config.toml (user config). This suggests users don't immediately understand which settings go where.
Recommendations
I propose these specific improvements:
1. Reorder config.md to put the distinction upfront
Move the "Configuration files" table (lines 39-44) to appear BEFORE the examples section. Users need to understand the two-config model before seeing how to create them.
2. Enhance the table with clearer "goes here" guidance
Expand the table to explicitly list what types of settings belong in each:
| File | Location | Purpose | Contains |
|---|---|---|---|
| User config | ~/.config/worktrunk/config.toml |
Personal settings | Worktree path template, list/merge/commit defaults, LLM settings, approved commands |
| Project config | .config/wt.toml |
Team automation (committed to git) | Lifecycle hooks (post-create, pre-merge, etc.), dev server URLs, CI platform override |
3. Add a prominent note about what to commit
Add a callout box right after the table:
What should be committed?
- ✅ Project config (
.config/wt.toml) — Commit this to share hooks and automation with the team- ❌ User config (
~/.config/worktrunk/config.toml) — Never commit; this is personal preferences
4. Update wt.example.toml header
Change the header comment from:
# Worktrunk Project Configuration
# Copy to: <repo>/.config/wt.toml
#
# Project-specific hooks that run automatically during worktree operations.
# Check this file into git to share hooks across all developers.
To:
# Worktrunk Project Configuration
# Copy to: <repo>/.config/wt.toml
#
# This file defines team automation: lifecycle hooks that run during worktree operations.
# ✅ CHECK THIS FILE INTO GIT to share hooks across all developers.
#
# For personal settings (worktree paths, list display, commit defaults), use user config:
# ~/.config/worktrunk/config.toml (create with: wt config create)
5. Update config.example.toml header
Similarly enhance the user config header to emphasize it's personal and not committed.
6. Add FAQ entry
Add a new FAQ item: "Should I commit wt.toml?" that clearly explains:
- Yes,
.config/wt.toml(project config) should be committed - No,
~/.config/worktrunk/config.toml(user config) should NOT be committed - What each contains and why
Would you like me to implement these changes?