@clauderecallhq/cli 0.61.5 → 0.63.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.
@@ -1,38 +1,68 @@
1
1
  #!/usr/bin/env node
2
2
  import { existsSync } from 'node:fs';
3
- import { execSync, spawnSync } from 'node:child_process';
3
+ import { spawnSync } from 'node:child_process';
4
4
 
5
5
  const cliPath = 'dist/cli.js';
6
6
 
7
+ // dist/cli.js is in the npm `files` allowlist and ships in every published
8
+ // tarball. If it's missing here we're in a linked dev install, not an
9
+ // end-user `npm install -g`, and the dev should run `npm run build:cli`
10
+ // themselves. Never invoke a build toolchain on an end-user machine.
7
11
  if (!existsSync(cliPath)) {
8
- console.log('[recall] dist/cli.js missing — rebuilding so the linked CLI keeps working');
9
- execSync('npm run build:cli', { stdio: 'inherit' });
10
- }
11
-
12
- if (process.env.RECALL_SKIP_MODEL_DOWNLOAD === '1') {
13
- console.log('[recall] RECALL_SKIP_MODEL_DOWNLOAD=1 — skipping embedder model download');
14
- console.log('[recall] Run `recall semantic install` later to enable vector search');
12
+ console.log('[recall] dist/cli.js missing — run `npm run build:cli` (dev) or reinstall the package (end-user)');
15
13
  process.exit(0);
16
14
  }
17
15
 
18
- if (process.env.CI === 'true' && process.env.RECALL_FORCE_MODEL_DOWNLOAD !== '1') {
19
- console.log('[recall] CI environment detected — skipping embedder model download');
20
- console.log('[recall] Run `recall semantic install` to enable vector search later');
21
- process.exit(0);
22
- }
16
+ runModelDownload();
17
+ printPostInstallBanner();
18
+ process.exit(0);
23
19
 
24
- console.log('[recall] Installing embedder model bge-base-en-v1.5 (~110MB) so vector search works out of the box…');
25
- console.log('[recall] set RECALL_SKIP_MODEL_DOWNLOAD=1 to skip; install later with `recall semantic install`');
20
+ function runModelDownload() {
21
+ if (process.env.RECALL_SKIP_MODEL_DOWNLOAD === '1') {
22
+ console.log('[recall] RECALL_SKIP_MODEL_DOWNLOAD=1 — skipping embedder model download');
23
+ console.log('[recall] Run `recall semantic install` later to enable vector search');
24
+ return;
25
+ }
26
26
 
27
- const result = spawnSync(process.execPath, [cliPath, 'semantic', 'install'], {
28
- stdio: 'inherit',
29
- env: process.env,
30
- });
27
+ if (process.env.CI === 'true' && process.env.RECALL_FORCE_MODEL_DOWNLOAD !== '1') {
28
+ console.log('[recall] CI environment detected — skipping embedder model download');
29
+ console.log('[recall] Run `recall semantic install` to enable vector search later');
30
+ return;
31
+ }
31
32
 
32
- if (result.status !== 0) {
33
- console.warn('[recall] Embedder model download skipped or failed (exit code ' + result.status + ')');
34
- console.warn('[recall] CLI is installed and working. Run `recall semantic install` later to enable vector search.');
33
+ console.log('[recall] Installing embedder model bge-base-en-v1.5 (~110MB) so vector search works out of the box…');
34
+ console.log('[recall] set RECALL_SKIP_MODEL_DOWNLOAD=1 to skip; install later with `recall semantic install`');
35
+
36
+ const result = spawnSync(process.execPath, [cliPath, 'semantic', 'install'], {
37
+ stdio: 'inherit',
38
+ env: process.env,
39
+ });
40
+
41
+ if (result.status !== 0) {
42
+ console.warn('[recall] Embedder model download skipped or failed (exit code ' + result.status + ')');
43
+ console.warn('[recall] CLI is installed and working. Run `recall semantic install` later to enable vector search.');
44
+ }
35
45
  }
36
46
 
37
- // Always exit 0: never block install on model download
38
- process.exit(0);
47
+ function printPostInstallBanner() {
48
+ // Skip in CI / non-interactive contexts to keep build logs quiet.
49
+ if (process.env.CI === 'true') return;
50
+ if (process.env.RECALL_QUIET_INSTALL === '1') return;
51
+ if (!process.stdout.isTTY) return;
52
+
53
+ const lines = [
54
+ '',
55
+ ' ───────────────────────────────────────────────',
56
+ ' Claude Recall is installed.',
57
+ '',
58
+ ' recall open the dashboard',
59
+ ' recall index build the searchable database',
60
+ ' recall trial start a 7-day Pro trial (no card)',
61
+ '',
62
+ ' Free tier is fully usable. Trial unlocks Pro features',
63
+ ' for 7 days. Founder pricing ($29.69 lifetime) ends May 31.',
64
+ ' ───────────────────────────────────────────────',
65
+ '',
66
+ ];
67
+ for (const line of lines) console.log(line);
68
+ }