Skip to content

feat(bootstrap): consolidate dotfiles commands - #11436

Merged
jdx merged 5 commits into
mainfrom
agent/deprecate-dotfiles-command
Jul 28, 2026
Merged

feat(bootstrap): consolidate dotfiles commands#11436
jdx merged 5 commits into
mainfrom
agent/deprecate-dotfiles-command

Conversation

@jdx

@jdx jdx commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • run pre-dotfiles and post-dotfiles hooks around mise bootstrap dotfiles apply, including config reload and dry-run simulation
  • move dotfiles add and dotfiles edit into the canonical mise bootstrap dotfiles command tree
  • hide and deprecate the top-level mise dotfiles compatibility command, with warnings starting in 2027.2.0 and removal in 2028.2.0
  • update and regenerate CLI, manpage, help, and dotfiles documentation

Root cause

mise bootstrap dotfiles apply delegated directly to the same implementation as mise 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-fix
  • mise run render
  • mise run test:e2e e2e/cli/test_bootstrap e2e/cli/test_dotfiles_files

Context: #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 dotfiles or relying on old dry-run hook previews.

Overview
Dotfiles are now managed through mise bootstrap dotfiles (add, edit, apply, status). The top-level mise dotfiles command 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 apply now matches full bootstrap dotfiles behavior: it runs pre-dotfiles and post-dotfiles hooks, reloads config after a real apply for post-dotfiles, and skips post-dotfiles if the user declines the apply prompt. File/edit apply helpers 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

    • Added add and edit subcommands under mise bootstrap dotfiles.
    • Improved dotfiles bootstrapping to run pre-dotfiles and post-dotfiles hooks as part of the dotfiles apply flow.
  • Documentation

    • Updated guides, CLI reference, and man page examples to use mise bootstrap dotfiles.
    • Deprecated and hid the top-level mise dotfiles command from help, and removed its standalone CLI docs.
  • Bug Fixes

    • Corrected force-apply guidance to reference the bootstrap dotfiles command.
    • Refined dry-run behavior so templated hooks don’t execute or create hook markers.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds bootstrap dotfiles add and edit, hides and deprecates top-level dotfiles commands, moves documentation to the bootstrap namespace, refactors apply orchestration, and expands hook and CLI end-to-end coverage.

Changes

Bootstrap Dotfiles Workflow

