open-index/open-npm huggingface dataset:
npm package: @2en/memory-browser
Description: OpenClaw plugin that exposes the **memory directory** (all `.md` files) as **Gateway WebSocket RPC methods**.
Latest version: 1.1.1

# memory-browser

OpenClaw plugin that exposes the **memory directory** (all `.md` files) as **Gateway WebSocket RPC methods**.

## What you get

Gateway methods (call via WS RPC):

- **`memory-browser.list`** — List all `.md` files in the memory directory (recursive). Returns `{ files: string[] }` (relative paths).
- **`memory-browser.get`** — Return the content of a single `.md` file. Params: `{ path: string }` (relative path, e.g. `"notes/foo.md"`). Returns `{ path: string, content: string }`.

## Memory directory

The memory directory is resolved in this order:

1. Plugin config `memoryDir` (absolute path)
2. `<OPENCLAW_STATE_DIR>/memory` (or `<CLAWDBOT_STATE_DIR>/memory`)
3. `<process.cwd()>/memory`

## Install on a gateway host

1. Put this plugin on the gateway host and make it discoverable, e.g.:
   - Workspace: `<workspace>/.openclaw/extensions/memory-browser/` with `index.ts` + `openclaw.plugin.json`
   - Or set `plugins.load.paths` to the plugin folder

2. Enable the plugin in `openclaw.json`:

```json5
{
  "plugins": {
    "enabled": true,
    "entries": {
      "memory-browser": { "enabled": true, "config": {} }
    }
  }
}
```

Optional config: `config.memoryDir` to override the memory directory path.

## Call examples (RPC params)

List all `.md` files:

```json
{ "method": "memory-browser.list", "params": {} }
```

Get one file:

```json
{ "method": "memory-browser.get", "params": { "path": "notes/meeting-2024.md" } }
```

`path` must be a relative path to a `.md` file inside the memory directory; directory traversal (`..`) is rejected.