diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-25 22:37:02 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-25 22:37:02 +0300 |
| commit | 986218c4485d808459377875499c7aa56b213ca7 (patch) | |
| tree | 07b37609b37c66ab79a00854cdd5b19393aa24ee /website | |
| parent | 2ea4878bae8fb2bdd04f07d93aa919be6cfa0142 (diff) | |
docs: document homebrew install
Diffstat (limited to 'website')
| -rw-r--r-- | website/css/style.css | 52 | ||||
| -rw-r--r-- | website/index.html | 76 | ||||
| -rw-r--r-- | website/src/content/docs/index.mdx | 5 | ||||
| -rw-r--r-- | website/src/content/docs/install.mdx | 12 |
4 files changed, 124 insertions, 21 deletions
diff --git a/website/css/style.css b/website/css/style.css index 5cfccdc6..d4a46d8e 100644 --- a/website/css/style.css +++ b/website/css/style.css @@ -392,13 +392,47 @@ samp { border-color: var(--accent); } +.install-panel { + max-width: 650px; + margin-top: 1rem; +} + +.install-methods { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 0.42rem; + padding-left: 0.15rem; + color: var(--muted); + font-size: 0.86rem; + font-weight: 800; +} + +.install-method { + border: 0; + background: transparent; + color: var(--muted); + cursor: pointer; + padding: 0; + font-weight: 800; +} + +.install-method:hover, +.install-method:focus-visible { + color: var(--ink); + outline: none; +} + +.install-method.is-active { + color: var(--ink); +} + .install-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; - max-width: 650px; - margin-top: 1rem; + margin-top: 0.65rem; padding: 0.82rem 0.9rem; border-radius: 999px; background: var(--terminal); @@ -407,12 +441,22 @@ samp { } .install-card code { - overflow: hidden; + min-width: 0; + overflow-x: auto; + overflow-y: hidden; white-space: nowrap; - text-overflow: ellipsis; + scrollbar-width: none; font-size: 0.86rem; } +.install-card code.is-compact { + font-size: clamp(0.68rem, 1.15vw, 0.8rem); +} + +.install-card code::-webkit-scrollbar { + display: none; +} + .prompt { color: #67d7ca; font-family: var(--mono); diff --git a/website/index.html b/website/index.html index 82759785..79e350fe 100644 --- a/website/index.html +++ b/website/index.html @@ -48,7 +48,7 @@ type="font/woff2" crossorigin /> - <link rel="stylesheet" href="/css/style.css?v=18" /> + <link rel="stylesheet" href="/css/style.css?v=19" /> </head> <body> <header class="site-header"> @@ -94,16 +94,43 @@ >Read the docs</a > </div> - <div class="install-card" aria-label="Install command"> - <span class="prompt">$</span> - <code id="install-cmd" - >curl -fsSL https://herdr.dev/install.sh | sh</code - > - <button id="copy-btn" type="button">Copy</button> + <div class="install-panel" aria-label="Install options"> + <div class="install-methods" role="group" aria-label="Install method"> + <button + class="install-method is-active" + type="button" + data-command="curl -fsSL https://herdr.dev/install.sh | sh" + data-size="compact" + aria-pressed="true" + >Direct</button> + <span aria-hidden="true">·</span> + <button + class="install-method" + type="button" + data-command="brew install herdr" + data-size="normal" + aria-pressed="false" + >Homebrew</button> + <span aria-hidden="true">·</span> + <button + class="install-method" + type="button" + data-command="nix run github:ogulcancelik/herdr" + data-size="normal" + aria-pressed="false" + >Nix flake</button> + </div> + <div class="install-card" aria-label="Install command"> + <span class="prompt">$</span> + <code id="install-cmd" class="is-compact" + >curl -fsSL https://herdr.dev/install.sh | sh</code + > + <button id="copy-btn" type="button">Copy</button> + </div> </div> <p class="hero-note"> - Real terminal panes · mouse and keyboard native · single - Rust binary · Linux and macOS · no Electron + Install script · Homebrew core · Nix flake · single Rust + binary · no Electron </p> </div> @@ -872,21 +899,40 @@ $ herdr</code></pre> })(); (function () { - var button = document.getElementById("copy-btn"); + var copyButton = document.getElementById("copy-btn"); var command = document.getElementById("install-cmd"); - if (!button || !command) return; + var methods = Array.prototype.slice.call( + document.querySelectorAll(".install-method"), + ); + if (!copyButton || !command || methods.length === 0) return; + + methods.forEach(function (method) { + method.addEventListener("click", function () { + methods.forEach(function (entry) { + var active = entry === method; + entry.classList.toggle("is-active", active); + entry.setAttribute("aria-pressed", String(active)); + }); + command.textContent = method.dataset.command; + command.classList.toggle( + "is-compact", + method.dataset.size === "compact", + ); + copyButton.textContent = "Copy"; + }); + }); - button.addEventListener("click", async function () { + copyButton.addEventListener("click", async function () { try { await navigator.clipboard.writeText( command.textContent.trim(), ); - button.textContent = "Copied"; + copyButton.textContent = "Copied"; setTimeout(function () { - button.textContent = "Copy"; + copyButton.textContent = "Copy"; }, 1500); } catch (error) { - button.textContent = "Select"; + copyButton.textContent = "Select"; } }); })(); diff --git a/website/src/content/docs/index.mdx b/website/src/content/docs/index.mdx index 065145d1..fd7e9ecb 100644 --- a/website/src/content/docs/index.mdx +++ b/website/src/content/docs/index.mdx @@ -19,6 +19,11 @@ import { Card, CardGrid } from '@astrojs/starlight/components'; Herdr is a terminal-native agent runtime and multiplexer. It gives the whole herd persistent terminal workspaces with panes, tabs, mouse control, state awareness, and an API that agents can use themselves. ```bash +brew install herdr +herdr +``` + +```bash curl -fsSL https://herdr.dev/install.sh | sh herdr ``` diff --git a/website/src/content/docs/install.mdx b/website/src/content/docs/install.mdx index 9852b0f1..533d9890 100644 --- a/website/src/content/docs/install.mdx +++ b/website/src/content/docs/install.mdx @@ -7,7 +7,13 @@ Herdr ships as a single binary for Linux and macOS. ## Install -Run the installer: +Install with Homebrew: + +```bash +brew install herdr +``` + +Or run the installer: ```bash curl -fsSL https://herdr.dev/install.sh | sh @@ -27,12 +33,14 @@ If your shell cannot find `herdr`, restart the terminal or check that the instal ## Update -Herdr checks for new releases and notifies you in the app. You can update manually: +Herdr checks for new releases and notifies you in the app. Direct installs can update manually: ```bash herdr update ``` +`herdr update` is disabled for Homebrew and Nix installs. Update those through `brew upgrade herdr` or your Nix workflow. + ## Install with Nix If you already use Nix, Herdr provides a flake that builds Herdr from source: |
