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
2 changes: 1 addition & 1 deletion .claude-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ claude plugin add /path/to/mempalace

## Post-Install Setup

After installing the plugin, run the init command to complete setup (pip install, MCP configuration, etc.):
After installing the plugin, run the init command to complete setup (installs the `mempalace` package via `uv tool` or `pip`, configures MCP, etc.):

```
/mempalace:init
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "mempalace",
"source": "./.claude-plugin",
"description": "AI memory system — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, guided setup.",
"version": "3.3.3",
"version": "3.3.4",
"author": {
"name": "milla-jovovich"
}
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mempalace",
"version": "3.3.3",
"version": "3.3.4",
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
"author": {
"name": "milla-jovovich"
Expand Down
4 changes: 2 additions & 2 deletions .claude-plugin/skills/mempalace/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Ensure `mempalace` is installed:
mempalace --version
```

If not installed:
If not installed (uv recommended):

```bash
pip install mempalace
uv tool install mempalace # or: pip install mempalace
```

## Usage
Expand Down
11 changes: 8 additions & 3 deletions .codex-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Give your AI a persistent memory -- mine projects and conversations into a searc

- Python 3.9+
- Codex CLI installed and configured
- `pip install mempalace`
- `uv tool install mempalace` (recommended) or `pip install mempalace`

## Installation

Expand Down Expand Up @@ -39,12 +39,17 @@ git clone https://github.com/MemPalace/mempalace.git
cd mempalace
```

2. Install the Python package:
2. Install the Python package so the `mempalace-mcp` script lands on
your PATH (the bundled `plugin.json` invokes it by bare name):

```bash
pip install -e .
uv tool install --editable . # or: pip install -e .
```

Plain `uv sync` is **not** enough here — it installs the scripts into
`.venv/bin/`, which Codex will not find unless you activate the venv
before launching Codex.

3. The `.codex-plugin` directory is already in the repo root. Codex CLI will detect it automatically when you run Codex from inside the repository.

4. Initialize your palace:
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mempalace",
"version": "3.3.3",
"version": "3.3.4",
"description": "Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.",
"author": {
"name": "milla-jovovich"
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
12 changes: 6 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ We do not accept summarization of user content, cloud storage/sync features, tel
## Setup

```bash
pip install -e ".[dev]"
uv sync --extra dev # recommended; or: pip install -e ".[dev]"
```

## Commands

```bash
# Run tests
python -m pytest tests/ -v --ignore=tests/benchmarks
uv run pytest tests/ -v --ignore=tests/benchmarks

# Run tests with coverage
python -m pytest tests/ -v --ignore=tests/benchmarks --cov=mempalace --cov-report=term-missing
uv run pytest tests/ -v --ignore=tests/benchmarks --cov=mempalace --cov-report=term-missing

# Lint
ruff check .
uv run ruff check .

# Format
ruff format .
uv run ruff format .

# Format check (CI mode)
ruff format --check .
uv run ruff format --check .
```

## Project Structure
Expand Down
14 changes: 9 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ git clone https://github.com/<your-username>/mempalace.git
cd mempalace
git remote add upstream https://github.com/MemPalace/mempalace.git

pip install -e ".[dev]" # installs with dev dependencies (pytest, build, twine)
# Recommended: uv (https://docs.astral.sh/uv/) handles the venv for you
uv sync --extra dev

# Or with pip in your own venv:
# pip install -e ".[dev]"
```

## Running Tests

```bash
pytest tests/ -v
uv run pytest tests/ -v
```

All tests must pass before submitting a PR. Tests should run without API keys or network access.
Expand All @@ -25,10 +29,10 @@ All tests must pass before submitting a PR. Tests should run without API keys or

```bash
# Quick test (20 questions, ~30 seconds)
python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json --limit 20
uv run python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json --limit 20

# Full benchmark (500 questions, ~5 minutes)
python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json
uv run python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json
```

