Skip to content
Open
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: 4 additions & 4 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"email": "open_oceanbase@oceanbase.com"
},
"metadata": {
"description": "PowerMem marketplace: intelligent memory for Claude Code.",
"description": "PowerMem marketplace: intelligent memory for Claude Code and Codex CLI.",
"version": "0.1.0"
},
"plugins": [
{
"name": "memory-powermem",
"source": "./apps/claude-code-plugin",
"description": "PowerMem intelligent memory for Claude Code: auto-recall on prompt submit and auto-save on session end via HTTP hooks.",
"source": "./apps/agent-plugin",
"description": "PowerMem intelligent memory for Claude Code and Codex CLI: Claude Code uses HTTP hooks; Codex CLI uses skills with explicit MCP wiring.",
"category": "memory",
"tags": ["memory", "powermem", "rag", "hooks", "oceanbase"]
"tags": ["memory", "powermem", "rag", "hooks", "mcp", "codex", "oceanbase"]
}
]
}
24 changes: 12 additions & 12 deletions .github/workflows/plugins-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ jobs:
path: apps/vscode-extension/*.vsix
retention-days: 30

package-claude-plugin:
name: Package Claude Code Plugin
package-agent-plugin:
name: Package Agent Plugin
runs-on: ubuntu-latest

steps:
Expand All @@ -77,20 +77,20 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Package Claude Code plugin (cross-compile hooks + zip)
run: bash apps/claude-code-plugin/scripts/package-plugin.sh
- name: Package agent plugin (cross-compile hooks + zip)
run: bash apps/agent-plugin/scripts/package-plugin.sh

- name: Upload Claude Code plugin (zip)
- name: Upload agent plugin (zip)
uses: actions/upload-artifact@v7
with:
name: powermem-claude-code-plugin-zip
path: apps/claude-code-plugin/dist/powermem-claude-code-plugin-*.zip
name: powermem-agent-plugin-zip
path: apps/agent-plugin/dist/powermem-agent-plugin-*.zip
if-no-files-found: error
retention-days: 30
release-plugins:
name: Release Plugin Assets
runs-on: ubuntu-latest
needs: [build-vscode-extension, package-claude-plugin]
needs: [build-vscode-extension, package-agent-plugin]
if: startsWith(github.ref, 'refs/tags/plugins-') || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'true')
permissions:
contents: write
Expand All @@ -102,10 +102,10 @@ jobs:
name: powermem-vscode-vsix
path: vsix

- name: Download Claude Code plugin
- name: Download agent plugin
uses: actions/download-artifact@v8
with:
name: powermem-claude-code-plugin-zip
name: powermem-agent-plugin-zip
path: zip

- name: Get version from tag or default
Expand All @@ -126,12 +126,12 @@ jobs:
## PowerMem IDE Plugins

- **PowerMem for VS Code** (`.vsix`): Download and install from VSIX in VS Code or Cursor.
- **PowerMem for Claude Code** (`.zip`): Download, unzip, and start Claude with `claude --plugin-dir /path/to/powermem-claude-code-plugin`.
- **PowerMem agent plugin** (`.zip`): Download, unzip, and start Claude with `claude --plugin-dir /path/to/powermem-agent-plugin`; Codex CLI installs through `codex plugin`.

See [apps/README.md](https://github.com/${{ github.repository }}/blob/main/apps/README.md).
files: |
vsix/*.vsix
zip/powermem-claude-code-plugin-*.zip
zip/powermem-agent-plugin-*.zip
draft: false
prerelease: ${{ contains(github.ref, 'refs/tags/') == false }}
generate_release_notes: true
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help install install-dev test test-unit test-integration test-e2e test-coverage test-fast test-slow check-python-version lint lint-full lint-pylint format clean build build-package build-check build-mcp-package build-mcp-check build-all-python-packages build-dashboard build-claude-hook package-claude-plugin publish-pypi publish-mcp-pypi publish-all-pypi publish-testpypi install-build-tools upload docs bump-version check-package-versions server-start server-stop server-restart server-status server-logs server-dashboard-start docker-build docker-run docker-up docker-down docker-logs docker-stop docker-restart docker-clean docker-ps
.PHONY: help install install-dev test test-unit test-integration test-e2e test-coverage test-fast test-slow check-python-version lint lint-full lint-pylint format clean build build-package build-check build-mcp-package build-mcp-check build-all-python-packages build-dashboard build-claude-hook package-agent-plugin package-claude-plugin publish-pypi publish-mcp-pypi publish-all-pypi publish-testpypi install-build-tools upload docs bump-version check-package-versions server-start server-stop server-restart server-status server-logs server-dashboard-start docker-build docker-run docker-up docker-down docker-logs docker-stop docker-restart docker-clean docker-ps

PYTHON ?= python3

Expand Down Expand Up @@ -152,11 +152,13 @@ build-dashboard: ## Build dashboard frontend and inject into src/server/dashboar
@cp -r dashboard/dist/* src/server/dashboard/
@echo "✓ Dashboard built. Start server with: make server-start-reload (then open http://localhost:$(SERVER_PORT)/dashboard/)"

build-claude-hook: ## Build Claude Code hook binaries (Go; output: apps/claude-code-plugin/hooks/bin/)
@bash apps/claude-code-plugin/scripts/build-hook-binaries.sh
build-claude-hook: ## Build Claude Code hook binaries (Go; output: apps/agent-plugin/hooks/bin/)
@bash apps/agent-plugin/scripts/build-hook-binaries.sh

package-claude-plugin: ## Zip Claude Code plugin for sharing (apps/claude-code-plugin/dist/*.zip)
@bash apps/claude-code-plugin/scripts/package-plugin.sh
package-agent-plugin: ## Zip Agent plugin for sharing (apps/agent-plugin/dist/*.zip)
@bash apps/agent-plugin/scripts/package-plugin.sh

package-claude-plugin: package-agent-plugin ## Compatibility alias for package-agent-plugin

install-build-tools: ## Install build and upload tools
@echo "Installing build tools..."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ cd powermem
Then open Claude Code in your terminal and paste this one line:

```text
Read and follow apps/claude-code-plugin/SETUP.md to set up PowerMem memory for Claude Code.
Read and follow apps/agent-plugin/SETUP.md to set up PowerMem memory for Claude Code.
```

Claude Code reads [`apps/claude-code-plugin/SETUP.md`](apps/claude-code-plugin/SETUP.md), asks you for the few required secrets, and wires everything up end-to-end.
Claude Code reads [`apps/agent-plugin/SETUP.md`](apps/agent-plugin/SETUP.md), asks you for the few required secrets, and wires everything up end-to-end.

#### Manual setup

Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ cd powermem
在终端打开 Claude Code,粘贴下面这一行:

```text
Read and follow apps/claude-code-plugin/SETUP.md to set up PowerMem memory for Claude Code.
Read and follow apps/agent-plugin/SETUP.md to set up PowerMem memory for Claude Code.
```

Claude Code 会阅读 [`apps/claude-code-plugin/SETUP.md`](apps/claude-code-plugin/SETUP.md),向你询问少量必要密钥,并端到端完成全部配置。
Claude Code 会阅读 [`apps/agent-plugin/SETUP.md`](apps/agent-plugin/SETUP.md),向你询问少量必要密钥,并端到端完成全部配置。

#### 手动配置

Expand Down
4 changes: 2 additions & 2 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ cd powermem
ターミナルで Claude Code を開き、次の一行を貼り付けます:

```text
Read and follow apps/claude-code-plugin/SETUP.md to set up PowerMem memory for Claude Code.
Read and follow apps/agent-plugin/SETUP.md to set up PowerMem memory for Claude Code.
```

Claude Code は [`apps/claude-code-plugin/SETUP.md`](apps/claude-code-plugin/SETUP.md) を読み、必要な秘密情報だけを尋ね、エンドツーエンドで設定を完了します。
Claude Code は [`apps/agent-plugin/SETUP.md`](apps/agent-plugin/SETUP.md) を読み、必要な秘密情報だけを尋ね、エンドツーエンドで設定を完了します。

#### 手動セットアップ

Expand Down
18 changes: 11 additions & 7 deletions apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ First-party setup flows that connect PowerMem to AI clients and IDEs. Every path
| If you use… | Use this directory | One-line agent prompt |
|-------------|-------------------|------------------------|
| **Cursor**, **VS Code**, **Windsurf**, **GitHub Copilot**, **Qoder** | [`vscode-extension/`](vscode-extension/) | `Read and follow apps/vscode-extension/SETUP.md to setup PowerMem` |
| **Claude Desktop**, **Cline**, **Codex**, **OpenCode**, Roo Code, Goose, or any other MCP client | [`mcp-client/`](mcp-client/) | `Read and follow apps/mcp-client/SETUP.md to setup PowerMem` |
| **Claude Code** (hook-based plugin) | [`claude-code-plugin/`](claude-code-plugin/) | `Read and follow apps/claude-code-plugin/SETUP.md to set up PowerMem memory for Claude Code.` |
| **Claude Desktop**, **Cline**, **OpenCode**, Roo Code, Goose, or any other MCP client | [`mcp-client/`](mcp-client/) | `Read and follow apps/mcp-client/SETUP.md to setup PowerMem` |
| **Codex CLI** | [`agent-plugin/`](agent-plugin/) | Install `memory-powermem` with `codex plugin`, then ask Codex to use the init skill. |
| **Claude Code** (hook-based plugin) | [`agent-plugin/`](agent-plugin/) | `Read and follow apps/agent-plugin/SETUP.md to set up PowerMem memory for Claude Code.` |

> **Codex** and **OpenCode** belong under `mcp-client/`, not `vscode-extension/`. The VS Code extension flow is for VS Code–compatible IDEs only.
> **Codex CLI** has a native plugin path under `agent-plugin/`; generic
> MCP-only Codex setup can still use `mcp-client/`. **OpenCode** belongs under
> `mcp-client/`, not `vscode-extension/`. The VS Code extension flow is for
> VS Code–compatible IDEs only.

For **OpenClaw**, use the separate [`memory-powermem`](https://github.com/ob-labs/memory-powermem) plugin — see [OpenClaw integration](../docs/integrations/openclaw.md).

Expand All @@ -19,8 +23,8 @@ For **OpenClaw**, use the separate [`memory-powermem`](https://github.com/ob-lab
| Directory | Description |
|-----------|-------------|
| **[vscode-extension](vscode-extension/)** | VS Code extension and agent-guided setup for Cursor, VS Code, Windsurf, GitHub Copilot, and Qoder. Commands: Query memories, Add selection, Quick note, Link to AI tools, Setup, Dashboard. |
| **[mcp-client](mcp-client/)** | Agent-guided setup for generic MCP clients (Claude Desktop, Cline, Codex, OpenCode, and others). Uses `powermem-mcp` directly; prefers SSE on port `8848`. |
| **[claude-code-plugin](claude-code-plugin/)** | Claude Code plugin with **HTTP mode by default** (REST hooks; empty `mcpServers`). Optional **MCP mode** via [`config/mcp-mode.mcp.json`](claude-code-plugin/config/mcp-mode.mcp.json). |
| **[mcp-client](mcp-client/)** | Agent-guided setup for generic MCP clients (Claude Desktop, Cline, OpenCode, and others). Uses `powermem-mcp` directly; prefers SSE on port `8848`. |
| **[agent-plugin](agent-plugin/)** | Claude Code and Codex CLI plugin descriptors. Claude Code uses **HTTP mode by default** (REST hooks; empty `mcpServers`). Codex CLI uses skills plus explicit `codex mcp add`. Optional Claude **MCP mode** via [`config/mcp-mode.mcp.json`](agent-plugin/config/mcp-mode.mcp.json). |

## Quick start

Expand Down Expand Up @@ -52,15 +56,15 @@ All setup flows share the same backend priority:
3. **Fall back** to MCP-only only when HTTP is unavailable:
`powermem-mcp sse 8848` (or streamable HTTP / stdio when the target client requires it)

The `mcp-client/` path uses `powermem-mcp` directly and prefers SSE on port `8848`. The `vscode-extension/` path prefers the HTTP API and links the current IDE/client first. The `claude-code-plugin/` path defaults to HTTP hooks and optionally enables in-chat MCP tools.
The `mcp-client/` path uses `powermem-mcp` directly and prefers SSE on port `8848`. The `vscode-extension/` path prefers the HTTP API and links the current IDE/client first. The `agent-plugin/` path defaults to HTTP hooks for Claude Code, and provides a Codex CLI plugin that manages init/status/stop/reset skills while MCP is added explicitly with `codex mcp add`.

## Setup & uninstall guides

| Directory | Setup | Uninstall | Details |
|-----------|-------|-----------|---------|
| `vscode-extension/` | [SETUP.md](vscode-extension/SETUP.md) | [UNINSTALL.md](vscode-extension/UNINSTALL.md) | [README.md](vscode-extension/README.md) |
| `mcp-client/` | [SETUP.md](mcp-client/SETUP.md) | [UNINSTALL.md](mcp-client/UNINSTALL.md) | — |
| `claude-code-plugin/` | [SETUP.md](claude-code-plugin/SETUP.md) | [UNINSTALL.md](claude-code-plugin/UNINSTALL.md) | [README.md](claude-code-plugin/README.md) |
| `agent-plugin/` | [SETUP.md](agent-plugin/SETUP.md) | [UNINSTALL.md](agent-plugin/UNINSTALL.md) | [README.md](agent-plugin/README.md) |

## Per-client manual guides

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"email": "open_oceanbase@oceanbase.com"
},
"metadata": {
"description": "PowerMem marketplace: intelligent memory for Claude Code (Ebbinghaus decay, multi-agent, HTTP hooks).",
"description": "PowerMem marketplace: intelligent memory for Claude Code and Codex CLI.",
"version": "0.1.0"
},
"plugins": [
{
"name": "memory-powermem",
"source": "./",
"description": "PowerMem intelligent memory for Claude Code: auto-recall on prompt submit and auto-save on session end via HTTP hooks. Ebbinghaus decay and multi-agent support.",
"description": "PowerMem intelligent memory for Claude Code and Codex CLI: Claude Code uses HTTP hooks; Codex CLI uses skills with explicit MCP wiring.",
"category": "memory",
"tags": ["memory", "powermem", "rag", "hooks", "oceanbase"]
"tags": ["memory", "powermem", "rag", "hooks", "mcp", "codex", "oceanbase"]
}
]
}
30 changes: 30 additions & 0 deletions apps/agent-plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "memory-powermem",
"version": "0.1.0",
"description": "PowerMem intelligent memory for Codex CLI: initialize a local PowerMem backend and use memory skills with optional MCP tools.",
"author": {
"name": "OceanBase / PowerMem",
"email": "open_oceanbase@oceanbase.com",
"url": "https://github.com/oceanbase"
},
"homepage": "https://github.com/oceanbase/powermem/tree/main/apps/agent-plugin",
"repository": "https://github.com/oceanbase/powermem",
"license": "Apache-2.0",
"keywords": ["memory", "powermem", "codex", "mcp", "oceanbase"],
"skills": "./skills/",
"interface": {
"displayName": "PowerMem",
"shortDescription": "Persistent memory for Codex CLI.",
"longDescription": "Initialize and connect a local PowerMem backend for persistent recall, memory writes, and project decisions from Codex CLI.",
"developerName": "OceanBase / PowerMem",
"category": "Developer Tools",
"capabilities": ["Interactive", "Read", "Write"],
"websiteURL": "https://github.com/oceanbase/powermem",
"defaultPrompt": [
"Initialize PowerMem for Codex CLI.",
"Search my PowerMem memories for this task.",
"Remember this project decision in PowerMem."
],
"brandColor": "#2563EB"
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Initial release of the PowerMem plugin for Claude Code.

- Optional workspace file poller: `sh hooks/run-hook.sh poll` (see `watcher/README.md`).
- Windows: `hooks/hooks.windows.example.json` + PowerShell `run-hook.ps1` when `sh` is unavailable.
- Packaging: `scripts/package-plugin.sh` / `make package-claude-plugin`; hook binaries via `scripts/build-hook-binaries.sh` (Go 1.22+).
- Packaging: `scripts/package-plugin.sh` / `make package-agent-plugin`; hook binaries via `scripts/build-hook-binaries.sh` (Go 1.22+).
49 changes: 43 additions & 6 deletions apps/claude-code-plugin/README.md → apps/agent-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# PowerMem Plugin for Claude Code
# PowerMem Plugin for Claude Code and Codex CLI

The full Claude Code integration guide — the auto-setup prompt, manual steps, the
two connection modes (HTTP / MCP), hooks, configuration, troubleshooting, and
uninstall — now lives in the docs and is the single source of truth:
uninstall — lives in the docs:

**➡ [docs/integrations/claude_code.md](../../docs/integrations/claude_code.md)**

This directory still contains the plugin itself (`.claude-plugin/`, `hooks/`,
`skills/`, `config/`, `.mcp.json`). To load it:
The Codex CLI guide lives here:

**➡ [docs/integrations/codex.md](../../docs/integrations/codex.md)**

This directory contains the plugin descriptors and shared runtime files
(`.claude-plugin/`, `.codex-plugin/`, `hooks/`, `skills/`, `config/`, `.mcp.json`).
To load it directly in Claude Code:

```bash
claude --plugin-dir /path/to/powermem/apps/claude-code-plugin
claude --plugin-dir /path/to/powermem/apps/agent-plugin
```

## Marketplace install
## Claude Code Marketplace Install

Once the PowerMem marketplace entry is available, install the Claude Code plugin
with:
Expand Down Expand Up @@ -53,6 +58,38 @@ branch:
/reload-plugins
```

## Codex CLI Install

Install the Codex marketplace and plugin:

```bash
codex plugin marketplace add oceanbase/powermem
codex plugin add memory-powermem@powermem
```

For branch testing:

```bash
codex plugin remove memory-powermem 2>/dev/null || true
codex plugin marketplace remove powermem 2>/dev/null || true
codex plugin marketplace add https://github.com/<owner>/powermem.git --ref <branch>
codex plugin add memory-powermem@powermem
```

Start a new Codex thread, then ask Codex:

```text
Use the memory-powermem init skill to initialize PowerMem.
```

After init succeeds, wire MCP to the managed server:

```bash
. "$HOME/.powermem/runtime.env"
codex mcp remove powermem 2>/dev/null || true
codex mcp add powermem --url "${POWERMEM_BASE_URL%/}/mcp"
```

To pre-download the default local embedding model through ModelScope before
starting the server:

Expand Down
Loading
Loading