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
8 changes: 8 additions & 0 deletions .claude/commands/release/beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Create a new beta release using the automated justfile target with quality check

You are an expert release manager for the Basic Memory project. When the user runs `/beta`, execute the following steps:

### Step 0: Pre-release dependency check

While `pyproject.toml` pins a FastMCP pre-release (`fastmcp==X.Y.Zb1`), `just beta` refuses to
run: every documented install passes `--prerelease=allow`, which uv applies to basic-memory
itself, so a beta on PyPI would become the default install for stable users (#1338). Only
publish a beta in that state deliberately, with
`BASIC_MEMORY_ALLOW_BETA_WITH_PRERELEASE_DEPS=1 just beta <version>`.

### Step 1: Pre-flight Validation
1. Verify version format matches `v\d+\.\d+\.\d+(b\d+|rc\d+)` pattern
2. Check current git status for uncommitted changes
Expand Down
6 changes: 3 additions & 3 deletions .claude/commands/release/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The GitHub Actions workflow (`.github/workflows/release.yml`) then:

#### PyPI Publication
1. Verify package published at: https://pypi.org/project/basic-memory/<version>/
2. Test installation: `uv tool install basic-memory`
2. Test installation: `uv tool install basic-memory --prerelease=allow`
3. Verify installed version: `basic-memory --version`

#### Homebrew Formula (Stable Releases Only)
Expand Down Expand Up @@ -192,13 +192,13 @@ Before starting, verify:
🚀 GitHub Actions: Completed

Install with pip/uv:
uv tool install basic-memory
uv tool install basic-memory --prerelease=allow

Install with Homebrew:
brew install basicmachines-co/basic-memory/basic-memory

Users can now upgrade:
uv tool upgrade basic-memory
uv tool upgrade basic-memory --prerelease=allow
brew upgrade basic-memory
```

Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/dev-release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,11 @@ just release v0.21.3

The recipe runs `just lint` + `just typecheck`, then updates every release manifest through `scripts/update_versions.py`: `src/basic_memory/__init__.py`, `server.json`, the root Claude marketplace, the Claude Code plugin manifest and local marketplace, the Hermes `plugin.yaml`, and the OpenClaw `package.json`. It commits as `chore: update version to X.Y.Z for vX.Y.Z release` on a `release/vX.Y.Z` branch, lands it on `main` via a rebase-merged PR, then tags the rebased commit and pushes the tag. After the tag lands, the `Release` workflow builds the Python package, publishes to PyPI, creates the GitHub release with auto-generated notes, publishes the OpenClaw npm package, and updates the Homebrew formula. The recipe finishes by printing the post-release tasks the workflow doesn't cover.

**Beta release:** `just beta v0.21.3b1` — same flow with a beta-suffixed tag. PyPI consumers install with `pip install basic-memory --pre`.
**Beta release:** `just beta v0.21.3b1` — same flow with a beta-suffixed tag. PyPI consumers install with `pip install basic-memory --pre`. While `pyproject.toml` pins a FastMCP pre-release, the recipe refuses to publish a beta: every documented install runs with `--prerelease=allow`, which uv applies to basic-memory itself, so a beta on PyPI would become the default install for stable users (#1338). Override deliberately with `BASIC_MEMORY_ALLOW_BETA_WITH_PRERELEASE_DEPS=1`.

**Release dry run:** `just release-dry-run v0.21.4` previews the consolidated version update without writing files.

**Development builds:** every commit to `main` publishes a `0.21.3.dev26+468a22f`-style version to PyPI automatically via `.github/workflows/dev-release.yml`. No human action.
**Development builds are not published.** `main` commits used to publish `0.23.3.devN`-style versions to PyPI via a `dev-release.yml` workflow. That stopped with #1338: every documented install now passes `--prerelease=allow` (required by the FastMCP pre-release pin), and uv applies it to basic-memory itself, so a dev build on PyPI outranked the stable release for every fresh install. To try unreleased `main`, install from git: `uv tool install "basic-memory @ git+https://github.com/basicmachines-co/basic-memory" --prerelease=allow`. Any `.dev` versions still on PyPI from before the change must stay yanked.

**Do not tag releases by hand.** A bare `git tag vX.Y.Z` skips the in-code version bump. Package metadata is still correct (uv-dynamic-versioning derives it from the git tag) but `basic-memory --version` reports the previous release, which is what happened with v0.21.2 → v0.21.3.

Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,19 @@ Pick the path that fits you. Both run the same product on the same Markdown.
- Requires Python via [`uv`](https://docs.astral.sh/uv/)

```bash
uv tool install basic-memory
uv tool install basic-memory --prerelease=allow
Comment thread
phernandez marked this conversation as resolved.
Resolved
```

`--prerelease=allow` is required: Basic Memory 0.23 depends on a FastMCP 4
pre-release, and `uv` only accepts pre-releases of transitive dependencies when
told to — without the flag it silently installs an older release. The same flag
goes on every `uvx` / `uv tool upgrade` command below.

For Postgres deployments that store semantic vectors in Milvus, install the
first-party optional extra instead:

```bash
uv tool install "basic-memory[milvus]"
uv tool install "basic-memory[milvus]" --prerelease=allow
```

[**Configure your client ↓**](#connect-your-ai-client)
Expand Down Expand Up @@ -276,7 +281,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
"args": ["--prerelease=allow", "basic-memory", "mcp"]
}
}
}
Expand All @@ -290,7 +295,7 @@ Restart Claude Desktop. Notes live in `~/basic-memory` by default.
### Claude Code

```bash
claude mcp add basic-memory -- uvx basic-memory mcp
claude mcp add basic-memory -- uvx --prerelease=allow basic-memory mcp
```

For the full memory bridge — session briefings, pre-compaction checkpoints, and
Expand All @@ -304,7 +309,7 @@ Add to `~/.codex/config.toml`:
```toml
[mcp_servers.basic-memory]
command = "uvx"
args = ["basic-memory", "mcp"]
args = ["--prerelease=allow", "basic-memory", "mcp"]
```

Codex can keep its default MCP approval behavior, or you can pre-approve eligible
Expand All @@ -313,7 +318,7 @@ Basic Memory tools by adding this server-scoped setting to the same table:
```toml
[mcp_servers.basic-memory]
command = "uvx"
args = ["basic-memory", "mcp"]
args = ["--prerelease=allow", "basic-memory", "mcp"]
default_tools_approval_mode = "approve"
```

Expand All @@ -332,7 +337,7 @@ Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
"args": ["--prerelease=allow", "basic-memory", "mcp"]
}
}
}
Expand All @@ -348,7 +353,7 @@ Add to your User Settings (JSON):
"servers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
"args": ["--prerelease=allow", "basic-memory", "mcp"]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ explicit arguments:
"mcpServers": {
"basic-memory": {
"command": "uvx",
"args": ["basic-memory", "mcp"]
"args": ["--prerelease=allow", "basic-memory", "mcp"]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion integrations/hermes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ memory:

If you run the gateway, restart it (`hermes gateway restart`). Done.

The plugin self-installs the `basic-memory` CLI on first init via `uv tool install basic-memory` (one-time ~10s pause if it isn't already present). The bm binary lands at `~/.local/bin/bm` — the same location a manual `uv tool install basic-memory` would produce, so a later manual install or upgrade is a no-op rather than a second install.
The plugin self-installs the `basic-memory` CLI on first init via `uv tool install basic-memory --prerelease=allow` (one-time ~10s pause if it isn't already present). The bm binary lands at `~/.local/bin/bm` — the same location a manual `uv tool install basic-memory` would produce, so a later manual install or upgrade is a no-op rather than a second install.

### Prerequisites

Expand Down
15 changes: 10 additions & 5 deletions integrations/hermes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ def _install_bm_via_uv(timeout: float = 180.0) -> str | None:
Bootstrap-install basic-memory via `uv tool install`.

Idempotent — re-runs are no-ops when the tool is already installed, so this
converges with later manual `uv tool install basic-memory` calls and avoids
converges with later manual `uv tool install basic-memory --prerelease=allow`
calls and avoids
the two-installations-sharing-one-config-dir foot-gun.

Returns the resolved bm path on success, or None if uv is unavailable or
Expand All @@ -373,20 +374,24 @@ def _install_bm_via_uv(timeout: float = 180.0) -> str | None:
return None
try:
result = subprocess.run(
[uv, "tool", "install", "basic-memory", "--quiet"],
# basic-memory pins a FastMCP pre-release; without this flag uv
# silently installs the last release that had none (#1338).
[uv, "tool", "install", "basic-memory", "--prerelease=allow", "--quiet"],
check=False,
capture_output=True,
timeout=timeout,
env=_clean_child_env(),
)
except Exception as e:
logger.warning("basic-memory: `uv tool install basic-memory` failed: %s", e)
logger.warning(
"basic-memory: `uv tool install basic-memory --prerelease=allow` failed: %s", e
)
return None
if result.returncode != 0:
# uv prints to stderr; capture the tail so the operator can debug.
stderr_tail = (result.stderr or b"").decode("utf-8", errors="replace")[-400:]
logger.warning(
"basic-memory: `uv tool install basic-memory` exited %s: %s",
"basic-memory: `uv tool install basic-memory --prerelease=allow` exited %s: %s",
result.returncode,
stderr_tail.strip(),
)
Expand Down Expand Up @@ -924,7 +929,7 @@ def initialize(self, session_id: str, **kwargs: Any) -> None:
if _install_bm_via_uv() is None:
logger.error(
"basic-memory: auto-install via uv failed. Run "
"`uv tool install basic-memory` manually to debug. "
"`uv tool install basic-memory --prerelease=allow` manually to debug. "
"Provider will not initialize."
)
return
Expand Down
2 changes: 1 addition & 1 deletion integrations/hermes/tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def _fake_run(argv, **kwargs):
assert len(calls) == 1
argv = calls[0][0]
assert argv[0] == "/fake/uv"
assert argv[1:] == ["tool", "install", "basic-memory", "--quiet"]
assert argv[1:] == ["tool", "install", "basic-memory", "--prerelease=allow", "--quiet"]


def test_install_bm_via_uv_failed_returncode(bm, monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion integrations/openclaw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Cloud extends local-first — still plain Markdown, still yours. [Start a free t

## Troubleshooting

**`bm` not found** — Install uv, then restart the gateway. Or install manually: `uv tool install basic-memory`
**`bm` not found** — Install uv, then restart the gateway. Or install manually: `uv tool install basic-memory --prerelease=allow` (the flag is required — basic-memory depends on a FastMCP pre-release, and without it uv silently installs an older release)

**Search returns nothing** — Check that Basic Memory connected (look for `connected to BM` in logs). Verify files exist in the project directory.

Expand Down
5 changes: 3 additions & 2 deletions integrations/openclaw/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ On first startup, this plugin checks whether the `bm` (Basic Memory) CLI is avai
### What happens

1. The plugin checks if `bm` exists on `PATH`
2. If missing, it executes `uv tool install basic-memory --force`
2. If missing, it executes `uv tool install basic-memory --prerelease=allow --force`
(the flag is needed because basic-memory depends on a FastMCP pre-release)
3. This installs the Basic Memory CLI into uv's managed tool directory (`~/.local/bin/bm` on most systems)

### What this means
Expand All @@ -22,7 +23,7 @@ On first startup, this plugin checks whether the `bm` (Basic Memory) CLI is avai
You can install Basic Memory yourself before enabling the plugin:

```bash
uv tool install basic-memory
uv tool install basic-memory --prerelease=allow
```

Or with pip:
Expand Down
10 changes: 9 additions & 1 deletion integrations/openclaw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,17 @@ export default definePluginEntry({
log.info(
"installing basic-memory via uv (this may take a minute)...",
)
// basic-memory pins a FastMCP pre-release; without this flag uv
// silently installs the last release that had none (#1338).
const result = execFileSync(
"uv",
["tool", "install", "basic-memory", "--force"],
[
"tool",
"install",
"basic-memory",
"--prerelease=allow",
"--force",
],
{
encoding: "utf-8",
timeout: 120_000,
Expand Down
5 changes: 4 additions & 1 deletion integrations/openclaw/scripts/setup-bm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ if ! command -v uv >/dev/null 2>&1; then
fi

# ── install basic-memory ────────────────────────────────
# basic-memory pins a FastMCP pre-release; without --prerelease=allow uv
# silently installs the last release that had none (#1338).
if [[ -n "${BM_REF}" ]]; then
echo "Installing basic-memory from ${BM_REPO}@${BM_REF} ..."
uv tool install \
"basic-memory @ git+${BM_REPO}@${BM_REF}" \
--prerelease=allow \
--force
else
echo "Installing latest basic-memory from PyPI ..."
uv tool install basic-memory --force
uv tool install basic-memory --prerelease=allow --force
fi

# ── verify ────────────────────────────────────────────────────────
Expand Down
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,19 @@ beta version:
exit 1
fi

# Trigger: pyproject pins a FastMCP pre-release (fastmcp==X.Y.Zb1).
# Why: while that pin exists every documented install/upgrade passes
# --prerelease=allow, and uv applies it to basic-memory itself, so a
# beta on PyPI would become the default install for stable users (#1338).
# Outcome: refuse the beta unless explicitly overridden.
if grep -Eq '"fastmcp==[0-9.]+(a|b|rc)[0-9]+"' pyproject.toml \
&& [[ "${BASIC_MEMORY_ALLOW_BETA_WITH_PRERELEASE_DEPS:-}" != "1" ]]; then
echo "❌ pyproject.toml pins a FastMCP pre-release. Stable installs run with"
echo " --prerelease=allow, so this beta would be picked up by every fresh install."
echo " Set BASIC_MEMORY_ALLOW_BETA_WITH_PRERELEASE_DEPS=1 to publish anyway."
exit 1
fi

# Check if tag already exists
if git tag -l "{{version}}" | grep -q "{{version}}"; then
echo "❌ Tag {{version}} already exists"
Expand Down
7 changes: 5 additions & 2 deletions llms-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ steps in order.
Use one of the following package managers to install:

```bash
# Install with uv (recommended)
uv tool install basic-memory
# Install with uv (recommended). --prerelease=allow is required: basic-memory
# depends on a FastMCP pre-release, and without the flag uv silently installs
# an older release.
uv tool install basic-memory --prerelease=allow

# Or with pip
pip install basic-memory
Expand All @@ -27,6 +29,7 @@ Add the following to your config:
"basic-memory": {
"command": "uvx",
"args": [
"--prerelease=allow",
"basic-memory",
"mcp"
]
Expand Down
Loading
Loading