sticky-note-cli 3.1.38 → 3.1.39

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/bin/cli.js +8 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -624,7 +624,14 @@ async function cmdInit() {
624
624
  print(" [ERR] Not a git repository. Run `git init` first.");
625
625
  process.exit(1);
626
626
  }
627
- print(" [OK] Git repository detected");
627
+ // Resolve git root and chdir there so init works from any subdirectory
628
+ const repoRoot = execSync("git rev-parse --show-toplevel", { encoding: "utf-8" }).trim();
629
+ if (repoRoot !== process.cwd()) {
630
+ process.chdir(repoRoot);
631
+ print(` [OK] Git repository detected (running from root: ${repoRoot})`);
632
+ } else {
633
+ print(" [OK] Git repository detected");
634
+ }
628
635
  print("");
629
636
 
630
637
  // Read existing sticky-note-config.json for teammate flow (cloud URL pre-set via git)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sticky-note-cli",
3
- "version": "3.1.38",
3
+ "version": "3.1.39",
4
4
  "description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
5
5
  "license": "MIT",
6
6
  "bin": {