project-cypher 0.5.0 → 0.6.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.
Files changed (2) hide show
  1. package/bin/cypher.js +10 -4
  2. package/package.json +1 -1
package/bin/cypher.js CHANGED
@@ -50,10 +50,16 @@ const cmds = {
50
50
  console.log(`[ok] Server ${base}`);
51
51
  if (c.token) { const again = await ask('This computer is already linked. Link again? [y/N] '); if (!yes(again, false)) { console.log('Keeping the existing link.'); } else await doLink(base); }
52
52
  else await doLink(base);
53
- const cwd = process.cwd(); const k = load();
54
- if (!k.projects.some(p => p.path === cwd) && cwd !== os.homedir() && yes(await ask(`Add this folder as a project (${cwd})? [Y/n] `), true)) cmds.add('.');
55
- if (!load().projects.length) { console.log('\nNo project yet. In a project folder run: cypher add . then: cypher connect'); return; }
56
- console.log('\nGoing online. Keep this window open (Ctrl+C to stop). Next time: cypher connect');
53
+ // Pick the folder Claude works in. Default: where you ran this (even your home folder), so the app can chat right away.
54
+ let k = load();
55
+ if (!k.projects.length) {
56
+ const cwd = process.cwd();
57
+ let dir = cwd;
58
+ if (!yes(await ask(`Let Claude work in this folder? ${cwd} [Y/n] `), true)) dir = path.resolve((await ask('Folder path: ')).replace(/^~/, os.homedir()));
59
+ cmds.add(dir);
60
+ } else if (!k.projects.some(p => p.path === process.cwd()) && process.cwd() !== os.homedir() && yes(await ask(`Also add this folder (${process.cwd()})? [Y/n] `), true)) cmds.add('.');
61
+ if (!load().projects.length) { console.log('\nNo project added. Run: cypher add <folder> then: cypher connect'); return; }
62
+ console.log('\nOnline soon. Keep this window open (Ctrl+C to stop). Next time just run: cypher connect');
57
63
  cmds.connect();
58
64
  },
59
65
  // One command to link this computer to the phone: shows a QR + code, waits for the app, adds the current folder, goes online.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-cypher",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Connect your machine's Claude Code projects to the Project Cypher phone app.",
5
5
  "bin": {
6
6
  "cypher": "bin/cypher.js"