nexusmem 0.5.3 → 0.5.4

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/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ built from, matched by publish timestamp: `v0.1.0` → `67a4776`, `v0.1.1` → `
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.5.4] — 2026-08-20
13
+
14
+ ### Added
15
+
16
+ - `nexusmem status --share`: a plain-text, no-color summary (node count, failure→fix chains
17
+ linked, days of history) meant to be pasted somewhere, not scraped by a script.
18
+
12
19
  ## [0.5.3] — 2026-08-19
13
20
 
14
21
  No functional changes to the CLI, MCP server, or published package -- a test-coverage and
package/README.md CHANGED
@@ -351,8 +351,9 @@ problem.
351
351
 
352
352
  ## Commands
353
353
 
354
- `init`, `sync`, `query <text>`, `status`, `projects`, `mcp`, `forget <value>`,
355
- `mark-stale <nodeId> --supersedes <newNodeId>`, and `hook install|remove|status`.
354
+ `init`, `sync`, `query <text>`, `status` (add `--share` for a plain-text summary worth pasting
355
+ somewhere), `projects`, `mcp`, `forget <value>`, `mark-stale <nodeId> --supersedes <newNodeId>`,
356
+ and `hook install|remove|status`.
356
357
 
357
358
  There are also five dry-run previews (`scan-git`, `scan-diff`, `scan-shell`, `scan-docs`,
358
359
  `scan-conversation`)
package/dist/cli/index.js CHANGED
@@ -5370,8 +5370,35 @@ ${pc17.bold(String(edges.length))} edge(s) from ${filesScanned} tracked .ts/.tsx
5370
5370
  }
5371
5371
 
5372
5372
  // src/cli/commands/status.ts
5373
+ import { basename as basename4 } from "path";
5373
5374
  import { statSync } from "fs";
5374
5375
  import pc18 from "picocolors";
5376
+ function daySpan(oldest, newest) {
5377
+ const oldestDay = Date.parse(oldest.slice(0, 10));
5378
+ const newestDay = Date.parse(newest.slice(0, 10));
5379
+ return Math.round((newestDay - oldestDay) / 864e5) + 1;
5380
+ }
5381
+ function buildShareText(repo, stats2, chains) {
5382
+ if (stats2.total === 0) {
5383
+ return "Nothing synced yet in this repo -- run `nexusmem sync` first, then `nexusmem status --share`.\n";
5384
+ }
5385
+ const days = daySpan(stats2.oldest ?? stats2.newest ?? "", stats2.newest ?? stats2.oldest ?? "");
5386
+ const commits = stats2.byKind.git_commit ?? 0;
5387
+ const shellCommands = stats2.byKind.shell_command ?? 0;
5388
+ const docs = stats2.byKind.doc_section ?? 0;
5389
+ const parts = [`${commits} commit(s)`, `${shellCommands} shell command(s)`, `${docs} doc section(s)`].filter(
5390
+ (p) => !p.startsWith("0 ")
5391
+ );
5392
+ const lines = [
5393
+ `NexusMem has been watching ${basename4(repo.root)} for ${days} day(s):`,
5394
+ ` ${stats2.total} memories${parts.length ? ` (${parts.join(", ")})` : ""}`
5395
+ ];
5396
+ if (chains.failuresTotal) {
5397
+ lines.push(` ${chains.resolvedTotal}/${chains.failuresTotal} failure -> fix chain(s) linked`);
5398
+ }
5399
+ lines.push("", "Local-only SQLite, no cloud, no telemetry.", "https://github.com/yaminbkk/NexusMem");
5400
+ return lines.join("\n").concat("\n");
5401
+ }
5375
5402
  function humanBytes(bytes) {
5376
5403
  if (bytes < 1024) return `${bytes} B`;
5377
5404
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -5390,10 +5417,14 @@ async function runStatus(opts) {
5390
5417
  const store = MemoryStore.open(ws.dbPath);
5391
5418
  try {
5392
5419
  const stats2 = store.stats(projectId);
5420
+ const chains = getChainStats(store, projectId);
5421
+ if (opts.share) {
5422
+ out(buildShareText(repo, stats2, chains));
5423
+ return 0;
5424
+ }
5393
5425
  const sources = store.listSyncState(projectId);
5394
5426
  const gitCursor = sources.find((s) => s.source === "git")?.cursor ?? null;
5395
5427
  const schema = currentSchemaVersion(store.raw);
5396
- const chains = getChainStats(store, projectId);
5397
5428
  const otherProjectIds = store.listOtherProjectIds(projectId);
5398
5429
  const otherProjectNodes = store.countProjectNodes(otherProjectIds);
5399
5430
  const structure = store.fileEdgeStats(projectId);
@@ -5509,7 +5540,7 @@ program.command("hook").description("Manage the opt-in PowerShell hook that logs
5509
5540
  new Command("status").description("Show whether the git pre-commit hook is installed").option("-C, --cwd <path>", "repository path", process.cwd()).action((options) => guard(() => runHookGitStatus({ cwd: options.cwd }))())
5510
5541
  )
5511
5542
  );
5512
- program.command("status").description("Show what is currently remembered for this repository").option("-C, --cwd <path>", "repository path", process.cwd()).action((options) => guard(() => runStatus({ cwd: options.cwd }))());
5543
+ program.command("status").description("Show what is currently remembered for this repository").option("-C, --cwd <path>", "repository path", process.cwd()).option("--share", "print a plain-text summary formatted for sharing, e.g. on X or Reddit").action((options) => guard(() => runStatus({ cwd: options.cwd, share: options.share }))());
5513
5544
  program.command("query").description("Search remembered history and print a token-budgeted context block").argument("<text>", "free-text query").option("-C, --cwd <path>", "repository path", process.cwd()).option("-b, --budget <tokens>", "max tokens in the packed context", (v) => Number.parseInt(v, 10), 2e3).option("-n, --candidates <count>", "how many search hits to rank before packing", (v) => Number.parseInt(v, 10), 30).option("--half-life <days>", "days for a node's recency weight to halve", (v) => Number.parseFloat(v)).option("--no-vector", "BM25 only -- skip embedding the query and vector search").option("-a, --all-projects", "search every registered repository, not just this one", false).option("--json", "emit the packed result as JSON on stdout", false).action(
5514
5545
  (text, options) => guard(
5515
5546
  () => runQuery({