@ekkos/cli 1.0.2 → 1.0.4

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.
@@ -888,6 +888,17 @@ function launchWithDashboard(options) {
888
888
  }
889
889
  }
890
890
  async function run(options) {
891
+ // ══════════════════════════════════════════════════════════════════════════
892
+ // AUTO-SETUP: Run setup inline if this is a fresh install
893
+ // New users can just type `ekkos run` and get the full onboarding flow
894
+ // ══════════════════════════════════════════════════════════════════════════
895
+ const configFile = path.join(os.homedir(), '.ekkos', 'config.json');
896
+ if (!fs.existsSync(configFile)) {
897
+ console.log(chalk_1.default.cyan('\n👋 Welcome to ekkOS! Setting up your environment...\n'));
898
+ const { setup } = await Promise.resolve().then(() => __importStar(require('./setup.js')));
899
+ await setup({ ide: 'all' });
900
+ console.log('');
901
+ }
891
902
  const verbose = options.verbose || false;
892
903
  const bypass = options.bypass || false;
893
904
  const noInject = options.noInject || false;
@@ -6,40 +6,28 @@ const fs_1 = require("fs");
6
6
  const platform_1 = require("../utils/platform");
7
7
  /**
8
8
  * Generate the hooks configuration for Claude Code settings.json
9
+ * Uses the new format required by Claude Code 2.1.40+
9
10
  */
10
11
  function generateHooksConfig() {
11
12
  const hooksDir = `${platform_1.HOME_DIR}/.claude/hooks`;
12
13
  if (platform_1.isWindows) {
13
- // Windows uses PowerShell
14
14
  return {
15
- SessionStart: [
16
- { type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/session-start.ps1"` }
17
- ],
18
15
  UserPromptSubmit: [
19
- { type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/user-prompt-submit.ps1"` }
16
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/user-prompt-submit.ps1"` }] }
20
17
  ],
21
18
  Stop: [
22
- { type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/stop.ps1"` }
19
+ { hooks: [{ type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/stop.ps1"` }] }
23
20
  ],
24
- AssistantResponse: [
25
- { type: 'command', command: `powershell -ExecutionPolicy Bypass -File "${hooksDir}/assistant-response.ps1"` }
26
- ]
27
21
  };
28
22
  }
29
23
  // Unix uses bash
30
24
  return {
31
- SessionStart: [
32
- { type: 'command', command: `bash ${hooksDir}/session-start.sh` }
33
- ],
34
25
  UserPromptSubmit: [
35
- { type: 'command', command: `bash ${hooksDir}/user-prompt-submit.sh` }
26
+ { hooks: [{ type: 'command', command: `bash ${hooksDir}/user-prompt-submit.sh` }] }
36
27
  ],
37
28
  Stop: [
38
- { type: 'command', command: `bash ${hooksDir}/stop.sh` }
29
+ { hooks: [{ type: 'command', command: `bash ${hooksDir}/stop.sh` }] }
39
30
  ],
40
- AssistantResponse: [
41
- { type: 'command', command: `bash ${hooksDir}/assistant-response.sh` }
42
- ]
43
31
  };
44
32
  }
45
33
  /**
@@ -74,8 +62,7 @@ function areHooksConfigured() {
74
62
  try {
75
63
  const settings = JSON.parse((0, fs_1.readFileSync)(platform_1.CLAUDE_SETTINGS, 'utf-8'));
76
64
  const hooks = settings.hooks || {};
77
- return Boolean(hooks.SessionStart?.length &&
78
- hooks.UserPromptSubmit?.length &&
65
+ return Boolean(hooks.UserPromptSubmit?.length &&
79
66
  hooks.Stop?.length);
80
67
  }
81
68
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ekkos/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Setup ekkOS memory for AI coding assistants (Claude Code, Cursor, Windsurf)",
5
5
  "main": "dist/index.js",
6
6
  "bin": {