Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix: pre-landing review fixes (hosted block: check for an existing gbrain entry before adding)

garrytand3c1be37e79e
diff --git a/INSTALL_FOR_AGENTS.md b/INSTALL_FOR_AGENTS.md
index dc795f3a6d..955b7764d6 100644
--- a/INSTALL_FOR_AGENTS.md
+++ b/INSTALL_FOR_AGENTS.md
@@ -9,9 +9,9 @@
> curl -fsSL https://bun.sh/install | bash && export PATH="$HOME/.bun/bin:$PATH" # skip if Bun 1.4.4+ is installed
> bun install -g github:garrytan/gbrain#latest-stable # the gbrain CLI only; no local brain
> # Claude Code (an existing gbrain entry is kept):
-> (claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp || claude mcp get gbrain) && gbrain setup claude-code --instructions-only
-> # Codex:
-> (codex mcp add gbrain --url https://gbrain.io/mcp || codex mcp get gbrain) && gbrain setup codex --instructions-only
+> (claude mcp get gbrain || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
+> # Codex (an existing gbrain entry is kept):
+> (codex mcp get gbrain || codex mcp add gbrain --url https://gbrain.io/mcp) && gbrain setup codex --instructions-only
> ```
>
> `gbrain setup <harness> --instructions-only` tells the agent the brain is there; agents seldom call an MCP server nobody told them about. It writes the [brain-first block](docs/guides/setup.md#brain-first-instructions) into `~/.claude/CLAUDE.md` or Codex's `AGENTS.md` (a non-empty `AGENTS.override.md` instead when Codex has one) with a per-turn rule hook, and leaves the MCP entry alone; the same command with `--no-instructions` added takes them out.
diff --git a/README.md b/README.md
index 735ad1d3af..cc6cf14a2e 100644
--- a/README.md
+++ b/README.md
@@ -100,9 +100,9 @@ This is the difference between a search engine and a brain. Search finds the pag
> curl -fsSL https://bun.sh/install | bash && export PATH="$HOME/.bun/bin:$PATH" # skip if Bun 1.4.4+ is installed
> bun install -g github:garrytan/gbrain#latest-stable # the gbrain CLI only; no local brain
> # Claude Code (an existing gbrain entry is kept):
-> (claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp || claude mcp get gbrain) && gbrain setup claude-code --instructions-only
-> # Codex:
-> (codex mcp add gbrain --url https://gbrain.io/mcp || codex mcp get gbrain) && gbrain setup codex --instructions-only
+> (claude mcp get gbrain || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
+> # Codex (an existing gbrain entry is kept):
+> (codex mcp get gbrain || codex mcp add gbrain --url https://gbrain.io/mcp) && gbrain setup codex --instructions-only
> ```
>
> `gbrain setup <harness> --instructions-only` tells the agent the brain is there; agents seldom call an MCP server nobody told them about. It writes the [brain-first block](docs/guides/setup.md#brain-first-instructions) into `~/.claude/CLAUDE.md` or Codex's `AGENTS.md` (a non-empty `AGENTS.override.md` instead when Codex has one) with a per-turn rule hook, and leaves the MCP entry alone; the same command with `--no-instructions` added takes them out.
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 932fee3ce2..1f54d7b495 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -10,9 +10,9 @@
> curl -fsSL https://bun.sh/install | bash && export PATH="$HOME/.bun/bin:$PATH" # skip if Bun 1.4.4+ is installed
> bun install -g github:garrytan/gbrain#latest-stable # the gbrain CLI only; no local brain
> # Claude Code (an existing gbrain entry is kept):
-> (claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp || claude mcp get gbrain) && gbrain setup claude-code --instructions-only
-> # Codex:
-> (codex mcp add gbrain --url https://gbrain.io/mcp || codex mcp get gbrain) && gbrain setup codex --instructions-only
+> (claude mcp get gbrain || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
+> # Codex (an existing gbrain entry is kept):
+> (codex mcp get gbrain || codex mcp add gbrain --url https://gbrain.io/mcp) && gbrain setup codex --instructions-only
> ```
>
> `gbrain setup <harness> --instructions-only` tells the agent the brain is there; agents seldom call an MCP server nobody told them about. It writes the [brain-first block](guides/setup.md#brain-first-instructions) into `~/.claude/CLAUDE.md` or Codex's `AGENTS.md` (a non-empty `AGENTS.override.md` instead when Codex has one) with a per-turn rule hook, and leaves the MCP entry alone; the same command with `--no-instructions` added takes them out.
diff --git a/llms-full.txt b/llms-full.txt
index ce2f58acec..ca20e38a1e 100644
--- a/llms-full.txt
+++ b/llms-full.txt
@@ -2679,9 +2679,9 @@ Source: https://raw.githubusercontent.com/garrytan/gbrain/master/INSTALL_FOR_AGE
> curl -fsSL https://bun.sh/install | bash && export PATH="$HOME/.bun/bin:$PATH" # skip if Bun 1.4.4+ is installed
> bun install -g github:garrytan/gbrain#latest-stable # the gbrain CLI only; no local brain
> # Claude Code (an existing gbrain entry is kept):
-> (claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp || claude mcp get gbrain) && gbrain setup claude-code --instructions-only
-> # Codex:
-> (codex mcp add gbrain --url https://gbrain.io/mcp || codex mcp get gbrain) && gbrain setup codex --instructions-only
+> (claude mcp get gbrain || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
+> # Codex (an existing gbrain entry is kept):
+> (codex mcp get gbrain || codex mcp add gbrain --url https://gbrain.io/mcp) && gbrain setup codex --instructions-only
> ```
>
> `gbrain setup <harness> --instructions-only` tells the agent the brain is there; agents seldom call an MCP server nobody told them about. It writes the [brain-first block](docs/guides/setup.md#brain-first-instructions) into `~/.claude/CLAUDE.md` or Codex's `AGENTS.md` (a non-empty `AGENTS.override.md` instead when Codex has one) with a per-turn rule hook, and leaves the MCP entry alone; the same command with `--no-instructions` added takes them out.
@@ -5127,9 +5127,9 @@ This is the difference between a search engine and a brain. Search finds the pag
> curl -fsSL https://bun.sh/install | bash && export PATH="$HOME/.bun/bin:$PATH" # skip if Bun 1.4.4+ is installed
> bun install -g github:garrytan/gbrain#latest-stable # the gbrain CLI only; no local brain
> # Claude Code (an existing gbrain entry is kept):
-> (claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp || claude mcp get gbrain) && gbrain setup claude-code --instructions-only
-> # Codex:
-> (codex mcp add gbrain --url https://gbrain.io/mcp || codex mcp get gbrain) && gbrain setup codex --instructions-only
+> (claude mcp get gbrain || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
+> # Codex (an existing gbrain entry is kept):
+> (codex mcp get gbrain || codex mcp add gbrain --url https://gbrain.io/mcp) && gbrain setup codex --instructions-only
> ```
>
> `gbrain setup <harness> --instructions-only` tells the agent the brain is there; agents seldom call an MCP server nobody told them about. It writes the [brain-first block](docs/guides/setup.md#brain-first-instructions) into `~/.claude/CLAUDE.md` or Codex's `AGENTS.md` (a non-empty `AGENTS.override.md` instead when Codex has one) with a per-turn rule hook, and leaves the MCP entry alone; the same command with `--no-instructions` added takes them out.