@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.
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +40 -82
- package/dist/commands/init.js +56 -41
- package/dist/commands/install-hook.js +8 -8
- package/dist/commands/install.js +54 -55
- package/dist/commands/scaffold.js +39 -22
- package/dist/commands/status.js +41 -13
- package/dist/mcp/server.js +425 -147
- package/package.json +1 -1
- package/src/commands/doctor.ts +39 -81
- package/src/commands/init.ts +55 -43
- package/src/commands/install-hook.ts +8 -8
- package/src/commands/install.ts +59 -68
- package/src/commands/scaffold.ts +39 -22
- package/src/commands/status.ts +45 -15
- package/src/mcp/server.ts +428 -161
package/src/commands/status.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { existsSync } from 'fs';
|
|
2
|
+
import { existsSync, readFileSync } from 'fs';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { getApiKey } from '../config.js';
|
|
5
|
+
import { getCliVersion } from '../lib/api.js';
|
|
5
6
|
|
|
6
7
|
export async function status(): Promise<void> {
|
|
7
|
-
console.log(chalk.blue('\n CodeBakers Status\n'));
|
|
8
|
+
console.log(chalk.blue('\n CodeBakers Status (v6.0)\n'));
|
|
9
|
+
|
|
10
|
+
// Show version
|
|
11
|
+
const version = getCliVersion();
|
|
12
|
+
console.log(chalk.gray(` CLI Version: ${version}\n`));
|
|
8
13
|
|
|
9
14
|
// Check login status
|
|
10
15
|
const apiKey = getApiKey();
|
|
@@ -13,7 +18,7 @@ export async function status(): Promise<void> {
|
|
|
13
18
|
console.log(chalk.gray(` Key: ${apiKey.slice(0, 10)}...`));
|
|
14
19
|
} else {
|
|
15
20
|
console.log(chalk.red(' ✗ Not logged in'));
|
|
16
|
-
console.log(chalk.gray(' Run `codebakers
|
|
21
|
+
console.log(chalk.gray(' Run `codebakers setup` to authenticate'));
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
console.log('');
|
|
@@ -28,20 +33,45 @@ export async function status(): Promise<void> {
|
|
|
28
33
|
const hasClaudeMd = existsSync(claudemd);
|
|
29
34
|
const hasClaudeDir = existsSync(claudeDir);
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (
|
|
40
|
-
console.log(chalk.
|
|
36
|
+
// Check version of installed files
|
|
37
|
+
let isV6 = false;
|
|
38
|
+
if (hasClaudeMd) {
|
|
39
|
+
const content = readFileSync(claudemd, 'utf-8');
|
|
40
|
+
isV6 = content.includes('discover_patterns') || content.includes('v6.0');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (hasCursorRules || hasClaudeMd) {
|
|
44
|
+
if (isV6) {
|
|
45
|
+
console.log(chalk.green(' ✓ CodeBakers v6.0 installed'));
|
|
46
|
+
console.log(chalk.gray(' - CLAUDE.md (Claude Code gateway)'));
|
|
47
|
+
console.log(chalk.gray(' - .cursorrules (Cursor IDE gateway)'));
|
|
48
|
+
console.log(chalk.cyan('\n v6.0 Features:'));
|
|
49
|
+
console.log(chalk.gray(' - Server-side patterns (always up-to-date)'));
|
|
50
|
+
console.log(chalk.gray(' - AI calls discover_patterns before coding'));
|
|
51
|
+
console.log(chalk.gray(' - Usage tracking & compliance'));
|
|
52
|
+
} else {
|
|
53
|
+
console.log(chalk.yellow(' ⚠ CodeBakers v5 installed (legacy)'));
|
|
54
|
+
if (hasCursorRules) {
|
|
55
|
+
console.log(chalk.gray(' - .cursorrules'));
|
|
56
|
+
}
|
|
57
|
+
if (hasClaudeMd) {
|
|
58
|
+
console.log(chalk.gray(' - CLAUDE.md'));
|
|
59
|
+
}
|
|
60
|
+
if (hasClaudeDir) {
|
|
61
|
+
console.log(chalk.gray(' - .claude/ (local modules)'));
|
|
62
|
+
}
|
|
63
|
+
console.log(chalk.yellow('\n Upgrade to v6.0:'));
|
|
64
|
+
console.log(chalk.gray(' Run `codebakers go` to upgrade'));
|
|
41
65
|
}
|
|
42
66
|
} else {
|
|
43
|
-
console.log(chalk.yellow(' ○
|
|
44
|
-
console.log(chalk.gray(' Run `codebakers
|
|
67
|
+
console.log(chalk.yellow(' ○ CodeBakers not installed in this directory'));
|
|
68
|
+
console.log(chalk.gray(' Run `codebakers go` to install'));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Warn about legacy folder
|
|
72
|
+
if (hasClaudeDir && isV6) {
|
|
73
|
+
console.log(chalk.yellow('\n ⚠ Legacy .claude/ folder found'));
|
|
74
|
+
console.log(chalk.gray(' This can be removed - v6.0 uses server-side patterns'));
|
|
45
75
|
}
|
|
46
76
|
|
|
47
77
|
console.log('');
|