Summary
Currently Worktrunk supports three configuration scopes:
However, there is no way to apply the same configuration to a group of repositories located under the same workspace directory.
This becomes difficult to manage for organizations with many repositories.
Motivation
In many companies, repositories are organized under a common workspace.
For example:
~/codes/
├── workspace/
│ ├── service-a
│ ├── service-b
│ ├── service-c
│ ├── ...
│ └── worktrees/
├── personal/
└── opensource/
All repositories under ~/codes/workspace share exactly the same Worktrunk configuration:
- identical worktree layout
- identical aliases
- identical hooks
- identical commit generation settings
In our case, this workspace contains 100+ repositories.
The current options are not ideal:
- User Config applies globally, including personal and open-source repositories, which often require different settings.
- Project Config requires copying the same configuration into every repository, making it difficult to maintain and violating the DRY principle.
Whenever the shared configuration changes, it must be updated across every repository.
Proposed Solution
Introduce a new configuration scope between User and Project.
For example:
System
↓
User
↓
Workspace (Directory)
↓
Project
One possible implementation could be a workspace configuration file:
~/codes/workspace/.worktrunk/config.toml
which automatically applies to every Git repository under that directory.
Another option would be a Git-style conditional include mechanism, similar to gitconfig:
[[include_if]]
gitdir = "~/codes/workspace/**"
path = "~/.config/worktrunk/company.toml"
[[include_if]]
gitdir = "~/codes/personal/**"
path = "~/.config/worktrunk/personal.toml"
This approach would be more flexible and familiar to Git users.
Benefits
- Configure hundreds of repositories only once.
- Keep company and personal configurations completely separate.
- Avoid duplicated project configuration.
- Reduce maintenance overhead.
- Align with Git's existing configuration model (
includeIf).
I believe this would significantly improve Worktrunk for developers who manage multiple repositories across different workspaces.
Summary
Currently Worktrunk supports three configuration scopes:
However, there is no way to apply the same configuration to a group of repositories located under the same workspace directory.
This becomes difficult to manage for organizations with many repositories.
Motivation
In many companies, repositories are organized under a common workspace.
For example:
All repositories under
~/codes/workspaceshare exactly the same Worktrunk configuration:In our case, this workspace contains 100+ repositories.
The current options are not ideal:
Whenever the shared configuration changes, it must be updated across every repository.
Proposed Solution
Introduce a new configuration scope between User and Project.
For example:
One possible implementation could be a workspace configuration file:
which automatically applies to every Git repository under that directory.
Another option would be a Git-style conditional include mechanism, similar to
gitconfig:This approach would be more flexible and familiar to Git users.
Benefits
includeIf).I believe this would significantly improve Worktrunk for developers who manage multiple repositories across different workspaces.