claudeguide-engineer 1.14.9 ā 1.14.10
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/index.js +60 -64
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const args = process.argv.slice(2);
|
|
|
7
7
|
const command = args[0];
|
|
8
8
|
|
|
9
9
|
if (!command || command === '--help' || command === '-h') {
|
|
10
|
-
|
|
10
|
+
console.log(`
|
|
11
11
|
Usage: cg <command>
|
|
12
12
|
|
|
13
13
|
Commands:
|
|
@@ -16,86 +16,82 @@ Commands:
|
|
|
16
16
|
version, -v Show version
|
|
17
17
|
help, -h Show this help
|
|
18
18
|
`);
|
|
19
|
-
|
|
19
|
+
process.exit(0);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
if (command === 'version' || command === '-v') {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const pkg = require('./package.json');
|
|
24
|
+
console.log(`claudeguide-engineer v${pkg.version}`);
|
|
25
|
+
process.exit(0);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (command === 'init' || command === 'new' || command === 'update') {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const sourceDir = __dirname;
|
|
32
|
-
const targetDir = process.cwd();
|
|
33
|
-
|
|
34
|
-
// List of files and directories to copy
|
|
35
|
-
const filesToCopy = [
|
|
36
|
-
'.claude',
|
|
37
|
-
'.opencode',
|
|
38
|
-
'.releaserc.json',
|
|
39
|
-
'.commitlintrc.json',
|
|
40
|
-
'.repomixignore',
|
|
41
|
-
'CLAUDE.md',
|
|
42
|
-
'GEMINI.md',
|
|
43
|
-
'README.md',
|
|
44
|
-
'docs',
|
|
45
|
-
'plans',
|
|
46
|
-
'guide',
|
|
47
|
-
'scripts',
|
|
48
|
-
'tests'
|
|
49
|
-
];
|
|
29
|
+
console.log('š Initializing ClaudeGuide Engineer Kit...');
|
|
50
30
|
|
|
51
|
-
|
|
52
|
-
|
|
31
|
+
const sourceDir = __dirname;
|
|
32
|
+
const targetDir = process.cwd();
|
|
53
33
|
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
34
|
+
// List of files and directories to copy
|
|
35
|
+
const filesToCopy = [
|
|
36
|
+
".claude/",
|
|
37
|
+
".opencode/",
|
|
38
|
+
"plans/",
|
|
39
|
+
"AGENTS.md",
|
|
40
|
+
"CLAUDE.md",
|
|
41
|
+
"README.md",
|
|
42
|
+
"CHANGELOG.md",
|
|
43
|
+
"LICENSE",
|
|
44
|
+
".claude/metadata.json"
|
|
45
|
+
];
|
|
57
46
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
let successCount = 0;
|
|
48
|
+
let failCount = 0;
|
|
49
|
+
|
|
50
|
+
filesToCopy.forEach(file => {
|
|
51
|
+
const src = path.join(sourceDir, file);
|
|
52
|
+
const dest = path.join(targetDir, file);
|
|
53
|
+
|
|
54
|
+
if (fs.existsSync(src)) {
|
|
55
|
+
try {
|
|
56
|
+
if (fs.lstatSync(src).isDirectory()) {
|
|
57
|
+
copyRecursiveSync(src, dest);
|
|
58
|
+
} else {
|
|
59
|
+
fs.copyFileSync(src, dest);
|
|
60
|
+
}
|
|
61
|
+
console.log(` ā
Copied: ${file}`);
|
|
62
|
+
successCount++;
|
|
63
|
+
} catch (err) {
|
|
64
|
+
console.error(` ā Failed to copy ${file}: ${err.message}`);
|
|
65
|
+
failCount++;
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
successCount++;
|
|
67
|
-
} catch (err) {
|
|
68
|
-
console.error(` ā Failed to copy ${file}: ${err.message}`);
|
|
69
|
-
failCount++;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
68
|
+
});
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
console.log(`\n⨠Done! (Success: ${successCount}, Failed: ${failCount})`);
|
|
71
|
+
console.log('\nNext steps:');
|
|
72
|
+
console.log('1. Run "npm install" (if adding to an existing project)');
|
|
73
|
+
console.log('2. Type "claude" to start building with AI agents');
|
|
78
74
|
} else {
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
console.log(`Unknown command: ${command}`);
|
|
76
|
+
console.log('Type "cg --help" for available commands.');
|
|
81
77
|
}
|
|
82
78
|
|
|
83
79
|
/**
|
|
84
80
|
* Recursive copy function
|
|
85
81
|
*/
|
|
86
82
|
function copyRecursiveSync(src, dest) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
const exists = fs.existsSync(src);
|
|
84
|
+
const stats = exists && fs.statSync(src);
|
|
85
|
+
const isDirectory = exists && stats.isDirectory();
|
|
86
|
+
if (isDirectory) {
|
|
87
|
+
if (!fs.existsSync(dest)) {
|
|
88
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
89
|
+
}
|
|
90
|
+
fs.readdirSync(src).forEach(function (childItemName) {
|
|
91
|
+
if (childItemName === '.git' || childItemName === 'node_modules') return;
|
|
92
|
+
copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
fs.copyFileSync(src, dest);
|
|
93
96
|
}
|
|
94
|
-
fs.readdirSync(src).forEach(function(childItemName) {
|
|
95
|
-
if (childItemName === '.git' || childItemName === 'node_modules') return;
|
|
96
|
-
copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
|
|
97
|
-
});
|
|
98
|
-
} else {
|
|
99
|
-
fs.copyFileSync(src, dest);
|
|
100
|
-
}
|
|
101
97
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudeguide-engineer",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.10",
|
|
4
4
|
"description": "A comprehensive boilerplate template for building professional software projects with CLI Coding Agents (Claude Code and Open Code).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|