Skip to content

Add Homebrew Formula#2

Merged
LinekForge merged 2 commits intoLinekForge:mainfrom
lightallspiritthing:feat/homebrew-formula
Apr 19, 2026
Merged

Add Homebrew Formula#2
LinekForge merged 2 commits intoLinekForge:mainfrom
lightallspiritthing:feat/homebrew-formula

Conversation

@lightallspiritthing
Copy link
Copy Markdown
Contributor

Summary

  • Add Formula/forge-hub.rb so users can install via brew install forge-hub
  • Formula depends on Bun, copies source to libexec, wraps cli.ts as forge-hub command
  • Runs forge-hub install post-install to deploy hub-server, hub-client, launchd plist, and MCP registration

Usage

brew tap LinekForge/forge-hub https://github.com/LinekForge/forge-hub
brew install forge-hub

Test plan

  • brew install --build-from-source Formula/forge-hub.rb completes without error
  • forge-hub doctor passes all checks
  • brew test forge-hub passes

post_install runs in a macOS sandbox that blocks writes to $HOME.
Move forge-hub install to a manual step documented in caveats.
@LinekForge LinekForge merged commit 820b73e into LinekForge:main Apr 19, 2026
2 checks passed
LinekForge added a commit that referenced this pull request Apr 19, 2026
With PR #2 merged, update docs to promote `brew install` as the
recommended path for Mac users. Source install documented as fallback
for customize / non-Mac / CI scenarios.

Changes:
- README.md: Homebrew as primary, source as <details> fallback. Bun
  requirement reorganized as 'source-install only' since Homebrew
  auto-installs it via `depends_on`.
- 部署.md: new 'Homebrew 部署(Mac 最快)' section on top; original
  '一键部署(推荐)' renamed to '源码一键部署(开发 / customize / 非 Mac)'.
- Formula/forge-hub.rb: `revision: "HEAD"` → v0.2.0 commit SHA
  (Homebrew docs require 40-char hash as defensive check against
  force-pushed tags); remove empty `cd libexec do ... end` block
  leftover from pre-sandbox-fix draft — dead code after post_install
  was moved to manual step in caveats.

Not changed:
- 配置.md / 架构.md / 运行时状态.md (install-agnostic runtime docs)
- CONTRIBUTING.md (dev workflow still source-based; contributors
  don't brew install their own project)

Follow-up to 翎 (Light's CC) PR #2 — she found the Homebrew sandbox
EPERM issue, diagnosed it, and fixed it in PR's second commit. This
commit closes the docs loop and polishes Formula convention.

Co-authored-by: Forge <270260515+ForgeLinek@users.noreply.github.com>
LinekForge added a commit that referenced this pull request Apr 20, 2026
Credit external contributors from PR #1 / #2 / #3.

Co-authored-by: Forge <270260515+ForgeLinek@users.noreply.github.com>
LinekForge added a commit that referenced this pull request Apr 21, 2026
Addresses 4 of 6 issues reported in #4 by @wangviola7:

- Bug 5 (P0): allowlist/state file writes now use tmp+rename atomic
  pattern (prevents corruption on crash — previously direct writeFileSync)
- Bug 1 (P0): new `fh hub setup` interactive wizard configures
  approval_channels on first install, breaking the chicken-and-egg deadlock
- Bug 4 (P1): hub startup now warns when approval_channels is empty
  or a channel's allowlist has no authorized contacts
- Bug 3 (P1): 503 error response body is parsed and included in
  hub-client denial log (MCP protocol limitation: reason not surfaced
  in Claude Code permission dialog, only in hub-client.log)

Skipped: #2 (Claude Code shell limitation, not hub), #6 (awaiting
contributor reply on outbound approval design).

Co-authored-by: Forge <270260515+ForgeLinek@users.noreply.github.com>
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