dore-memory 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SopheaII
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,112 @@
1
- # Temporary Holding Version
1
+ <h1 align="center">dore</h1>
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">
4
+ <strong>Memory for Claude Code. Say it once, it remembers in every new session.</strong><br/>
5
+ Runs on your laptop · free to learn · nothing leaves your machine
6
+ </p>
7
+
8
+ <p align="center">
9
+ <img src="https://img.shields.io/badge/Claude_Code-plugin_0.5.1-d97757?style=flat-square" alt="Claude Code plugin 0.5.1" />
10
+ <a href="https://www.npmjs.com/package/dore-memory"><img src="https://img.shields.io/npm/v/dore-memory?style=flat-square&logo=npm" alt="npm" /></a>
11
+ <img src="https://img.shields.io/badge/python-3.11+-3776ab?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+" />
12
+ <img src="https://img.shields.io/badge/data-stays_local-2ea44f?style=flat-square" alt="Data stays local" />
13
+ <img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT license" />
14
+ </p>
15
+
16
+ ## Why dore
17
+
18
+ **Problem:** every new Claude Code session forgets what you told it, so you repeat yourself.
19
+
20
+ **Solution:** dore remembers what you say, just by talking as usual.
21
+
22
+ - 🪶 **Saves tokens:** learning costs 0 Claude tokens; most prompts get nothing added.
23
+ - 🧠 **Learns over time:** newer facts replace older ones, with no model training.
24
+ - 🗂️ **Shared across projects:** facts about you go everywhere; project facts stay put.
25
+ - ⚡ **Fast and private:** about 13 ms per prompt; everything stays on your machine.
26
+
27
+ ## See it work in Claude Code
28
+
29
+ Real screenshots: two Claude Code windows side by side, left **without** dore, right **with** dore.
30
+ Claude Code's own memory is turned off on both sides, so only dore can remember.
31
+
32
+ **Session 1:** tell Claude a fact.
33
+
34
+ ![Session 1: both sides are told the staging port](https://raw.githubusercontent.com/SopheaII/dore-memory/master/docs/images/claude-code-1-tell.png)
35
+
36
+ **Session 2:** close Claude, start a new session, and ask.
37
+
38
+ ![Session 2: without dore Claude can't find it; with dore it answers 8443](https://raw.githubusercontent.com/SopheaII/dore-memory/master/docs/images/claude-code-2-ask.png)
39
+
40
+ Without dore, Claude can't find the port. With dore, it answers **8443** right away.
41
+
42
+ ### Shared across projects
43
+
44
+ Facts about you are shared by all your projects. Tell it in project **api**:
45
+
46
+ ![Project api: both sides are told "I write all my APIs in Go"](https://raw.githubusercontent.com/SopheaII/dore-memory/master/docs/images/claude-code-3-other-project-tell.png)
47
+
48
+ Then ask in a different project, **shop**:
49
+
50
+ ![Project shop: without dore Claude can't tell; with dore it answers Go](https://raw.githubusercontent.com/SopheaII/dore-memory/master/docs/images/claude-code-4-other-project-ask.png)
51
+
52
+ Without dore, Claude can't tell. With dore, it knows: **Go**. Facts about one project (like its port) stay in
53
+ that project.
54
+
55
+ ## Test results
56
+
57
+ | Test | Result |
58
+ |---|---|
59
+ | Remembers facts across 20 sessions | **80 of 80** |
60
+ | Shows an outdated value after a change | **0 of 53** |
61
+ | Saves chatter (requests, questions) by mistake | **0 of 39** |
62
+ | Correct after 24 weeks, 12 projects | **81%** |
63
+ | Time per prompt | **13 ms** |
64
+
65
+ Run them yourself (no AI model needed, a few seconds each):
66
+
67
+ ```bash
68
+ .venv/bin/pytest -q
69
+ .venv/bin/python -m dore.eval.conversation
70
+ .venv/bin/python -m dore.eval.learning
71
+ ```
72
+
73
+ ## Install
74
+
75
+ Needs Node 18+, [Claude Code](https://claude.com/claude-code), and [uv](https://docs.astral.sh/uv/) or Python 3.11+.
76
+
77
+ ```bash
78
+ npx dore-memory install # set up dore + the Claude Code plugin
79
+ npx dore-memory status # check it
80
+ npx dore-memory update # get the latest version
81
+ npx dore-memory uninstall # remove it (your memory is kept)
82
+ ```
83
+
84
+ dore lives in `~/.dore-memory` (change it with `DORE_HOME`).
85
+
86
+ ### From source
87
+
88
+ ```bash
89
+ git clone https://github.com/SopheaII/dore-memory.git ~/Documents/dore
90
+ cd ~/Documents/dore # or set DORE_HOME to where it is
91
+ uv venv .venv --python 3.12
92
+ uv pip install --python .venv/bin/python -e ".[dev]"
93
+ claude plugin marketplace add ~/Documents/dore
94
+ claude plugin install dore-memory@dore-memory
95
+ ```
96
+
97
+ Then use Claude Code as usual. Works on macOS and Linux, no GPU. It also works with opencode and other MCP agents.
98
+
99
+ ## Limits
100
+
101
+ - One question per fact works best. If one question asks two things, it may answer only one.
102
+ - Different words for the same thing ("job" vs "work as a nurse") may not match.
103
+ - English only.
104
+
105
+ ## More
106
+
107
+ [`AGENTS.md`](https://github.com/SopheaII/dore-memory/blob/master/AGENTS.md) (design and roadmap) · [`.agents/rules/`](https://github.com/SopheaII/dore-memory/blob/master/.agents/rules) (details and all measurements) ·
108
+ [`REFERENCES.md`](https://github.com/SopheaII/dore-memory/blob/master/REFERENCES.md) (where the ideas come from)
109
+
110
+ ## License
111
+
112
+ [MIT](https://github.com/SopheaII/dore-memory/blob/master/LICENSE): free to use, change and share.
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env node
2
+ // Installer for dore (local long-term memory for Claude Code).
3
+ // dore itself is Python: this sets it up in ~/.dore-memory (or $DORE_HOME) and registers the
4
+ // Claude Code plugin, whose hooks run ~/.dore-memory/.venv/bin/dore-hook. No dependencies.
5
+ "use strict";
6
+
7
+ const { spawnSync } = require("node:child_process");
8
+ const fs = require("node:fs");
9
+ const os = require("node:os");
10
+ const path = require("node:path");
11
+
12
+ const REPO = "SopheaII/dore-memory";
13
+ const PLUGIN = "dore-memory@dore-memory";
14
+ const HOME = process.env.DORE_HOME || path.join(os.homedir(), ".dore-memory");
15
+ const VENV = path.join(HOME, ".venv");
16
+ const HOOK = path.join(VENV, "bin", "dore-hook");
17
+ const DATA = process.env.DORE_DATA || path.join(HOME, "data");
18
+ // Until dore-memory is on PyPI, install from GitHub. Override with DORE_PIP_SPEC (e.g. "dore-memory").
19
+ const SPEC = process.env.DORE_PIP_SPEC || `git+https://github.com/${REPO}.git`;
20
+
21
+ const say = (msg) => console.log(`dore-memory: ${msg}`);
22
+ const fail = (msg) => { console.error(`dore-memory: ${msg}`); process.exit(1); };
23
+
24
+ function has(cmd) {
25
+ return spawnSync("sh", ["-c", `command -v ${cmd}`], { stdio: "ignore" }).status === 0;
26
+ }
27
+
28
+ function run(cmd, args, { allowFail = false } = {}) {
29
+ console.log(` $ ${[cmd, ...args].join(" ")}`);
30
+ const r = spawnSync(cmd, args, { stdio: "inherit" });
31
+ if (r.status !== 0 && !allowFail) fail(`command failed: ${cmd} ${args.join(" ")}`);
32
+ return r.status === 0;
33
+ }
34
+
35
+ function pythonOk(py) {
36
+ const r = spawnSync(py, ["-c", "import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)"]);
37
+ return r.status === 0;
38
+ }
39
+
40
+ function installPython(upgrade) {
41
+ fs.mkdirSync(HOME, { recursive: true });
42
+ if (has("uv")) {
43
+ if (!fs.existsSync(VENV)) run("uv", ["venv", VENV, "--python", "3.12"]);
44
+ run("uv", ["pip", "install", "--python", path.join(VENV, "bin", "python"), ...(upgrade ? ["--upgrade"] : []), SPEC]);
45
+ } else {
46
+ const py = ["python3.12", "python3.11", "python3.13", "python3"].find((p) => has(p) && pythonOk(p));
47
+ if (!py) fail("needs Python 3.11+ or uv. Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh");
48
+ if (!fs.existsSync(VENV)) run(py, ["-m", "venv", VENV]);
49
+ const pip = path.join(VENV, "bin", "pip");
50
+ run(pip, ["install", "--quiet", "--upgrade", "pip"]);
51
+ run(pip, ["install", ...(upgrade ? ["--upgrade"] : []), SPEC]);
52
+ }
53
+ if (!fs.existsSync(HOOK)) fail(`install finished but ${HOOK} is missing`);
54
+ }
55
+
56
+ function installPlugin() {
57
+ if (!has("claude")) {
58
+ say("Claude Code CLI not found. Install Claude Code, then run: npx dore-memory install");
59
+ return false;
60
+ }
61
+ // "add" fails when the marketplace is already known; that is fine.
62
+ run("claude", ["plugin", "marketplace", "add", REPO], { allowFail: true });
63
+ run("claude", ["plugin", "marketplace", "update", "dore-memory"], { allowFail: true });
64
+ return run("claude", ["plugin", "install", PLUGIN], { allowFail: true });
65
+ }
66
+
67
+ function install(upgrade) {
68
+ if (process.platform === "win32") fail("Windows is not supported yet (macOS and Linux only).");
69
+ say(`setting up in ${HOME} (first run downloads ~200 MB of packages and models)`);
70
+ installPython(upgrade);
71
+ const plugin = installPlugin();
72
+ say("done.");
73
+ console.log(` memory: ${DATA}`);
74
+ console.log(` plugin: ${plugin ? PLUGIN + " installed" : "not installed (see above)"}`);
75
+ console.log(" Start a new Claude Code session; dore learns from what you tell it.");
76
+ }
77
+
78
+ function uninstall() {
79
+ if (has("claude")) run("claude", ["plugin", "uninstall", PLUGIN], { allowFail: true });
80
+ if (fs.existsSync(VENV)) fs.rmSync(VENV, { recursive: true, force: true });
81
+ say("removed the plugin and the Python environment.");
82
+ // dore never deletes memories: the notes stay unless the user removes them.
83
+ console.log(` Your memory was kept in ${DATA}. Delete that folder yourself if you want it gone.`);
84
+ }
85
+
86
+ function status() {
87
+ console.log(`home: ${HOME}`);
88
+ console.log(`hook: ${fs.existsSync(HOOK) ? HOOK : "missing (run: npx dore-memory install)"}`);
89
+ console.log(`memory: ${fs.existsSync(path.join(DATA, "memory.db")) ? path.join(DATA, "memory.db") : "empty"}`);
90
+ if (has("claude")) {
91
+ const r = spawnSync("claude", ["plugin", "list"], { encoding: "utf8" });
92
+ const on = (r.stdout || "").includes(PLUGIN);
93
+ console.log(`plugin: ${on ? PLUGIN : "not installed"}`);
94
+ } else {
95
+ console.log("plugin: Claude Code CLI not found");
96
+ }
97
+ }
98
+
99
+ const HELP = `Usage: npx dore-memory <command>
100
+
101
+ install set up dore and its Claude Code plugin
102
+ update upgrade dore to the latest version
103
+ status show where dore is and whether the plugin is on
104
+ uninstall remove the plugin and Python environment (keeps your memory)
105
+
106
+ Environment: DORE_HOME (default ~/.dore-memory), DORE_PIP_SPEC (what to pip install).`;
107
+
108
+ const cmd = process.argv[2];
109
+ if (cmd === "install") install(false);
110
+ else if (cmd === "update") { installPython(true); installPlugin(); say("updated."); }
111
+ else if (cmd === "status") status();
112
+ else if (cmd === "uninstall") uninstall();
113
+ else { console.log(HELP); process.exit(cmd && !["-h", "--help", "help"].includes(cmd) ? 1 : 0); }
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "dore-memory",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Local long-term memory for Claude Code. Say it once, it remembers in every new session. Installs the dore Python package and its Claude Code plugin.",
5
+ "keywords": [
6
+ "claude-code",
7
+ "claude",
8
+ "memory",
9
+ "agent",
10
+ "mcp",
11
+ "plugin"
12
+ ],
13
+ "homepage": "https://github.com/SopheaII/dore-memory#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/SopheaII/dore-memory.git",
17
+ "directory": "npm"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/SopheaII/dore-memory/issues"
21
+ },
22
+ "license": "MIT",
23
+ "bin": {
24
+ "dore-memory": "bin/dore-memory.js"
25
+ },
26
+ "files": [
27
+ "bin/",
28
+ "README.md",
29
+ "LICENSE"
30
+ ],
31
+ "engines": {
32
+ "node": ">=18"
33
+ },
34
+ "os": [
35
+ "darwin",
36
+ "linux"
37
+ ],
38
+ "scripts": {
39
+ "prepack": "node scripts/sync-readme.js"
40
+ }
41
+ }