MAESTRO: finalize distribution with one-liner installer in SKILL.md and distribution readiness tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+48
-8
@@ -1,8 +1,46 @@
|
||||
# Claude-Mem OpenClaw Plugin — Setup Guide
|
||||
|
||||
This guide walks through setting up the claude-mem plugin on an OpenClaw gateway from scratch. Follow every step in order. By the end, your agents will have persistent memory across sessions, a live-updating MEMORY.md in their workspace, and optionally a real-time observation feed streaming to a messaging channel.
|
||||
This guide walks through setting up the claude-mem plugin on an OpenClaw gateway. By the end, your agents will have persistent memory across sessions, a live-updating MEMORY.md in their workspace, and optionally a real-time observation feed streaming to a messaging channel.
|
||||
|
||||
## Step 1: Clone the Claude-Mem Repo
|
||||
## Quick Install (Recommended)
|
||||
|
||||
Run this one-liner to install everything automatically:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/openclaw/install.sh | bash
|
||||
```
|
||||
|
||||
The installer handles dependency checks (Bun, uv), plugin installation, memory slot configuration, AI provider setup, worker startup, and optional observation feed configuration — all interactively.
|
||||
|
||||
### Install with options
|
||||
|
||||
Pre-select your AI provider and API key to skip interactive prompts:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/openclaw/install.sh | bash -s -- --provider=gemini --api-key=YOUR_KEY
|
||||
```
|
||||
|
||||
For fully unattended installation (defaults to Claude Max Plan, skips observation feed):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/openclaw/install.sh | bash -s -- --non-interactive
|
||||
```
|
||||
|
||||
To upgrade an existing installation (preserves settings, updates plugin):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/thedotmack/claude-mem/main/openclaw/install.sh | bash -s -- --upgrade
|
||||
```
|
||||
|
||||
After installation, skip to [Step 4: Restart the Gateway and Verify](#step-4-restart-the-gateway-and-verify) to confirm everything is working.
|
||||
|
||||
---
|
||||
|
||||
## Manual Setup
|
||||
|
||||
The steps below are for manual installation if you prefer not to use the automated installer, or need to troubleshoot individual steps.
|
||||
|
||||
### Step 1: Clone the Claude-Mem Repo
|
||||
|
||||
First, clone the claude-mem repository to a location accessible by your OpenClaw gateway. This gives you the worker service source and the plugin code.
|
||||
|
||||
@@ -20,11 +58,11 @@ You'll need **bun** installed for the worker service. If you don't have it:
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
```
|
||||
|
||||
## Step 2: Get the Worker Running
|
||||
### Step 2: Get the Worker Running
|
||||
|
||||
The claude-mem worker is an HTTP service on port 37777. It stores observations, generates summaries, and serves the context timeline. The plugin talks to it over HTTP — it doesn't matter where the worker is running, just that it's reachable on localhost:37777.
|
||||
|
||||
### Check if it's already running
|
||||
#### Check if it's already running
|
||||
|
||||
If this machine also runs Claude Code with claude-mem installed, the worker may already be running:
|
||||
|
||||
@@ -36,7 +74,7 @@ curl http://localhost:37777/api/health
|
||||
|
||||
**Got connection refused or no response?** The worker isn't running. Continue below.
|
||||
|
||||
### If Claude Code has claude-mem installed
|
||||
#### If Claude Code has claude-mem installed
|
||||
|
||||
If claude-mem is installed as a Claude Code plugin (at `~/.claude/plugins/marketplaces/thedotmack/`), start the worker from that installation:
|
||||
|
||||
@@ -54,7 +92,7 @@ curl http://localhost:37777/api/health
|
||||
|
||||
**Still not working?** Check `npm run worker:status` for error details, or check that bun is installed and on your PATH.
|
||||
|
||||
### If there's no Claude Code installation
|
||||
#### If there's no Claude Code installation
|
||||
|
||||
Run the worker from the cloned repo:
|
||||
|
||||
@@ -77,7 +115,7 @@ curl http://localhost:37777/api/health
|
||||
- Check logs: `npm run worker:logs` (if available)
|
||||
- Try running it directly to see errors: `bun plugin/scripts/worker-service.cjs start`
|
||||
|
||||
## Step 3: Add the Plugin to Your Gateway
|
||||
### Step 3: Add the Plugin to Your Gateway
|
||||
|
||||
Add the `claude-mem` plugin to your OpenClaw gateway configuration:
|
||||
|
||||
@@ -96,7 +134,7 @@ Add the `claude-mem` plugin to your OpenClaw gateway configuration:
|
||||
}
|
||||
```
|
||||
|
||||
### Config fields explained
|
||||
#### Config fields explained
|
||||
|
||||
- **`project`** (string, default: `"openclaw"`) — The project name that scopes all observations in the memory database. Use a unique name per gateway/use-case so observations don't mix. For example, if this gateway runs a coding bot, use `"coding-bot"`.
|
||||
|
||||
@@ -104,6 +142,8 @@ Add the `claude-mem` plugin to your OpenClaw gateway configuration:
|
||||
|
||||
- **`workerPort`** (number, default: `37777`) — The port where the claude-mem worker service is listening. Only change this if you configured the worker to use a different port.
|
||||
|
||||
---
|
||||
|
||||
## Step 4: Restart the Gateway and Verify
|
||||
|
||||
Restart your OpenClaw gateway so it picks up the new plugin configuration. After restart, check the gateway logs for:
|
||||
|
||||
@@ -2205,6 +2205,124 @@ test_usage_comment_includes_upgrade() {
|
||||
|
||||
test_usage_comment_includes_upgrade
|
||||
|
||||
###############################################################################
|
||||
# Test: Distribution readiness — URL, usage comment, SKILL.md reference
|
||||
###############################################################################
|
||||
|
||||
echo ""
|
||||
echo "=== Distribution readiness ==="
|
||||
|
||||
test_install_sh_has_shebang() {
|
||||
local first_line
|
||||
first_line="$(head -1 "$INSTALL_SCRIPT")"
|
||||
assert_eq "#!/usr/bin/env bash" "$first_line" "install.sh has correct shebang line"
|
||||
}
|
||||
|
||||
test_install_sh_has_shebang
|
||||
|
||||
test_install_sh_has_set_euo_pipefail() {
|
||||
if grep -q 'set -euo pipefail' "$INSTALL_SCRIPT"; then
|
||||
test_pass "install.sh uses set -euo pipefail for safety"
|
||||
else
|
||||
test_fail "install.sh should use set -euo pipefail"
|
||||
fi
|
||||
}
|
||||
|
||||
test_install_sh_has_set_euo_pipefail
|
||||
|
||||
test_install_sh_has_stable_url_in_usage() {
|
||||
if grep -q 'raw.githubusercontent.com/thedotmack/claude-mem/main/openclaw/install.sh' "$INSTALL_SCRIPT"; then
|
||||
test_pass "install.sh usage comment has stable raw.githubusercontent.com URL"
|
||||
else
|
||||
test_fail "install.sh should reference stable raw.githubusercontent.com URL in usage"
|
||||
fi
|
||||
}
|
||||
|
||||
test_install_sh_has_stable_url_in_usage
|
||||
|
||||
test_install_sh_documents_all_flags() {
|
||||
local missing_flags=()
|
||||
|
||||
for flag in "--non-interactive" "--upgrade" "--provider" "--api-key"; do
|
||||
if ! grep -Fq -- "$flag" "$INSTALL_SCRIPT"; then
|
||||
missing_flags+=("$flag")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#missing_flags[@]} -eq 0 ]]; then
|
||||
test_pass "install.sh documents all CLI flags (--non-interactive, --upgrade, --provider, --api-key)"
|
||||
else
|
||||
test_fail "install.sh missing documentation for flags: ${missing_flags[*]}"
|
||||
fi
|
||||
}
|
||||
|
||||
test_install_sh_documents_all_flags
|
||||
|
||||
test_install_sh_has_installer_version() {
|
||||
if grep -q 'INSTALLER_VERSION=' "$INSTALL_SCRIPT"; then
|
||||
test_pass "install.sh defines INSTALLER_VERSION constant"
|
||||
else
|
||||
test_fail "install.sh should define INSTALLER_VERSION"
|
||||
fi
|
||||
}
|
||||
|
||||
test_install_sh_has_installer_version
|
||||
|
||||
test_skill_md_references_one_liner() {
|
||||
local skill_file="${SCRIPT_DIR}/SKILL.md"
|
||||
if [[ ! -f "$skill_file" ]]; then
|
||||
test_fail "SKILL.md not found at ${skill_file}"
|
||||
return
|
||||
fi
|
||||
|
||||
if grep -q 'curl -fsSL.*raw.githubusercontent.com.*install.sh | bash' "$skill_file"; then
|
||||
test_pass "SKILL.md references the one-liner installer"
|
||||
else
|
||||
test_fail "SKILL.md should reference the one-liner installer"
|
||||
fi
|
||||
}
|
||||
|
||||
test_skill_md_references_one_liner
|
||||
|
||||
test_skill_md_has_quick_install_section() {
|
||||
local skill_file="${SCRIPT_DIR}/SKILL.md"
|
||||
if [[ ! -f "$skill_file" ]]; then
|
||||
test_fail "SKILL.md not found at ${skill_file}"
|
||||
return
|
||||
fi
|
||||
|
||||
if grep -q 'Quick Install' "$skill_file"; then
|
||||
test_pass "SKILL.md has Quick Install section"
|
||||
else
|
||||
test_fail "SKILL.md should have Quick Install section"
|
||||
fi
|
||||
}
|
||||
|
||||
test_skill_md_has_quick_install_section
|
||||
|
||||
test_skill_md_documents_options() {
|
||||
local skill_file="${SCRIPT_DIR}/SKILL.md"
|
||||
if [[ ! -f "$skill_file" ]]; then
|
||||
test_fail "SKILL.md not found at ${skill_file}"
|
||||
return
|
||||
fi
|
||||
|
||||
local missing=()
|
||||
for option in "--provider" "--non-interactive" "--upgrade"; do
|
||||
if ! grep -Fq -- "$option" "$skill_file"; then
|
||||
missing+=("$option")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#missing[@]} -eq 0 ]]; then
|
||||
test_pass "SKILL.md documents all installer options (--provider, --non-interactive, --upgrade)"
|
||||
else
|
||||
test_fail "SKILL.md missing documentation for: ${missing[*]}"
|
||||
fi
|
||||
}
|
||||
|
||||
test_skill_md_documents_options
|
||||
|
||||
###############################################################################
|
||||
# Summary
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user