Skip to content

feat(dots): add CLI to install, check and update components - #3

Merged
mainframev merged 8 commits into
masterfrom
feat/dots-cli
Oct 25, 2026
Merged

mainframev merged 8 commits into
masterfrom
feat/dots-cli

Conversation

@mainframev

@mainframev mainframev commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

install.sh could only reinstall everything. This PR splits the installer into ordered components and adds a dots CLI that works on them one at a time.

  • Components (install.sh): the steps are grouped into brew gh shell tmux tools link herdr skills and run from one ordered list. ./install.sh runs the same 16 steps in the same order as before. The installers and dots status now share small helpers (Brewfile casks, gh extensions, zsh plugin dir, herdr plugins).
  • dots CLI (repo root, linked to ~/.local/bin/dots by dotstate):
    • dots install <components> installs only what you name, in install order. If a prerequisite is missing it stops with a hint (e.g. npx not found; run: dots install brew) instead of installing it. dots install --all runs the full install.
    • dots list, dots status [--no-gui] and dots update cover the components. update brew only upgrades installed packages, so it never adds casks.
    • dots link, plus doctor, sync, add and remove passed through to dotstate.
  • Also included: two earlier commits that aren't on master yet. One runs brew bundle --verbose; the other drops the Stow-era migration steps, since every machine is now on dotstate.

Testing

  • ./test.sh passes (1 warning: taplo/toml-cli not installed). New checks:
    • the full install runs the exact expected step order;
    • shellcheck on dots;
    • dots against stubs in a temp home: list through the linked command, the missing-prerequisite hint, selection order and dedup, unknown components, and dotstate passthrough;
    • dots and its link stay trackable.
  • Ran dots list, status and doctor on a real macOS machine. Status was correct.
  • Not run for real: dots install, update and link (tested against stubs only). Also not verified: Linux and Codespaces.

@mainframev
mainframev marked this pull request as ready for review October 25, 2026 02:02
@mainframev
mainframev requested a balanced review from Copilot October 25, 2026 02:02
Show per-package progress so a failing Brewfile entry is visible in the
installer output.
Every machine has been migrated to dotstate, so link_dotfiles no longer
needs to move pre-dotstate state or unfold Stow directory links.
Group the installer steps into named components (brew, gh, shell, tmux,
tools, link, herdr, skills) run from one ordered list, so parts of the
setup can be installed on their own. A full install runs the same steps
in the same order. Shared checks used by the installers move into small
helpers, and the ordering tests read the step order from the components.
install.sh could only reinstall everything. dots installs selected
components (failing with a hint when a prerequisite is missing), reports
their status, updates them, and passes doctor/sync/add/remove through to
dotstate. It sources install.sh and is linked to ~/.local/bin/dots by
dotstate.

Copilot AI 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.

🟡 Changes recommended

Skill updates bypass existing collision safeguards, and unresolved update, status, validation, and test-isolation issues need correction.

5 open issues
What changed in this PR

Adds a dots CLI for managing individual parts of the dotfiles setup, reusing ordered installer components while preserving the full installation sequence.

Changes:

  • Adds selective installation, status checks, updates, and dotstate command passthrough.
  • Shares installer helpers, enables verbose Brewfile installation, and removes legacy Stow migration steps.
  • Documents the CLI and adds checks for component ordering, argument handling, prerequisites, and command linking.
File Description
test.sh Adds component-order and stubbed CLI checks; removes legacy migration assertions.
README.md Documents CLI commands and component prerequisites.
install.sh Groups installation steps into components and extracts shared helpers.
dots Adds the component-management CLI and dotstate passthrough.
.gitignore Allows tracking the root CLI script.
.dotstate-profiles.toml Registers the CLI’s home-directory link.

Review effort: Balanced

Comment thread dots Resolved
Comment thread dots Resolved
Comment thread dots Resolved
Comment thread install.sh Resolved
Comment thread test.sh Resolved
The substring check accepted an argument like 'brew gh', which then
matched no component, so dots install, status and update silently did
nothing. Compare each argument against the component names exactly.
The check relied on npx being absent from /usr/bin:/bin, which fails on
hosts with distro-installed Node. Stub command_exists to hide it instead.
dots update skipped the tools component. Update uv with uv self update,
OpenCode with opencode upgrade and ccstatusline with npm, matching how
each is installed.
skills update reinstalls through the same Claude Code paths that
install_agent_skills refuses to replace, so update only installed skills
whose ~/.claude/skills entry is not a real directory. dots status link
trusted dotstate doctor even when dotstate links another checkout; check
repo_path first, sharing the checks with install.sh.
@mainframev
mainframev merged commit b1d18f5 into master Oct 25, 2026
5 checks passed
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.

2 participants