AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.
Rust agent-memoryai-agentsbm25claude-codeclicode-searchcursordatabaseelasticsearchfull-text-searchhybrid-searchjsonllocal-firstmcpmcp-servermodel-context-protocolragrustsearch-enginevector-search
fix(docs): the block refused on macOS, and the agent-facing copy was unpasteable
xerj-org62158208b579
diff --git a/landing/docs/install.html b/landing/docs/install.htmlindex e6a1936c3..8805776de 100644--- a/landing/docs/install.html+++ b/landing/docs/install.html@@ -156,7 +156,7 @@curl -fsSLO "$base/$asset"curl -fsSLO "$base/$asset.sha256"- want=$(sha256sum "$asset" | cut -d ' ' -f 1) # macOS: shasum -a 256 "$asset" | cut -d ' ' -f 1+ want=$( { sha256sum "$asset" 2>/dev/null || shasum -a 256 "$asset"; } | cut -d ' ' -f 1 )case "$want" in *[!0-9a-f]*|"") want="" ;; esacif [ "${#want}" -ne 64 ]; thenecho "no working SHA-256 tool — refusing to install an unverified $asset" >&2@@ -171,8 +171,8 @@sudo install -m 0755 "$stage/xerj" /usr/local/bin/xerjxerj --version)</pre>- <p>The digest is computed here and the <code class="inline">.sha256</code> is searched for that exact line, rather than letting <code class="inline">sha256sum -c</code> read a filename out of a file that arrived from the same place as the archive. <code class="inline">sha256sum -c</code> skips <code class="inline">#</code> comment lines silently and exits <code class="inline">0</code> if any one line verified, so a <code class="inline">.sha256</code> carrying a valid digest for some other file passes while the archive is never hashed at all. Both patterns accept GNU text mode and <code class="inline">-b</code> binary mode, and <code class="inline">tr -d '\r'</code> accepts a checksum file written on Windows.</p>- <p>Three details carry the weight. <strong>The digest is length- and hex-checked before it is used.</strong> Without that, a host with no <code class="inline">sha256sum</code> — stock macOS, which is exactly who the comment above sends to <code class="inline">shasum</code> — leaves <code class="inline">want</code> empty, the two patterns collapse to <code class="inline">" $asset"</code> and <code class="inline">" *$asset"</code>, and a <code class="inline">.sha256</code> containing that literal line satisfies the check with nothing hashed. <strong>Extraction and install are inside the guard</strong>, not after it: an earlier version of this page printed the mismatch and then ran <code class="inline">sudo install</code> on the next line, which installs whatever an older extraction left behind. <strong>A refusal exits non-zero</strong>, so a Dockerfile <code class="inline">RUN</code>, a CI step, or an agent sees the failure instead of a silent success.</p>+ <p>The digest is computed here and the <code class="inline">.sha256</code> is searched for that exact line, rather than letting <code class="inline">sha256sum -c</code> read a filename out of a file that arrived from the same place as the archive. <code class="inline">sha256sum -c</code> skips <code class="inline">#</code> comment lines silently and exits <code class="inline">0</code> when at least one line verified and no <em>listed</em> line failed, so a <code class="inline">.sha256</code> carrying a comment naming the archive plus a valid digest for some other file passes while the archive is never hashed at all. (It does exit <code class="inline">1</code> on a listed line that fails; the attack does not need one.) Both patterns accept GNU text mode and <code class="inline">-b</code> binary mode, and <code class="inline">tr -d '\r'</code> accepts a checksum file written on Windows.</p>+ <p>Three details carry the weight. <strong>The digest is length- and hex-checked before it is used.</strong> Without that, a host where neither hashing tool runs leaves <code class="inline">want</code> empty, the two patterns collapse to <code class="inline">" $asset"</code> and <code class="inline">" *$asset"</code>, and a <code class="inline">.sha256</code> containing that literal line satisfies the check with nothing hashed. <strong>Extraction and install are inside the guard</strong>, not after it: an earlier version of this page printed the mismatch and then ran <code class="inline">sudo install</code> on the next line, which installs whatever an older extraction left behind. <strong>A refusal exits non-zero</strong>, so a Dockerfile <code class="inline">RUN</code>, a CI step, or an agent sees the failure instead of a silent success.</p><p>Deploying to a host with no runtime internet access? Follow the <a href="/docs/recipes/air-gapped-deployment.html">air-gapped deployment recipe</a> for release checksums, optional local neural model files, and the loopback/auth defaults.</p><p><strong>macOS Gatekeeper:</strong> the release binaries are not code-signed or notarized. A tarball fetched with <code class="inline">curl</code> (both the one-liner and the commands above) is not quarantined and runs as-is. A tarball downloaded through a <em>browser</em> is: macOS attaches <code class="inline">com.apple.quarantine</code> and the first launch is blocked with <em>"cannot be opened because the developer cannot be verified"</em>. Clear it once, then run normally:</p><pre class="code">$ xattr -d com.apple.quarantine ./xerj</pre>diff --git a/landing/llms.txt b/landing/llms.txtindex 6d71bd4c3..c91d9ee69 100644--- a/landing/llms.txt+++ b/landing/llms.txt@@ -112,7 +112,7 @@ Provenance rules, not optional: **state in the first line of the PR body that an- Linux / macOS: `curl -fsSL https://xerj.org/get | sh`- Windows PowerShell: `irm https://xerj.org/get.ps1 | iex`-The installer detects OS/CPU (Linux x86_64/aarch64 static musl, macOS x86_64/arm64, Windows x64/ARM64), downloads the latest GitHub release, verifies its SHA-256 (fail-closed: a missing or mismatched checksum aborts, and the `sh` installer tries `sha256sum`, `shasum`, `openssl`, `sha256`, `busybox` and `cksum` in turn and **refuses to install** if none exists — installing unverified is opt-in only, with `XERJ_INSECURE_SKIP_CHECKSUM=1`), and installs one `xerj` binary — default `~/.local/bin` on Unix (it prints the path and a PATH hint; it does not edit your shell profile), `%LOCALAPPDATA%\Programs\xerj` on Windows (added to user PATH; opt out with `XERJ_NO_PATH=1`). Pin with `XERJ_VERSION=vX.Y.Z`; both honour `XERJ_INSTALL_DIR`. Current release: **v1.0.0-rc.16** (2026-08-13).+The installer detects OS/CPU (Linux x86_64/aarch64 static musl, macOS x86_64/arm64, Windows x64/ARM64), downloads the latest GitHub release, verifies its SHA-256 (fail-closed: a missing or mismatched checksum aborts, and the `sh` installer tries `sha256sum`, `shasum`, `openssl`, `sha256`, `busybox` and `cksum` in turn and **refuses to install** if none exists — installing unverified is opt-in only, with `XERJ_INSECURE_SKIP_CHECKSUM=1`), and installs one `xerj` binary — default `~/.local/bin` on Unix (it prints the path and a PATH hint; it does not edit your shell profile), `%LOCALAPPDATA%\Programs\xerj` on Windows (added to user PATH; opt out with `XERJ_NO_PATH=1`). Pin with `XERJ_VERSION=vX.Y.Z`; both honour `XERJ_INSTALL_DIR`. Current release: **v1.0.0-rc.17** (2026-08-15).**PATH consequence — read this before the next command.** Because the installer does not edit your shell profile, in a fresh shell `~/.local/bin` is often not on `PATH` and a bare `xerj …` fails with `command not found`. Either call it by full path (`$HOME/.local/bin/xerj …`) or `export PATH="$HOME/.local/bin:$PATH"` first. Every `xerj` below assumes you did one of those.@@ -121,15 +121,22 @@ The installer detects OS/CPU (Linux x86_64/aarch64 static musl, macOS x86_64/arm```(set -eu- base=https://github.com/xerj-org/xerj/releases/download/<tag> # e.g. tag v1.0.0-rc.17- asset=xerj-<version-without-the-v>-<target>.tar.gz # .zip on pc-windows-msvc+ # Set these two. They are real values, not placeholders: the block is pasteable as-is.+ tag=v1.0.0-rc.17 # the release you approved+ target=x86_64-unknown-linux-musl # your platform's triple++ base="https://github.com/xerj-org/xerj/releases/download/$tag"+ stage="xerj-${tag#v}-$target" # the archive's top-level directory+ asset="$stage.tar.gz" # .zip on pc-windows-msvccurl -fL -O "$base/$asset"curl -fL -O "$base/$asset.sha256"# Compute the digest and demand the .sha256 contain that exact line. Do NOT use- # `sha256sum -c`: it skips `#` comments silently and exits 0 if any one line- # verified, so a .sha256 naming some other file passes without ever hashing $asset.- want=$(sha256sum "$asset" | cut -d ' ' -f 1) # macOS: shasum -a 256 "$asset" | cut -d ' ' -f 1+ # `sha256sum -c`: it skips `#` comment lines silently, so a .sha256 carrying a+ # comment naming $asset plus a valid line for some OTHER file exits 0 with+ # $asset never hashed. (It does exit 1 on a listed line that fails - the attack+ # simply does not need one.)+ want=$( { sha256sum "$asset" 2>/dev/null || shasum -a 256 "$asset"; } | cut -d ' ' -f 1 )# Assert it IS a digest first. With no SHA-256 tool $want is empty, the patterns# below collapse to " $asset" / " *$asset", and a .sha256 carrying that literal# line verifies with nothing hashed.@@ -140,8 +147,9 @@ The installer detects OS/CPU (Linux x86_64/aarch64 static musl, macOS x86_64/arm| LC_ALL=C grep -qxF -e "$want $asset" -e "$want *$asset" \|| { echo "CHECKSUM MISMATCH for $asset - do not install it" >&2; exit 1; }- tar -xzf "$asset" # unpacks xerj-<version>-<target>/xerj- install -m 755 xerj-*/xerj ~/.local/bin/xerj+ tar -xzf "$asset" # unpacks $stage/xerj+ mkdir -p ~/.local/bin+ install -m 755 "$stage/xerj" ~/.local/bin/xerj)```