From 4d7bc7deb83fcd25e045015173de52dfab19451e Mon Sep 17 00:00:00 2001 From: Kayvan Sylvan Date: Wed, 9 Jul 2025 00:11:15 -0700 Subject: [PATCH] docs: update restructure guide with Homebrew and go install details ### CHANGES - Document required Homebrew formula update for new structure. - Add new `go install` commands for all tools. - Specify new build path is `./cmd/fabric`. - Include link to the draft Homebrew PR. --- docs/Project-Restructured.md | 42 +++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/docs/Project-Restructured.md b/docs/Project-Restructured.md index de08717b..1fae5ca4 100644 --- a/docs/Project-Restructured.md +++ b/docs/Project-Restructured.md @@ -151,7 +151,7 @@ This is the high-level view of the proposed structure. It incorporates the core * ✅ Run `go build ./cmd/to_pdf` to ensure the PDF tool compiles correctly. * ✅ Execute the full test suite with `go test ./...`. * ✅ Run all applications and manually test the CLI, API, pattern loading, and helper tools to confirm all functionality is intact. - * ⚠️ Verify that external packaging and distribution methods, such as the Homebrew package, continue to build correctly after the reorganization. + * ⚠️ Verify that external packaging and distribution methods, such as the Homebrew package, continue to build correctly after the reorganization. **Note:** The Homebrew formula will need to be updated to build from `./cmd/fabric` instead of the root directory. * ⚠️ Test that `go install github.com/danielmiessler/fabric/cmd/fabric@latest` works for all three tools. --- @@ -176,4 +176,44 @@ This is the high-level view of the proposed structure. It incorporates the core * External packaging verification (Homebrew, etc.) - requires separate testing * `go install` command verification - requires publishing/tagging +### **Required Homebrew Formula Update** + +WE have a draft PR ready here: + +The current Homebrew formula at `https://raw.githubusercontent.com/ksylvan/homebrew-core/refs/heads/main/Formula/f/fabric-ai.rb` will need to be updated to work with the new project structure: + +**Current formula build command:** + +```ruby +def install + system "go", "build", *std_go_args(ldflags: "-s -w") +end +``` + +**Required update for new structure:** + +```ruby +def install + system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/fabric" +end +``` + +**Additional considerations:** + +* The formula currently builds from the root `main.go` (which no longer exists) +* After restructuring, it needs to build from `./cmd/fabric` +* The binary name and test commands should remain the same +* All three tools (`fabric`, `code_helper`, `to_pdf`) could potentially be packaged, but the main `fabric` binary is the primary target + +**`go install` commands for new structure:** + +```bash +# Main fabric tool +go install github.com/danielmiessler/fabric/cmd/fabric@latest + +# Additional tools (if desired) +go install github.com/danielmiessler/fabric/cmd/code_helper@latest +go install github.com/danielmiessler/fabric/cmd/to_pdf@latest +``` + The project now follows standard Go conventions and is ready for review and merge.