@any-sync/cli 0.2.7 → 0.2.9

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/lib/onboard.js +16 -3
  2. package/package.json +1 -1
package/lib/onboard.js CHANGED
@@ -13,9 +13,22 @@ const { pull } = require('./pull');
13
13
  // ── Helpers ──────────────────────────────────────────────────────────────────
14
14
 
15
15
  function isToolInstalled(name) {
16
- const cmd = process.platform === 'win32' ? 'where' : 'which';
16
+ if (process.platform === 'win32') {
17
+ // Try 'where' (cmd) then 'powershell Get-Command' (PowerShell)
18
+ try {
19
+ execFileSync('where', [name], { stdio: 'pipe' });
20
+ return true;
21
+ } catch {
22
+ try {
23
+ execFileSync('powershell', ['-NoProfile', '-Command', `Get-Command ${name}`], { stdio: 'pipe' });
24
+ return true;
25
+ } catch {
26
+ return false;
27
+ }
28
+ }
29
+ }
17
30
  try {
18
- execFileSync(cmd, [name], { stdio: 'pipe' });
31
+ execFileSync('which', [name], { stdio: 'pipe' });
19
32
  return true;
20
33
  } catch {
21
34
  return false;
@@ -43,7 +56,7 @@ function write(output, text) {
43
56
  function detectTools() {
44
57
  return {
45
58
  gh: isToolInstalled('gh'),
46
- claude: isToolInstalled('claude'),
59
+ claude: isToolInstalled('claude') || !!process.env.CLAUDE_CODE_ENTRYPOINT,
47
60
  openclaw: isToolInstalled('openclaw'),
48
61
  code: isToolInstalled('code'),
49
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@any-sync/cli",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "CLI and core library for Any Sync — bidirectional GitHub file sync",
5
5
  "main": "lib/index.js",
6
6
  "exports": {