Layer / File(s) Summary
Bootstrap dotfiles command contract
mise.usage.kdl, src/assets/mise-extra.usage.kdl, src/cli/command_effects.rs
Adds bootstrap add and edit commands, hides legacy dotfiles commands, classifies write operations, and updates source links.
Bootstrap dotfiles dispatch and apply orchestration
src/cli/bootstrap.rs, src/cli/dotfiles/apply.rs, src/cli/dotfiles/mod.rs
Dispatches bootstrap subcommands, extracts dotfile requests, runs pre/post hooks, applies files, and supports dry-run configuration simulation.
Command documentation and invocation migration
docs/**, man/man1/mise.1, src/cli/dotfiles/*.rs, src/system/*.rs
Documents bootstrap-scoped commands, removes legacy CLI references, and updates generated help and explanatory comments.
Bootstrap dotfiles end-to-end validation
e2e/cli/test_bootstrap, e2e/cli/test_dotfiles_files
Validates command visibility, bootstrap subcommands, dry-run/apply behavior, and dotfiles hook phases.

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
Loading

Possibly related PRs

  • jdx/mise#11300: Updates related dotfiles command visibility and generated documentation sources.
  • jdx/mise#11306: Adds command-effect classifications for bootstrap dotfiles write commands.
  • jdx/mise#11388: Overlaps the dotfiles apply runtime paths.

Poem

A bunny hops through bootstrap’s lane,
Dotfiles bloom from shell to chain.
Add and edit now join the ride,
Hooks run before and after inside.
Old commands hide beneath the dew—
New paths spring fresh and true!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: consolidating dotfiles commands under bootstrap.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/cli/bootstrap.rs
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Consolidates dotfiles management beneath the bootstrap command tree.

  • Adds bootstrap dotfiles add and edit subcommands while hiding and deprecating the top-level compatibility command.
  • Wraps bootstrap dotfiles apply with pre-dotfiles and post-dotfiles hooks and reloads or simulates configuration afterward.
  • Avoids rendering template-managed configuration during dry runs and updates generated CLI documentation, manpages, and end-to-end coverage.

Confidence Score: 3/5

The 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

Filename Overview
src/cli/bootstrap.rs Adds lifecycle hooks and dry-run configuration reconstruction around nested dotfiles apply.
src/cli/dotfiles/apply.rs Refactors request construction and exposes apply completion so bootstrap orchestration can distinguish a declined operation.
mise.usage.kdl Moves add and edit into the canonical bootstrap dotfiles command tree and hides the deprecated top-level commands.
e2e/cli/test_bootstrap Adds coverage for hook execution, declined apply behavior, and template-safe dry-run handling.
e2e/cli/test_dotfiles_files Updates dotfiles command coverage to use the canonical nested command while retaining compatibility checks.

Reviews (5): Last reviewed commit: "fix(bootstrap): skip post-hook after dec..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 13e183a and 3194d94.

📒 Files selected for processing (25)
  • docs/.vitepress/cli_commands.ts
  • docs/bootstrap.md
  • docs/cli/bootstrap/dotfiles.md
  • docs/cli/bootstrap/dotfiles/add.md
  • docs/cli/bootstrap/dotfiles/edit.md
  • docs/cli/dotfiles.md
  • docs/cli/dotfiles/apply.md
  • docs/cli/dotfiles/status.md
  • docs/cli/index.md
  • docs/dotfiles.md
  • docs/public/llms.txt
  • e2e/cli/test_bootstrap
  • e2e/cli/test_dotfiles_files
  • man/man1/mise.1
  • mise.usage.kdl
  • src/assets/mise-extra.usage.kdl
  • src/cli/bootstrap.rs
  • src/cli/command_effects.rs
  • src/cli/dotfiles/add.rs
  • src/cli/dotfiles/apply.rs
  • src/cli/dotfiles/edit.rs
  • src/cli/dotfiles/mod.rs
  • src/cli/dotfiles/status.rs
  • src/system/edits.rs
  • src/system/files.rs
💤 Files with no reviewable changes (3)
  • docs/cli/dotfiles/apply.md
  • docs/cli/dotfiles.md
  • docs/cli/dotfiles/status.md

Comment thread src/cli/bootstrap.rs
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▁▂▃▂▃▆▅▄▅▅▅▄▆▅▅▆▄█ 84,383,505 → 84,518,965 +0.16% 19.00 → 20.94ms +10.25%
hook-env ▁▁▁▁▂▄▄▄▄▅▄▃▄▅▄▄██ 87,192,038 → 87,213,330 +0.02% 19.45 → 21.28ms +9.41%
ls ▁▃▃▂▃▆▆▅▆▆▄▄▅▅▅▅▄█ 76,419,210 → 76,575,453 +0.20% 15.74 → 19.09ms +21.23%
registry █▇▇▇▇▇▇███▃▃▄▃▃▃▁▄ 50,022,469 → 50,068,087 +0.09% 13.07 → 13.98ms +6.97%
startup ▅▅▅▅▅▅▅▄▄▅▃▃▄▃▃▂▁█ 15,657,616 → 15,734,777 +0.49% 8.97 → 9.73ms +8.49%

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.

f6c7a569f0ef vs 66930e2ddae9 · measured on the runner, not pushed to the history.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3194d94 and dbfb704.

📒 Files selected for processing (2)
  • e2e/cli/test_bootstrap
  • src/cli/bootstrap.rs

Comment thread src/cli/bootstrap.rs
Comment thread src/cli/bootstrap.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/cli/bootstrap.rs
Comment thread src/cli/bootstrap.rs
@jdx
jdx enabled auto-merge (squash) July 28, 2026 19:13
@jdx
jdx merged commit 1deee62 into main Jul 28, 2026
36 of 37 checks passed
@jdx
jdx deleted the agent/deprecate-dotfiles-command branch July 28, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant