Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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`.
- Added public Homebrew install instructions to README and the product docs.

## [1.1.0] - 2026-05-08

### Highlights
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="hero-inner">
<span class="eyebrow">Command reference</span>
<h1>Local commands for daily memory work.</h1>
<p>After a global installer run, use <code>link &lt;command&gt;</code>. From a source checkout, use <code>python3 link.py &lt;command&gt;</code>.</p>
<p>Install the CLI with <code>brew install gowtham0992/link/link</code> on macOS, or use <code>link &lt;command&gt;</code> after a global agent installer run. From a source checkout, use <code>python3 link.py &lt;command&gt;</code>.</p>
</div>
</header>

Expand Down
13 changes: 9 additions & 4 deletions docs/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ <h1>Turn one local note into agent memory.</h1>
<article class="doc-content">
<h2 id="demo">1. Run The Demo</h2>
<p>The demo is the fastest proof of value. It already has raw sources, wiki pages, memories, backlinks, and graph data.</p>
<p>macOS with Homebrew:</p>
<pre><code>brew install gowtham0992/link/link
link demo
link serve link-demo</code></pre>
<p>Or from source:</p>
<pre><code>git clone https://github.com/gowtham0992/link.git
cd link
python3 link.py demo
Expand All @@ -56,10 +61,10 @@ <h2 id="demo">1. Run The Demo</h2>
</div>
<p>The demo includes one pending memory intentionally, so the review inbox and explain-memory workflow are visible. Run <code>link review-memory prefer-local-personal-memory link-demo</code> if you want memory audit to be fully clear.</p>
<p>Open <code>http://127.0.0.1:3000</code>, then inspect <code>/brief</code>, <code>/memory</code>, <code>/audit</code>, <code>/captures</code>, <code>/propose</code>, and <code>/graph</code>. Link accepts <code>localhost</code> too, but the numeric loopback address avoids slow IPv6 fallback in some Safari setups.</p>
<pre><code>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</code></pre>
<pre><code>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</code></pre>

<h2 id="install">2. Install Link For Your Agent</h2>
<p>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.</p>
Expand Down
14 changes: 10 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,21 @@ <h2>Run a finished memory wiki locally.</h2>
<a class="button" href="troubleshooting.html">Troubleshooting</a>
</div>
</div>
<pre><code>git clone https://github.com/gowtham0992/link.git
<pre><code># 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</code></pre>
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</code></pre>
</div>
</section>

Expand Down
55 changes: 55 additions & 0 deletions packaging/homebrew/Formula/link.rb
Original file line number Diff line number Diff line change
@@ -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
55 changes: 55 additions & 0 deletions packaging/homebrew/README.md
Original file line number Diff line number Diff line change
@@ -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.
33 changes: 33 additions & 0 deletions tests/test_homebrew_formula.py
Original file line number Diff line number Diff line change
@@ -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()
Loading