Skip to content

feat(brew): install openspec via Homebrew and drop stale OpenSpec zshrc block - #32

Merged
intothefire merged 1 commit into
mainfrom
feat/openspec-brew
Nov 6, 2026
Merged

intothefire merged 1 commit into
mainfrom
feat/openspec-brew

Conversation

@intothefire

Copy link
Copy Markdown
Owner

Why

The OpenSpec CLI should come from these dotfiles, not an ad-hoc npm global. The .zshrc OpenSpec block pointed fpath at ~/.oh-my-zsh/custom/completions, and oh-my-zsh has been removed.

What changed

  • dot_config/brew/Brewfile.tmpl: added brew "openspec" to the dev toolchain section, which is installed on every machine (like gh). The formula installs _openspec into $HOMEBREW_PREFIX/share/zsh/site-functions.
  • dot_zshrc: removed the # OPENSPEC:START/END markers and the oh-my-zsh fpath line. autoload -Uz compinit; compinit is kept. The brief assumed .zshrc already had its own compinit, but this block held the only one. The fragments (core, plugins/fzf-tab, wt) depend on it. It is now a plain block labelled "Completion init", placed right after the brew fpath setup.
  • CLAUDE.md: OpenSpec is no longer listed as a tool-managed .zshrc block, and the doc now records why the block is gone.

Verified

  • zsh -n dot_zshrc passes.
  • An interactive zsh -i with the new .zshrc (via a temp ZDOTDIR) defines compdef, and _comps has 1752 entries, so compinit still runs.
  • chezmoi execute-template < dot_config/brew/Brewfile.tmpl renders brew "openspec".
  • chezmoi diff ~/.zshrc ~/.config/brew/Brewfile shows only the intended changes, plus the drift noted below.
  • chezmoi apply and brew install were not run (per brief). The _openspec completion has not been exercised, because the formula is not installed yet.

Action needed after merge + apply

  • run_once_01 runs brew bundle, but it does not hash the Brewfile. On an existing machine, a Brewfile change does not re-trigger it. Run brew bundle --file ~/.config/brew/Brewfile (or brew install openspec).
  • The formula depends on Homebrew's node, so that gets installed alongside the mise-managed Node.
  • An openspec npm global already exists under mise Node (~/.local/share/mise/installs/node/24.22.1/bin/openspec). PATH order decides which one wins, so npm uninstall -g @fission-ai/openspec (under mise Node) makes the brew one canonical.

Noticed, not changed

  • The deployed ~/.zshrc has a local addition that is not in source: a trailing # bun completions line sourcing ~/.bun/_bun. The next chezmoi apply will remove it. The bun section earlier in .zshrc already sources _bun, so nothing is lost.
  • If the OpenSpec CLI's own completion installer is ever run again, it may re-insert an OPENSPEC:START block.

🤖 Generated with Claude Code

…rc block

Add openspec to the Brewfile dev toolchain; its zsh completion lands in
Homebrew site-functions, already on fpath before compinit. Remove the
OPENSPEC:START/END markers and the oh-my-zsh fpath entry, keeping its
compinit, which was the only one in .zshrc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@intothefire
intothefire merged commit 1d64d2d into main Nov 6, 2026
@intothefire
intothefire deleted the feat/openspec-brew branch November 6, 2026 16:39
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