memorizz 0.6.2 → 0.7.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/README.md +4 -3
- package/bin/memorizz.js +7 -2
- package/package.json +1 -1
- package/scripts/postinstall.js +10 -4
package/README.md
CHANGED
|
@@ -6,8 +6,9 @@ developers. On `npm install -g memorizz` it:
|
|
|
6
6
|
|
|
7
7
|
1. finds or installs [`uv`](https://docs.astral.sh/uv/) (a standalone binary that
|
|
8
8
|
manages its own Python — you do **not** need Python pre-installed), then
|
|
9
|
-
2. runs `uv tool install "memorizz[mcp]"` so the full CLI,
|
|
10
|
-
client/server commands, is available
|
|
9
|
+
2. runs `uv tool install --python 3.12 "memorizz[mcp]"` so the full CLI,
|
|
10
|
+
including MCP client/server commands, is available even when the host's
|
|
11
|
+
default Python is older.
|
|
11
12
|
|
|
12
13
|
The `memorizz` command then execs the uv-installed CLI.
|
|
13
14
|
|
|
@@ -20,7 +21,7 @@ vendor CLIs; inspect local readiness with `memorizz harness doctor`.
|
|
|
20
21
|
If you already use Python tooling, prefer these:
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
|
-
uv tool install "memorizz[mcp]"
|
|
24
|
+
uv tool install --python 3.12 "memorizz[mcp]" # recommended complete CLI
|
|
24
25
|
pipx install "memorizz[mcp]"
|
|
25
26
|
```
|
|
26
27
|
|
package/bin/memorizz.js
CHANGED
|
@@ -11,6 +11,7 @@ const os = require("os");
|
|
|
11
11
|
const path = require("path");
|
|
12
12
|
const fs = require("fs");
|
|
13
13
|
const VERSION = require("../package.json").version;
|
|
14
|
+
const PYTHON_VERSION = "3.12";
|
|
14
15
|
const PACKAGE_SPEC = `memorizz[mcp]==${VERSION}`;
|
|
15
16
|
const EXPECTED_VERSION = `memorizz ${VERSION}`;
|
|
16
17
|
|
|
@@ -84,11 +85,15 @@ if (exe) {
|
|
|
84
85
|
process.stderr.write(
|
|
85
86
|
`[memorizz] MemoRizz ${VERSION} is not installed and uv was not found.\n` +
|
|
86
87
|
" Try: npm rebuild -g memorizz (re-runs the bootstrapper)\n" +
|
|
87
|
-
` Or: uv tool install '${PACKAGE_SPEC}'\n`
|
|
88
|
+
` Or: uv tool install --python ${PYTHON_VERSION} '${PACKAGE_SPEC}'\n`
|
|
88
89
|
);
|
|
89
90
|
process.exit(127);
|
|
90
91
|
}
|
|
91
|
-
res = spawnSync(
|
|
92
|
+
res = spawnSync(
|
|
93
|
+
uv,
|
|
94
|
+
["tool", "run", "--python", PYTHON_VERSION, "--from", PACKAGE_SPEC, "memorizz", ...args],
|
|
95
|
+
{ stdio: "inherit" }
|
|
96
|
+
);
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
process.exit(res.status == null ? 1 : res.status);
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
// Convenience bootstrapper: `npm i -g memorizz` installs the real Python CLI via
|
|
5
5
|
// `uv` (a standalone binary that manages its own Python — no pre-existing Python
|
|
6
|
-
// required). This is NOT the canonical install path; `uv tool install
|
|
7
|
-
// and `pipx install memorizz` are first-class. Fails
|
|
6
|
+
// required). This is NOT the canonical install path; `uv tool install
|
|
7
|
+
// --python 3.12 memorizz` and `pipx install memorizz` are first-class. Fails
|
|
8
|
+
// soft: a bootstrap error
|
|
8
9
|
// never bricks the package — bin/memorizz.js retries via `uv tool run` on first
|
|
9
10
|
// use.
|
|
10
11
|
"use strict";
|
|
@@ -15,6 +16,7 @@ const path = require("path");
|
|
|
15
16
|
const fs = require("fs");
|
|
16
17
|
|
|
17
18
|
const VERSION = require("../package.json").version;
|
|
19
|
+
const PYTHON_VERSION = "3.12";
|
|
18
20
|
// The npm bridge represents the complete command-line product, including MCP
|
|
19
21
|
// client/server commands whose Python dependencies are optional for library-only
|
|
20
22
|
// installs.
|
|
@@ -73,7 +75,11 @@ function main() {
|
|
|
73
75
|
let uv = findUv() || installUv();
|
|
74
76
|
if (uv) {
|
|
75
77
|
log(`Installing ${PACKAGE_SPEC} via uv…`);
|
|
76
|
-
const r = spawnSync(
|
|
78
|
+
const r = spawnSync(
|
|
79
|
+
uv,
|
|
80
|
+
["tool", "install", "--python", PYTHON_VERSION, "--force", PACKAGE_SPEC],
|
|
81
|
+
{ stdio: "inherit" }
|
|
82
|
+
);
|
|
77
83
|
if (r.status === 0) {
|
|
78
84
|
log("Done. Run: memorizz");
|
|
79
85
|
return;
|
|
@@ -95,7 +101,7 @@ function main() {
|
|
|
95
101
|
"Could not bootstrap memorizz automatically.",
|
|
96
102
|
"Install it manually with either:",
|
|
97
103
|
" curl -LsSf https://astral.sh/uv/install.sh | sh",
|
|
98
|
-
` uv tool install '${PACKAGE_SPEC}'`,
|
|
104
|
+
` uv tool install --python ${PYTHON_VERSION} '${PACKAGE_SPEC}'`,
|
|
99
105
|
` pipx install '${PACKAGE_SPEC}'`,
|
|
100
106
|
"The `memorizz` launcher will also retry via `uv tool run` on first use.",
|
|
101
107
|
].join("\n")
|