From 36b40553044f97e0f442fefbb85475ed9e95e533 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 15 Mar 2026 04:56:25 +0000 Subject: [PATCH] Add caveats block to Homebrew formula showing data directory The post_install initializes var/archivebox as the data directory, but users need to know where it is for subsequent commands. The caveats block is shown after brew install/upgrade to guide users. https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn --- .github/workflows/homebrew.yml | 13 +++++++++++++ bin/build_brew.sh | 13 +++++++++++++ brew_dist/archivebox.rb | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 79ecf6e8..70ce8ded 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -101,6 +101,19 @@ ${RESOURCES} system bin/"archivebox", "init" end + def caveats + <<~EOS + ArchiveBox data is stored in: + #{var}/archivebox + + To start archiving, run: + cd #{var}/archivebox && archivebox add 'https://example.com' + + To start the web UI: + cd #{var}/archivebox && archivebox server 0.0.0.0:8000 + EOS + end + test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end diff --git a/bin/build_brew.sh b/bin/build_brew.sh index d94b13ca..80d4aa11 100755 --- a/bin/build_brew.sh +++ b/bin/build_brew.sh @@ -88,6 +88,19 @@ ${RESOURCES} system bin/"archivebox", "init" end + def caveats + <<~EOS + ArchiveBox data is stored in: + #{var}/archivebox + + To start archiving, run: + cd #{var}/archivebox && archivebox add 'https://example.com' + + To start the web UI: + cd #{var}/archivebox && archivebox server 0.0.0.0:8000 + EOS + end + test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end diff --git a/brew_dist/archivebox.rb b/brew_dist/archivebox.rb index 5eb56de8..3e4d2f31 100644 --- a/brew_dist/archivebox.rb +++ b/brew_dist/archivebox.rb @@ -31,6 +31,19 @@ class Archivebox < Formula system bin/"archivebox", "init" end + def caveats + <<~EOS + ArchiveBox data is stored in: + #{var}/archivebox + + To start archiving, run: + cd #{var}/archivebox && archivebox add 'https://example.com' + + To start the web UI: + cd #{var}/archivebox && archivebox server 0.0.0.0:8000 + EOS + end + test do assert_match version.to_s, shell_output("#{bin}/archivebox version") end