From d8af0f395a7785d0279c3ed93b44a18f5d1a192c Mon Sep 17 00:00:00 2001 From: Gowtham Date: Mon, 11 May 2026 00:54:09 -0600 Subject: [PATCH 1/2] Add Homebrew tap packaging --- CHANGELOG.md | 4 +++ packaging/homebrew/Formula/link.rb | 55 ++++++++++++++++++++++++++++++ packaging/homebrew/README.md | 55 ++++++++++++++++++++++++++++++ tests/test_homebrew_formula.py | 33 ++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 packaging/homebrew/Formula/link.rb create mode 100644 packaging/homebrew/README.md create mode 100644 tests/test_homebrew_formula.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 995552a..154c821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Release sections use `MAJOR.MINOR.PATCH` versions that match `link-mcp` on PyPI ## [Unreleased] +### Added + +- Added tap-ready Homebrew Formula packaging and maintainer instructions for publishing `gowtham0992/homebrew-link`. + ## [1.1.0] - 2026-05-08 ### Highlights diff --git a/packaging/homebrew/Formula/link.rb b/packaging/homebrew/Formula/link.rb new file mode 100644 index 0000000..797e258 --- /dev/null +++ b/packaging/homebrew/Formula/link.rb @@ -0,0 +1,55 @@ +class Link < Formula + desc "Local Markdown memory for AI agents" + homepage "https://github.com/gowtham0992/link" + url "https://github.com/gowtham0992/link.git", + tag: "v1.1.0", + revision: "8587b6900829025ee084795b7d73ab207111bf8d" + license "MIT" + head "https://github.com/gowtham0992/link.git", branch: "main" + + depends_on "python@3.14" + + def python3 + Formula["python@3.14"].opt_bin/"python3.14" + end + + def install + libexec.install "link.py", "serve.py", "LINK.md", ".linkignore" + libexec.install "logo.svg" + libexec.install "logo.png" if File.exist?("logo.png") + + (libexec/"mcp_package").mkpath + (libexec/"mcp_package").install "mcp_package/link_core" + + (bin/"link").write <<~SH + #!/bin/sh + exec "#{python3}" "#{libexec}/link.py" "$@" + SH + end + + def caveats + <<~EOS + Try Link: + link demo + link serve link-demo + + Then open: + http://127.0.0.1:3000 + http://127.0.0.1:3000/graph + + To create a personal wiki: + link init ~/link + + For MCP clients, install link-mcp with the agent installer or a venv: + python3 -m venv ~/.link-mcp-venv + ~/.link-mcp-venv/bin/python -m pip install --upgrade pip link-mcp + EOS + end + + test do + system bin/"link", "--version" + system bin/"link", "demo", testpath/"link-demo", "--force" + system bin/"link", "validate", testpath/"link-demo" + system bin/"link", "status", "--validate", testpath/"link-demo" + end +end diff --git a/packaging/homebrew/README.md b/packaging/homebrew/README.md new file mode 100644 index 0000000..05ecb2e --- /dev/null +++ b/packaging/homebrew/README.md @@ -0,0 +1,55 @@ +# Homebrew Tap Packaging + +This directory contains the tap-ready Formula for Link. Publish it in a +separate repository named `homebrew-link` so users can install Link with: + +```bash +brew tap gowtham0992/link +brew install link +``` + +The Formula installs Link's CLI and local web runtime. It does not bundle the +MCP SDK; MCP clients should keep using the existing `link-mcp` PyPI package or +the agent installers, which create the managed `~/.link-mcp-venv`. + +## Publish The Tap + +Create the tap repository once: + +```bash +brew tap-new gowtham0992/link +``` + +Copy the Formula into the tap: + +```bash +cp packaging/homebrew/Formula/link.rb "$(brew --repo gowtham0992/link)/Formula/link.rb" +``` + +Validate locally: + +```bash +brew audit --strict --online gowtham0992/link/link +brew install --build-from-source gowtham0992/link/link +brew test gowtham0992/link/link +link --version +link demo +``` + +Then push the tap repo: + +```bash +cd "$(brew --repo gowtham0992/link)" +git status --short +git add Formula/link.rb +git commit -m "Add Link formula" +git push origin main +``` + +## Update For A New Release + +1. Tag the Link repo release. +2. Update `tag` and `revision` in `Formula/link.rb`. +3. Copy the Formula into the tap repo. +4. Run `brew audit`, `brew install --build-from-source`, and `brew test`. +5. Push the tap repo. diff --git a/tests/test_homebrew_formula.py b/tests/test_homebrew_formula.py new file mode 100644 index 0000000..66d6419 --- /dev/null +++ b/tests/test_homebrew_formula.py @@ -0,0 +1,33 @@ +import re +import unittest +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] + + +class HomebrewFormulaTests(unittest.TestCase): + def test_formula_installs_link_runtime_and_bundled_core(self): + formula = (ROOT / "packaging/homebrew/Formula/link.rb").read_text(encoding="utf-8") + + self.assertIn('desc "Local Markdown memory for AI agents"', formula) + self.assertIn('license "MIT"', formula) + self.assertIn('depends_on "python@3.14"', formula) + self.assertIn('libexec.install "link.py", "serve.py", "LINK.md", ".linkignore"', formula) + self.assertIn('(libexec/"mcp_package").install "mcp_package/link_core"', formula) + self.assertIn('exec "#{python3}" "#{libexec}/link.py" "$@"', formula) + + def test_formula_uses_pinned_release_tag_and_revision(self): + formula = (ROOT / "packaging/homebrew/Formula/link.rb").read_text(encoding="utf-8") + + self.assertRegex(formula, r'tag:\s+"v\d+\.\d+\.\d+"') + self.assertRegex(formula, r'revision:\s+"[0-9a-f]{40}"') + + tag = re.search(r'tag:\s+"([^"]+)"', formula) + revision = re.search(r'revision:\s+"([^"]+)"', formula) + self.assertIsNotNone(tag) + self.assertIsNotNone(revision) + + +if __name__ == "__main__": + unittest.main() From 6aa7abbfc8f51d8a9440cf81cdd0fb73d46966a4 Mon Sep 17 00:00:00 2001 From: Gowtham Date: Mon, 11 May 2026 01:04:31 -0600 Subject: [PATCH 2/2] Document Homebrew install path --- CHANGELOG.md | 1 + README.md | 19 +++++++++++++++++++ docs/cli.html | 2 +- docs/getting-started.html | 13 +++++++++---- docs/index.html | 14 ++++++++++---- 5 files changed, 40 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 154c821..440201b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Release sections use `MAJOR.MINOR.PATCH` versions that match `link-mcp` on PyPI ### Added - Added tap-ready Homebrew Formula packaging and maintainer instructions for publishing `gowtham0992/homebrew-link`. +- Added public Homebrew install instructions to README and the product docs. ## [1.1.0] - 2026-05-08 diff --git a/README.md b/README.md index edb313f..b821e81 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,16 @@ into local memory agents can query. Run the demo first. It creates a complete local wiki with raw sources, wiki pages, one starter memory, graph data, and query packets ready to inspect. +macOS with Homebrew: + +```bash +brew install gowtham0992/link/link +link demo +link serve link-demo +``` + +Or from source: + ```bash git clone https://github.com/gowtham0992/link.git cd link @@ -68,6 +78,15 @@ add your own auth layer. Try the value loop: +```bash +link query "why does Link help agents?" link-demo --budget small +link brief "working on agent memory" link-demo +link benchmark "agent memory" link-demo +link status --validate link-demo +``` + +From a source checkout, use `python3 link.py ...`: + ```bash python3 link.py query "why does Link help agents?" link-demo --budget small python3 link.py brief "working on agent memory" link-demo diff --git a/docs/cli.html b/docs/cli.html index 6518945..3be9ff4 100644 --- a/docs/cli.html +++ b/docs/cli.html @@ -28,7 +28,7 @@
Command reference

