dore-memory 0.0.0-stage → 0.1.0

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,14 @@
1
- # Temporary Holding Version
1
+ # dore-memory
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
+ Local long-term memory for Claude Code. Say it once, it remembers in every new session.
4
+ Runs on your machine, nothing leaves it. macOS and Linux.
5
+
6
+ ```bash
7
+ npx dore-memory install # set up dore + the Claude Code plugin
8
+ npx dore-memory status # check it
9
+ npx dore-memory update # upgrade
10
+ npx dore-memory uninstall # remove (your memory is kept)
11
+ ```
12
+
13
+ Needs Node 18+, Claude Code, and `uv` or Python 3.11+.
14
+ Source and docs: https://github.com/SopheaII/dore-memory
@@ -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,14 @@
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.0",
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": ["claude-code", "claude", "memory", "agent", "mcp", "plugin"],
6
+ "homepage": "https://github.com/SopheaII/dore-memory#readme",
7
+ "repository": { "type": "git", "url": "git+https://github.com/SopheaII/dore-memory.git", "directory": "npm" },
8
+ "bugs": { "url": "https://github.com/SopheaII/dore-memory/issues" },
9
+ "license": "MIT",
10
+ "bin": { "dore-memory": "bin/dore-memory.js" },
11
+ "files": ["bin/", "README.md", "LICENSE"],
12
+ "engines": { "node": ">=18" },
13
+ "os": ["darwin", "linux"]
14
+ }