See [benchmarks/README.md](benchmarks/README.md) for data download instructions and reproduction guide.
Expand All @@ -49,7 +53,7 @@ assets/ ← logo + brand
1. Fork the repo and create a feature branch: `git checkout -b feat/my-thing`
2. Write your code
3. Add or update tests if applicable
4. Run `pytest tests/ -v` — everything must pass
4. Run `uv run pytest tests/ -v` — everything must pass
5. Commit with a clear message following [conventional commits](https://www.conventionalcommits.org/):
- `feat: add Notion export format`
- `fix: handle empty transcript files`
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ Architecture, concepts, and mining flows:

## Install

We recommend [`uv`](https://docs.astral.sh/uv/) — `uv tool install` puts
the `mempalace` CLI in an isolated environment on your PATH:

```bash
pip install mempalace
uv tool install mempalace
mempalace init ~/projects/myapp
```

If you prefer pip, `pip install mempalace` still works.

## Quickstart

```bash
Expand Down Expand Up @@ -120,9 +125,9 @@ own research page for their published numbers.
```bash
git clone https://github.com/MemPalace/mempalace.git
cd mempalace
pip install -e ".[dev]"
uv sync --extra dev # or: pip install -e ".[dev]"
# see benchmarks/README.md for dataset download commands
python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json
uv run python benchmarks/longmemeval_bench.py /path/to/longmemeval_s_cleaned.json
```

---
Expand Down Expand Up @@ -185,7 +190,7 @@ PRs welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
MIT — see [LICENSE](LICENSE).

<!-- Link Definitions -->
[version-shield]: https://img.shields.io/badge/version-3.3.3-4dc9f6?style=flat-square&labelColor=0a0e14
[version-shield]: https://img.shields.io/badge/version-3.3.4-4dc9f6?style=flat-square&labelColor=0a0e14
[release-link]: https://github.com/MemPalace/mempalace/releases
[python-shield]: https://img.shields.io/badge/python-3.9+-7dd8f8?style=flat-square&labelColor=0a0e14&logo=python&logoColor=7dd8f8
[python-link]: https://www.python.org/
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ The palace classifies each question into one of 5 halls. Pass 1 searches only wi
```bash
git clone https://github.com/MemPalace/mempalace.git
cd mempalace
pip install -e ".[dev]"
uv sync --extra dev # or: pip install -e ".[dev]"
mkdir -p /tmp/longmemeval-data
curl -fsSL -o /tmp/longmemeval-data/longmemeval_s_cleaned.json \
https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned/resolve/main/longmemeval_s_cleaned.json
Expand Down Expand Up @@ -724,8 +724,8 @@ python benchmarks/longmemeval_bench.py /tmp/longmemeval-data/longmemeval_s_clean
The question: how much of the 96.6% → 99.4% improvement is the heuristics, and how much would come from just using a better embedding model?

```bash
pip install fastembed
python benchmarks/longmemeval_bench.py /tmp/longmemeval-data/longmemeval_s_cleaned.json \
uv pip install fastembed # or: pip install fastembed
uv run python benchmarks/longmemeval_bench.py /tmp/longmemeval-data/longmemeval_s_cleaned.json \
--mode raw --embed-model bge-large
```

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/HYBRID_MODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ python benchmarks/longmemeval_bench.py data/longmemeval_s_cleaned.json --mode hy
# Setup
git clone https://github.com/MemPalace/mempalace.git
cd mempalace
pip install -e ".[dev]"
uv sync --extra dev # or: pip install -e ".[dev]"

# Download data
mkdir -p /tmp/longmemeval-data
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Run the exact same benchmarks we report. Clone, install, run.
```bash
git clone https://github.com/MemPalace/mempalace.git
cd mempalace
pip install -e ".[dev]"
uv sync --extra dev # or: pip install -e ".[dev]"
```

## Benchmark 1: LongMemEval (500 questions)
Expand Down
19 changes: 13 additions & 6 deletions examples/gemini_cli_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ This guide explains how to set up MemPalace as a permanent memory for the [Gemin

## 1. Installation

On many Linux systems, installing Python packages globally is restricted. We recommend using a local virtual environment within the MemPalace directory.
On many Linux systems, installing Python packages globally is restricted. We
recommend [`uv`](https://docs.astral.sh/uv/), which creates and manages a
local virtual environment for you.

```bash
# Clone the repository (if you haven't already)
git clone https://github.com/MemPalace/mempalace.git
cd mempalace

# Create a virtual environment
python3 -m venv .venv
# Create the venv and install MemPalace + dependencies in editable mode
uv sync
```

This produces a `.venv/` directory inside the repo with everything installed.
If you prefer plain pip:

# Install dependencies and MemPalace in editable mode
```bash
python3 -m venv .venv
.venv/bin/pip install -e .
```

Expand All @@ -29,7 +36,7 @@ Set up your "Palace" (the database) and configure your identity.

```bash
# Initialize the palace in the current directory
.venv/bin/python3 -m mempalace init .
uv run python -m mempalace init .
```

### Identity and Wings (Optional but Recommended)
Expand Down Expand Up @@ -86,7 +93,7 @@ Once connected, Gemini CLI will automatically:
### Manual Mining
If you want the AI to learn from your existing code or docs immediately, run the "mine" command:
```bash
.venv/bin/python3 -m mempalace mine /path/to/your/project
uv run python -m mempalace mine /path/to/your/project
```

### Verification
Expand Down
4 changes: 2 additions & 2 deletions integrations/openclaw/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ You have access to a local memory palace via MCP tools. The palace stores verbat

## Setup

Install MemPalace and populate the palace:
Install MemPalace and populate the palace (uv recommended):

```bash
pip install mempalace
uv tool install mempalace # or: pip install mempalace
mempalace init ~/my-convos
mempalace mine ~/my-convos
```
Expand Down
30 changes: 21 additions & 9 deletions mempalace/instructions/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,39 @@ tell the user they need Python 3.9+ installed and stop.

## Step 2: Check if mempalace is already installed

Run `pip show mempalace` to see if the package is already present. If it is,
report the installed version and skip to Step 4.
Run `mempalace --version`. If it succeeds, the CLI is on PATH — report
the installed version and skip to Step 4.

If `mempalace --version` fails, **do not** skip to Step 4 just because
`pip show mempalace` or `uv tool list` reports the package as installed:
the package may live inside a venv that isn't activated, in which case
Step 5 (`mempalace init ...`) will fail with `command not found`. Treat
that case as not-installed and continue to Step 3, which will (re)install
into a PATH-visible location via `uv tool install` or `pip`.

## Step 3: Install mempalace

Run `pip install mempalace`.
Prefer [`uv`](https://docs.astral.sh/uv/) — it isolates the CLI from system
Python and avoids most environment-related failures:

1. If `uv` is on PATH (`uv --version`), run `uv tool install mempalace`.
2. Otherwise run `pip install mempalace`.

### Error handling -- pip failures
### Error handling -- install failures

If `pip install mempalace` fails, try these fallbacks in order:
If the install command fails, try these fallbacks in order:

1. Try `pip3 install mempalace`
2. Try `python -m pip install mempalace` (or `python3 -m pip install mempalace`)
3. If the error mentions missing build tools or compilation failures (commonly
1. If `uv tool install` failed, try `pip install mempalace` (or vice versa).
2. Try `pip3 install mempalace`.
3. Try `python -m pip install mempalace` (or `python3 -m pip install mempalace`).
4. If the error mentions missing build tools or compilation failures (commonly
from chromadb or its native dependencies):
- On Linux/macOS: suggest `sudo apt-get install build-essential python3-dev`
(Debian/Ubuntu) or `xcode-select --install` (macOS)
- On Windows: suggest installing Microsoft C++ Build Tools from
https://visualstudio.microsoft.com/visual-cpp-build-tools/
- Then retry the install command
4. If all attempts fail, report the error clearly and stop.
5. If all attempts fail, report the error clearly and stop.

## Step 4: Ask for project directory

Expand Down
2 changes: 1 addition & 1 deletion mempalace/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Single source of truth for the MemPalace package version."""

__version__ = "3.3.3"
__version__ = "3.3.4"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mempalace"
version = "3.3.3"
version = "3.3.4"
description = "Give your AI a memory — mine projects and conversations into a searchable palace. No API key required."
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion tools/save.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Behavior:
`--wing my_research`).
4. Report back: how many drawers were filed, into which wing/room.

Requires `mempalace` to be installed (`pip install mempalace`).
Requires `mempalace` to be installed (`uv tool install mempalace` recommended, or `pip install mempalace`).
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading