feat(bootstrap): consolidate dotfiles commands - #11436
Conversation
📝 WalkthroughWalkthroughThe PR adds ChangesBootstrap Dotfiles Workflow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant BootstrapDotfiles
participant DotfilesApply
participant Hooks
participant Dotfiles
User->>BootstrapDotfiles: run bootstrap dotfiles apply
BootstrapDotfiles->>DotfilesApply: dispatch apply
DotfilesApply->>Hooks: run pre-dotfiles hooks
DotfilesApply->>Dotfiles: apply dotfiles
DotfilesApply->>Hooks: run post-dotfiles hooks
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryConsolidates dotfiles management beneath the bootstrap command tree.
Confidence Score: 3/5The PR is not yet safe to merge because aliased paths can still reintroduce stale template-managed configuration into dry-run hook simulation. Template rendering and exact same-path edit restoration are prevented, but the simulation tracks unavailable targets with raw PathBuf equality; symlink, lexical, or case aliases can miss that check and cause the old on-disk configuration to supply hooks that the requested template replacement would discard. Files Needing Attention: src/cli/bootstrap.rs Important Files Changed
Reviews (5): Last reviewed commit: "fix(bootstrap): skip post-hook after dec..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/cli/bootstrap.rs`:
- Around line 1868-1870: Update the dry_run branch in bootstrap’s hook
initialization to avoid rendering config-target dotfile templates, using an
execution-disabled renderer or otherwise skipping template evaluation while
preserving hook discovery. Add a regression test covering an exec() template and
verify that mise bootstrap dotfiles apply --dry-run performs no command
execution.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 13ccec90-60d7-4280-ad2c-679a6e6d2bf0
📒 Files selected for processing (25)
docs/.vitepress/cli_commands.tsdocs/bootstrap.mddocs/cli/bootstrap/dotfiles.mddocs/cli/bootstrap/dotfiles/add.mddocs/cli/bootstrap/dotfiles/edit.mddocs/cli/dotfiles.mddocs/cli/dotfiles/apply.mddocs/cli/dotfiles/status.mddocs/cli/index.mddocs/dotfiles.mddocs/public/llms.txte2e/cli/test_bootstrape2e/cli/test_dotfiles_filesman/man1/mise.1mise.usage.kdlsrc/assets/mise-extra.usage.kdlsrc/cli/bootstrap.rssrc/cli/command_effects.rssrc/cli/dotfiles/add.rssrc/cli/dotfiles/apply.rssrc/cli/dotfiles/edit.rssrc/cli/dotfiles/mod.rssrc/cli/dotfiles/status.rssrc/system/edits.rssrc/system/files.rs
💤 Files with no reviewable changes (3)
- docs/cli/dotfiles/apply.md
- docs/cli/dotfiles.md
- docs/cli/dotfiles/status.md
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/cli/bootstrap.rs`:
- Around line 1034-1040: Update the FileMode::Template branch in the bootstrap
simulation to remove file.target from config_files before continuing. Preserve
the existing debug logging and skip behavior, and add coverage for an existing
target whose stale configuration came from a hook.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: bacb7d50-4bf6-407b-8fd2-4c8003d184de
📒 Files selected for processing (2)
e2e/cli/test_bootstrapsrc/cli/bootstrap.rs
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, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3f4e4f0. Configure here.

Summary
pre-dotfilesandpost-dotfileshooks aroundmise bootstrap dotfiles apply, including config reload and dry-run simulationdotfiles addanddotfiles editinto the canonicalmise bootstrap dotfilescommand treemise dotfilescompatibility command, with warnings starting in 2027.2.0 and removal in 2028.2.0Root cause
mise bootstrap dotfiles applydelegated directly to the same implementation asmise dotfiles apply, bypassing the bootstrap lifecycle that dispatches phase hooks. The top-level command also duplicated a now-canonical bootstrap command surface.Validation
mise run lint-fixmise run rendermise run test:e2e e2e/cli/test_bootstrap e2e/cli/test_dotfiles_filesContext: #11432
AI-assisted — Tool: Codex; model: OpenAI/unavailable; version: unavailable.
Note
Medium Risk
Changes user-facing CLI and bootstrap hook timing around dotfiles apply; behavior shifts (hooks, dry-run, deprecation) could surprise scripts still using
mise dotfilesor relying on old dry-run hook previews.Overview
Dotfiles are now managed through
mise bootstrap dotfiles(add,edit,apply,status). The top-levelmise dotfilescommand is hidden from help, emits deprecation warnings (2027.2.0 → removal 2028.2.0), and still delegates to the same implementation for compatibility.mise bootstrap dotfiles applynow matches full bootstrap dotfiles behavior: it runspre-dotfilesandpost-dotfileshooks, reloads config after a real apply forpost-dotfiles, and skipspost-dotfilesif the user declines the apply prompt. File/editapplyhelpers return whether the user confirmed so callers can respect that.Dry-run simulation for config contributed by dotfiles no longer renders template dotfile sources (avoiding
exec()during preview) and drops templated config targets from the simulated hook set so stale on-disk hooks are not shown.Docs, CLI reference, man page, and e2e tests are updated for the new command paths and hook behavior.
Reviewed by Cursor Bugbot for commit f6c7a56. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
addandeditsubcommands undermise bootstrap dotfiles.pre-dotfilesandpost-dotfileshooks as part of the dotfiles apply flow.Documentation
mise bootstrap dotfiles.mise dotfilescommand from help, and removed its standalone CLI docs.Bug Fixes