Add one-shot ./ide --bootstrap for fresh-machine setup#104
Open
kyleve wants to merge 3 commits into
Open
Conversation
Make ./ide --bootstrap (alias --setup) the single command a new Mac runs: verify a full Xcode is installed and selected, install mise via its official installer if missing (no Homebrew needed), install the pinned tools, then fall through to the normal hooks/sync/generate flow. Plain ./ide now fails fast when mise is missing, pointing at --bootstrap. Pin Ruby (3.4.10) in .mise.toml so sync-agents no longer relies on Apple's deprecated system Ruby, and route sync-agents through 'mise exec' from ./ide and the pre-commit hook so the pinned Ruby is used. Use mise's precompiled Ruby (ruby.compile = false) since source builds fail on a clean Mac (psych/libyaml). Update README and AGENTS.md to lead with the bootstrap step.
The pre-commit hook shells out to mise (SwiftFormat, sync-agents) with a bare `mise`, so right after `./ide --bootstrap` — before the user has added `mise activate` to their shell rc — a commit would fail with 'mise: command not found'. Give the hook the same find_mise resolution as ./ide (PATH, then the official-installer and Homebrew locations) and a `mise()` function shim so the existing call sites work regardless of PATH, plus a clear guard pointing at ./ide --bootstrap. Broaden ./ide's find_mise with the same fallbacks so the two stay symmetric.
When bootstrap installs mise via the official installer, idempotently append `mise activate` to the user's shell rc (zsh -> ~/.zshrc, bash -> ~/.bashrc) so mise and the pinned tools are on PATH in new interactive shells, replacing the printed note. Never duplicates the line, creates the rc if absent, and prints a manual pointer for other shells. This is convenience only — ./ide and the git hooks resolve mise directly, so nothing depends on it. Update README to match.
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.
What
Make
./ide --bootstrap(alias--setup) the single command a new Mac runs to get from a fresh clone to a generated project. It:Xcode.app(not just the Command Line Tools) that's selected and runnable; otherwise it prints the exactxcode-select/runFirstLaunch/license acceptsteps and exits. It does not auto-install Xcode (large, interactive App Store download).misevia its official installer if missing — self-contained, so Homebrew is no longer a prerequisite — and idempotently addsmise activateto your shell rc (zsh/bash).mise install): Tuist, SwiftFormat, and now Ruby.sync-agents --install,tuist generate.It composes with the existing flags, so
./ide --bootstrap -i --team-id ABCDE12345is the true one-shot. Plain./idestays the fast path but now fails fast whenmiseisn't found, pointing at--bootstrap.Ruby pin
sync-agentspreviously relied on Apple's deprecated system Ruby. This pins Ruby 3.4.10 in.mise.tomland routessync-agentsthroughmise execfrom both./ideand the pre-commit hook so the pinned Ruby is used regardless of shell activation.We use mise's precompiled Ruby (
ruby.compile = false): building from source withruby-buildfailed on a clean Mac (thepsychextension couldn't configure against libyaml), which would break the one-shot. Precompiled installs in ~30s with no toolchain and becomes mise's default in 2026.8.0.Resolving
misewithout shell activationRight after
./ide --bootstrap,miselives at~/.local/bin/misebut isn't onPATHuntil a new shell picks up activation. Both./ideand the pre-commit hook shell out tomise, so a commit in that window would otherwise fail withmise: command not found. Two things address this:find_mise(PATH -> official-installer~/.local/bin-> Homebrew ->/usr/local) resolves the binary directly, and the hook installs a smallmise()function shim so its existingmise exec ...call sites work regardless ofPATH. Both surfaces guard with a clear "run./ide --bootstrap" message when mise genuinely can't be found.mise activateto the user's shell rc (zsh ->~/.zshrc, bash ->~/.bashrc; a manual pointer for other shells) so new interactive shells have mise + tools onPATH. This is convenience only — nothing depends on it thanks tofind_mise.Verified locally (macOS, Xcode 27 beta, arm64)
./ide --bootstrap --no-openruns clean end-to-end (tools installed,sync-agentsran,tuist generate --no-opensucceeded).psych/yaml/json;sync-agentsruns under it viamise exec.find_miseresolves via the~/.local/binfallback with mise offPATH, and themise()shim delegates correctly../idewith no resolvablemiseprints therun ./ide --bootstrap firsterror and exits non-zero.Docs
README.md(Getting started leads with./ide --bootstrap; Homebrew is now an optional alternative) andAGENTS.md(Ruby row in the build-system table + bootstrap note). GeneratedCLAUDE.mdregenerated viasync-agents.