claudeguide-engineer 1.16.0 → 1.16.2
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/README.md +1 -0
- package/index.js +111 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ A comprehensive boilerplate template for building professional software projects
|
|
|
60
60
|
- **[Codebase Summary](./docs/codebase-summary.md)** - High-level overview of project structure, technologies, and components
|
|
61
61
|
- **[Code Standards](./docs/code-standards.md)** - Coding standards, naming conventions, and best practices
|
|
62
62
|
- **[System Architecture](./docs/system-architecture.md)** - Detailed architecture documentation, component interactions, and data flow
|
|
63
|
+
- **[Deployment Guide](./docs/deployment-guide.md)** - Guide for versioning, publishing, and installation
|
|
63
64
|
- **[Commands Reference](./guide/COMMANDS.md)** - Complete guide to all available slash commands
|
|
64
65
|
|
|
65
66
|
### 📖 Additional Resources
|
package/index.js
CHANGED
|
@@ -121,6 +121,108 @@ async function initializeKit(options) {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Uninstall: remove only kit-added files from current directory (keeps .claude and user files like .mcp.json)
|
|
126
|
+
*/
|
|
127
|
+
const KIT_METADATA_NAME = 'claudeGuide-engineer';
|
|
128
|
+
|
|
129
|
+
function isClaudeGuideKit(targetDir) {
|
|
130
|
+
const metaPath = path.join(targetDir, '.claude', 'metadata.json');
|
|
131
|
+
if (!fs.existsSync(metaPath)) return false;
|
|
132
|
+
try {
|
|
133
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
134
|
+
return meta && (meta.name === KIT_METADATA_NAME || (meta.name && meta.name.includes('claudeGuide')));
|
|
135
|
+
} catch {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
async function uninstallKit(options) {
|
|
141
|
+
const targetDir = process.cwd();
|
|
142
|
+
|
|
143
|
+
const isKit = isClaudeGuideKit(targetDir);
|
|
144
|
+
if (!isKit && !options.force) {
|
|
145
|
+
console.log(chalk.yellow('\n⚠ This directory does not look like a ClaudeGuide-initialized project (.claude/metadata.json missing or different).'));
|
|
146
|
+
console.log(chalk.gray(' To remove anyway, run: cg uninstall --yes\n'));
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (!options.yes && !options.dryRun) {
|
|
151
|
+
const { confirm } = await inquirer.prompt([
|
|
152
|
+
{
|
|
153
|
+
type: 'confirm',
|
|
154
|
+
name: 'confirm',
|
|
155
|
+
message: 'Remove Claude Guide kit files from this directory?',
|
|
156
|
+
default: false
|
|
157
|
+
}
|
|
158
|
+
]);
|
|
159
|
+
if (!confirm) {
|
|
160
|
+
console.log(chalk.gray('Cancelled.\n'));
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (options.dryRun) {
|
|
166
|
+
console.log(chalk.cyan.bold('\n🔍 Dry run – would remove:\n'));
|
|
167
|
+
} else {
|
|
168
|
+
console.log(chalk.cyan.bold('\n🧹 ClaudeGuide Uninstall (chỉ xóa phần do kit thêm)\n'));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const insideClaude = [
|
|
172
|
+
'commands',
|
|
173
|
+
'agents',
|
|
174
|
+
'skills',
|
|
175
|
+
'workflows',
|
|
176
|
+
'hooks',
|
|
177
|
+
'metadata.json',
|
|
178
|
+
'statusline.js',
|
|
179
|
+
'statusline.ps1',
|
|
180
|
+
'statusline.sh',
|
|
181
|
+
'settings.json'
|
|
182
|
+
];
|
|
183
|
+
|
|
184
|
+
const outside = ['.opencode', 'plans', 'guide'];
|
|
185
|
+
const rootFiles = ['CLAUDE.md', 'AGENTS.md'];
|
|
186
|
+
|
|
187
|
+
let removed = 0;
|
|
188
|
+
|
|
189
|
+
function removePath(relativePath, dryRun) {
|
|
190
|
+
const fullPath = path.join(targetDir, relativePath);
|
|
191
|
+
if (fs.existsSync(fullPath)) {
|
|
192
|
+
if (dryRun) {
|
|
193
|
+
console.log(chalk.gray(' Would remove: ') + chalk.white(relativePath));
|
|
194
|
+
removed++;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const stat = fs.lstatSync(fullPath);
|
|
199
|
+
if (stat.isDirectory()) {
|
|
200
|
+
fs.rmSync(fullPath, { recursive: true, force: true });
|
|
201
|
+
} else {
|
|
202
|
+
fs.unlinkSync(fullPath);
|
|
203
|
+
}
|
|
204
|
+
console.log(chalk.gray(' Removed: ') + chalk.white(relativePath));
|
|
205
|
+
removed++;
|
|
206
|
+
} catch (err) {
|
|
207
|
+
console.error(chalk.red(' Failed: ' + relativePath + ' - ' + err.message));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const dryRun = !!options.dryRun;
|
|
213
|
+
insideClaude.forEach(p => removePath(path.join('.claude', p), dryRun));
|
|
214
|
+
outside.forEach(p => removePath(p, dryRun));
|
|
215
|
+
rootFiles.forEach(p => removePath(p, dryRun));
|
|
216
|
+
|
|
217
|
+
if (removed === 0) {
|
|
218
|
+
console.log(chalk.yellow(' Nothing to remove (no kit files found here).'));
|
|
219
|
+
} else if (dryRun) {
|
|
220
|
+
console.log(chalk.blue('\nTotal: ' + removed + ' item(s). Run without --dry-run to remove.\n'));
|
|
221
|
+
} else {
|
|
222
|
+
console.log(chalk.green('\n✅ Done. Removed ' + removed + ' item(s). .claude and your own files (e.g. .mcp.json) are kept.\n'));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
124
226
|
/**
|
|
125
227
|
* CLI Configuration
|
|
126
228
|
*/
|
|
@@ -140,6 +242,15 @@ program
|
|
|
140
242
|
.description('Update the framework files from the private repository')
|
|
141
243
|
.action(initializeKit);
|
|
142
244
|
|
|
245
|
+
program
|
|
246
|
+
.command('uninstall')
|
|
247
|
+
.alias('remove')
|
|
248
|
+
.description('Remove only kit-added files from current directory (keeps .claude and your .mcp.json, etc.)')
|
|
249
|
+
.option('--yes', 'Skip confirmation prompt')
|
|
250
|
+
.option('--dry-run', 'Show what would be removed without deleting')
|
|
251
|
+
.option('--force', 'Run even if directory does not look like a ClaudeGuide project')
|
|
252
|
+
.action(uninstallKit);
|
|
253
|
+
|
|
143
254
|
program.parse(process.argv);
|
|
144
255
|
|
|
145
256
|
/**
|
package/package.json
CHANGED