@memories.sh/cli 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +14 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -567,19 +567,22 @@ var initCommand = new Command("init").description("Initialize memories for the c
567
567
  const configDir = getConfigDir();
568
568
  dim(`Database: ${configDir}/local.db`);
569
569
  step(2, 3, "Detecting scope...");
570
- if (opts.global) {
571
- success("Using global scope (applies to all projects)");
572
- } else {
570
+ let useGlobal = opts.global;
571
+ if (!useGlobal) {
573
572
  const projectId = getProjectId();
574
573
  const gitRoot = getGitRoot();
575
574
  if (!projectId) {
576
- warn("Not in a git repository");
577
- dim("Run from a git repo for project-scoped memories, or use --global");
578
- return;
575
+ warn("Not in a git repository - using global scope");
576
+ dim("Global memories apply to all projects");
577
+ useGlobal = true;
578
+ } else {
579
+ success("Using project scope");
580
+ dim(`Project: ${projectId}`);
581
+ dim(`Root: ${gitRoot}`);
579
582
  }
580
- success("Using project scope");
581
- dim(`Project: ${projectId}`);
582
- dim(`Root: ${gitRoot}`);
583
+ }
584
+ if (useGlobal) {
585
+ success("Using global scope (applies to all projects)");
583
586
  }
584
587
  step(3, 3, "Checking account...");
585
588
  const auth = await readAuth();
@@ -595,7 +598,7 @@ var initCommand = new Command("init").description("Initialize memories for the c
595
598
  for (const rule of opts.rule) {
596
599
  const memory = await addMemory(rule, {
597
600
  type: "rule",
598
- global: opts.global
601
+ global: useGlobal
599
602
  });
600
603
  dim(`${memory.id}: ${rule}`);
601
604
  }
@@ -3164,7 +3167,7 @@ var logoutCommand = new Command21("logout").description("Log out of memories.sh"
3164
3167
  });
3165
3168
 
3166
3169
  // src/index.ts
3167
- var program = new Command22().name("memories").description("A local-first memory layer for AI agents").version("0.2.0");
3170
+ var program = new Command22().name("memories").description("A local-first memory layer for AI agents").version("0.2.1");
3168
3171
  program.addCommand(initCommand);
3169
3172
  program.addCommand(addCommand);
3170
3173
  program.addCommand(recallCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memories.sh/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A local-first memory layer for AI coding agents — persistent context for Claude, Cursor, and more",
5
5
  "type": "module",
6
6
  "license": "MIT",