Add mise setup-worktree task for one-command worktree setup#6983
Merged
Conversation
e30fdbf to
6f181ea
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f181ea. Configure here.
Adds a `setup-worktree` mise task that links Local.xcconfig from the primary checkout, resolves deps, and generates the Tuist workspace, so a fresh git worktree is ready to build in one command. Also defines the `install` task the existing `postinstall` hook already referenced (it was a no-op until now since no such task existed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6f181ea to
97b2464
Compare
ajpallares
approved these changes
Jun 15, 2026
ajpallares
left a comment
Member
There was a problem hiding this comment.
Nice QoL improvement indeed! Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
purchases-androidand hybridsMotivation
Setting up a fresh git worktree meant hand-copying
Local.xcconfigand re-runningtuist installevery time. This adds a smallmisetask to do that boilerplate.Description
mise run setup-worktreesymlinksLocal.xcconfigfrom the primary checkout (so the API key is shared, not re-entered per worktree) and runstuist install. You stilltuist generate <Target>yourself.Also wires up the
installtask thepostinstallhook already pointed at but that never existed, so the hook stops erroring. CI uses mise shims only and never runsmise install, so nothing changes there.Heads up:
Local.xcconfigis now a symlink, so it's shared across worktrees. Per-worktree key/bundle-ID overrides need a real file in that worktree first (noted in the docs).AI session context
AI Context
Metadata
facu/tuist-worktree-setup-taskGoal
Make Tuist + git-worktree devx smoother: a small task that handles the per-worktree boilerplate of a fresh checkout.
Initial Prompt
"How do Tuist handle worktrees? Is there something we can change to make devx smoother?" The actionable task that followed: implement option 3 from the investigation, a
miseworktree-setup task.Important Follow-up Prompts
postinstallhook by adding the missinginstalltask.tuist generate(and the earlier--no-open/ arg-forwarding) was dropped as too much.Agent Contribution
~/.cache/tuistglobal cache is content-addressed (shared across worktrees), whileLocal.xcconfig/ generated workspace /Derivedare per-worktree.postinstall = "mise run install"hook referenced a non-existentinstalltask (silent error).[tasks.install]and[tasks.setup-worktree]tomise.toml; documented inContributing/DEVELOPMENT.md.Human Decisions
Key Implementation Decisions
git rev-parse --git-common-dirand symlinkLocal.xcconfigfrom it.TUIST_RC_API_KEYenv (option 1) and symlink-only with no task (option 2).tuist install; the developer runstuist generate <Target>themselves.Files / Symbols Touched
mise.tomlinstall+setup-worktreetasks.[tasks.install],[tasks.setup-worktree](depends = ["install"])set -euo pipefail.Contributing/DEVELOPMENT.mdmise trust, shared-symlink caveat.Dependencies / Config / Migrations
postinstallhook for localmise installruns only.Validation
mise tasks ls: both tasks listed,setup-worktreedepends oninstall.git check-ignoreconfirmsLocal.xcconfigignored.mise run setup-worktree: rantuist install, symlink step skipped (link present), exit 0.grep -rniE "mise (install|activate|run)" .circleci/ .github/: CI uses shims only, nevermise install.Validation Gaps
Review Focus
postinstallhook (so localmise installnow runstuist install) the desired behavior?tuist generatefor PaywallsTester writes the API key intoLocal.xcconfig; through the symlink that mutates the shared file. Caveat is documented, is that acceptable?Risks / Reviewer Notes
Local.xcconfigsymlink breaks per-worktree key/bundle-ID overrides.Projects/PaywallsTester/Project.swiftwrites the key intoLocal.xcconfig.Non-goals / Out of Scope
tuist generatefrom the task (and target arg-forwarding).Local.xcconfigfromTUIST_RC_API_KEY) and option 2 (symlink-only).Omitted Context
Note
Low Risk
Developer tooling and docs only; no runtime or CI behavior change beyond local
mise installnow runningtuist install.Overview
Adds
mise run setup-worktreeso a new git worktree can reuse the primary checkout’sLocal.xcconfig(symlink) and runtuist installwithout hand-copying config or re-resolving deps. Developers still runtuist generate <Target>themselves.Also defines the missing
installtask (tuist install) thatpostinstallalready referenced, so localmise installstops failing on a dead hook.Contributing/DEVELOPMENT.mddocumentsmise trust, the one-command flow, and that a shared symlink means per-worktree API key / bundle ID overrides need a realLocal.xcconfigin that worktree.Reviewed by Cursor Bugbot for commit 258172d. Bugbot is set up for automated code reviews on this repo. Configure here.