Local commands for daily memory work.

-

After a global installer run, use link <command>. From a source checkout, use python3 link.py <command>.

+

Install the CLI with brew install gowtham0992/link/link on macOS, or use link <command> after a global agent installer run. From a source checkout, use python3 link.py <command>.

diff --git a/docs/getting-started.html b/docs/getting-started.html index faacb83..eab66e0 100644 --- a/docs/getting-started.html +++ b/docs/getting-started.html @@ -46,6 +46,11 @@

Turn one local note into agent memory.

1. Run The Demo

The demo is the fastest proof of value. It already has raw sources, wiki pages, memories, backlinks, and graph data.

+

macOS with Homebrew:

+
brew install gowtham0992/link/link
+link demo
+link serve link-demo
+

Or from source:

git clone https://github.com/gowtham0992/link.git
 cd link
 python3 link.py demo
@@ -56,10 +61,10 @@ 

1. Run The Demo

The demo includes one pending memory intentionally, so the review inbox and explain-memory workflow are visible. Run link review-memory prefer-local-personal-memory link-demo if you want memory audit to be fully clear.

Open http://127.0.0.1:3000, then inspect /brief, /memory, /audit, /captures, /propose, and /graph. Link accepts localhost too, but the numeric loopback address avoids slow IPv6 fallback in some Safari setups.

-
python3 link.py query "why does Link help agents?" link-demo --budget small
-python3 link.py brief "working on agent memory" link-demo
-python3 link.py benchmark "agent memory" link-demo
-python3 link.py status --validate link-demo
+
link query "why does Link help agents?" link-demo --budget small
+link brief "working on agent memory" link-demo
+link benchmark "agent memory" link-demo
+link status --validate link-demo

2. Install Link For Your Agent

From the cloned checkout, run the installer for the agent you use. Re-running the same installer updates code and instructions without replacing existing wiki data.

diff --git a/docs/index.html b/docs/index.html index 3359db7..3c5549a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -72,15 +72,21 @@

Run a finished memory wiki locally.

Troubleshooting -
git clone https://github.com/gowtham0992/link.git
+        
# macOS
+brew install gowtham0992/link/link
+link demo
+link serve link-demo
+
+# or from source
+git clone https://github.com/gowtham0992/link.git
 cd link
 python3 link.py demo
 python3 link.py serve link-demo
 
 # then try
-python3 link.py query "why does Link help agents?" link-demo --budget small
-python3 link.py brief "working on agent memory" link-demo
-python3 link.py benchmark "agent memory" link-demo
+link query "why does Link help agents?" link-demo --budget small +link brief "working on agent memory" link-demo +link benchmark "agent memory" link-demo