@codebakers/cli 3.5.0 → 3.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.
@@ -8,8 +8,12 @@ const chalk_1 = __importDefault(require("chalk"));
8
8
  const fs_1 = require("fs");
9
9
  const path_1 = require("path");
10
10
  const config_js_1 = require("../config.js");
11
+ const api_js_1 = require("../lib/api.js");
11
12
  async function status() {
12
- console.log(chalk_1.default.blue('\n CodeBakers Status\n'));
13
+ console.log(chalk_1.default.blue('\n CodeBakers Status (v6.0)\n'));
14
+ // Show version
15
+ const version = (0, api_js_1.getCliVersion)();
16
+ console.log(chalk_1.default.gray(` CLI Version: ${version}\n`));
13
17
  // Check login status
14
18
  const apiKey = (0, config_js_1.getApiKey)();
15
19
  if (apiKey) {
@@ -18,7 +22,7 @@ async function status() {
18
22
  }
19
23
  else {
20
24
  console.log(chalk_1.default.red(' ✗ Not logged in'));
21
- console.log(chalk_1.default.gray(' Run `codebakers login` to authenticate'));
25
+ console.log(chalk_1.default.gray(' Run `codebakers setup` to authenticate'));
22
26
  }
23
27
  console.log('');
24
28
  // Check installation status in current directory
@@ -29,21 +33,45 @@ async function status() {
29
33
  const hasCursorRules = (0, fs_1.existsSync)(cursorrules);
30
34
  const hasClaudeMd = (0, fs_1.existsSync)(claudemd);
31
35
  const hasClaudeDir = (0, fs_1.existsSync)(claudeDir);
32
- if (hasCursorRules || hasClaudeMd || hasClaudeDir) {
33
- console.log(chalk_1.default.green(' ✓ Patterns installed in this directory'));
34
- if (hasCursorRules) {
35
- console.log(chalk_1.default.gray(' - .cursorrules (Cursor IDE)'));
36
- }
37
- if (hasClaudeMd) {
38
- console.log(chalk_1.default.gray(' - CLAUDE.md (Claude Code)'));
36
+ // Check version of installed files
37
+ let isV6 = false;
38
+ if (hasClaudeMd) {
39
+ const content = (0, fs_1.readFileSync)(claudemd, 'utf-8');
40
+ isV6 = content.includes('discover_patterns') || content.includes('v6.0');
41
+ }
42
+ if (hasCursorRules || hasClaudeMd) {
43
+ if (isV6) {
44
+ console.log(chalk_1.default.green(' ✓ CodeBakers v6.0 installed'));
45
+ console.log(chalk_1.default.gray(' - CLAUDE.md (Claude Code gateway)'));
46
+ console.log(chalk_1.default.gray(' - .cursorrules (Cursor IDE gateway)'));
47
+ console.log(chalk_1.default.cyan('\n v6.0 Features:'));
48
+ console.log(chalk_1.default.gray(' - Server-side patterns (always up-to-date)'));
49
+ console.log(chalk_1.default.gray(' - AI calls discover_patterns before coding'));
50
+ console.log(chalk_1.default.gray(' - Usage tracking & compliance'));
39
51
  }
40
- if (hasClaudeDir) {
41
- console.log(chalk_1.default.gray(' - .claude/ (Pattern modules)'));
52
+ else {
53
+ console.log(chalk_1.default.yellow(' CodeBakers v5 installed (legacy)'));
54
+ if (hasCursorRules) {
55
+ console.log(chalk_1.default.gray(' - .cursorrules'));
56
+ }
57
+ if (hasClaudeMd) {
58
+ console.log(chalk_1.default.gray(' - CLAUDE.md'));
59
+ }
60
+ if (hasClaudeDir) {
61
+ console.log(chalk_1.default.gray(' - .claude/ (local modules)'));
62
+ }
63
+ console.log(chalk_1.default.yellow('\n Upgrade to v6.0:'));
64
+ console.log(chalk_1.default.gray(' Run `codebakers go` to upgrade'));
42
65
  }
43
66
  }
44
67
  else {
45
- console.log(chalk_1.default.yellow(' ○ Patterns not installed in this directory'));
46
- console.log(chalk_1.default.gray(' Run `codebakers install` to install'));
68
+ console.log(chalk_1.default.yellow(' ○ CodeBakers not installed in this directory'));
69
+ console.log(chalk_1.default.gray(' Run `codebakers go` to install'));
70
+ }
71
+ // Warn about legacy folder
72
+ if (hasClaudeDir && isV6) {
73
+ console.log(chalk_1.default.yellow('\n ⚠ Legacy .claude/ folder found'));
74
+ console.log(chalk_1.default.gray(' This can be removed - v6.0 uses server-side patterns'));
47
75
  }
48
76
  console.log('');
49
77
  }