clikit-plugin 0.2.27 → 0.2.28

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.
Files changed (2) hide show
  1. package/dist/cli.js +27 -15
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -196,7 +196,7 @@ function writeConfig(configPath, config) {
196
196
  fs.writeFileSync(tmpPath, content);
197
197
  fs.renameSync(tmpPath, configPath);
198
198
  }
199
- async function install() {
199
+ async function install(options) {
200
200
  console.log(`
201
201
  CliKit Installer
202
202
  ================
@@ -232,22 +232,27 @@ async function install() {
232
232
  console.error(`\u2717 Failed to update OpenCode config: ${err}`);
233
233
  return 1;
234
234
  }
235
- console.log(`
235
+ if (options.includeProjectScaffold) {
236
+ console.log(`
236
237
  [2/5] Scaffolding project .opencode assets...`);
237
- try {
238
- const projectDir = resolveProjectDir();
239
- const stats = scaffoldProjectOpencode(projectDir);
240
- console.log(`\u2713 Project assets ready in ${path.join(projectDir, ".opencode")}`);
241
- console.log(` Copied: ${stats.copied}, Skipped existing: ${stats.skipped}`);
242
- if (stats.missingSources.length > 0) {
243
- console.log(" Missing bundled sources (skipped):");
244
- for (const missing of stats.missingSources) {
245
- console.log(` - ${missing}`);
238
+ try {
239
+ const projectDir = resolveProjectDir();
240
+ const stats = scaffoldProjectOpencode(projectDir);
241
+ console.log(`\u2713 Project assets ready in ${path.join(projectDir, ".opencode")}`);
242
+ console.log(` Copied: ${stats.copied}, Skipped existing: ${stats.skipped}`);
243
+ if (stats.missingSources.length > 0) {
244
+ console.log(" Missing bundled sources (skipped):");
245
+ for (const missing of stats.missingSources) {
246
+ console.log(` - ${missing}`);
247
+ }
246
248
  }
249
+ } catch (err) {
250
+ console.error(`\u2717 Failed to scaffold project assets: ${err}`);
251
+ return 1;
247
252
  }
248
- } catch (err) {
249
- console.error(`\u2717 Failed to scaffold project assets: ${err}`);
250
- return 1;
253
+ } else {
254
+ console.log(`
255
+ [2/5] Skipping project scaffold (global-only install)`);
251
256
  }
252
257
  console.log(`
253
258
  [3/5] Cleaning legacy local plugin assets...`);
@@ -313,8 +318,12 @@ Commands:
313
318
  help Show this help message
314
319
  version Show version
315
320
 
321
+ Install options:
322
+ --project Also scaffold project .opencode files (default: disabled)
323
+
316
324
  Examples:
317
325
  bun x clikit-plugin install
326
+ bun x clikit-plugin install --project
318
327
  `);
319
328
  }
320
329
  function version() {
@@ -323,11 +332,14 @@ function version() {
323
332
  async function main() {
324
333
  const args = process.argv.slice(2);
325
334
  const command = args[0] || "help";
335
+ const flags = args.slice(1);
326
336
  let exitCode = 0;
327
337
  switch (command) {
328
338
  case "install":
329
339
  case "i":
330
- exitCode = await install();
340
+ exitCode = await install({
341
+ includeProjectScaffold: flags.includes("--project")
342
+ });
331
343
  break;
332
344
  case "help":
333
345
  case "-h":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clikit-plugin",
3
- "version": "0.2.27",
3
+ "version": "0.2.28",
4
4
  "description": "OpenCode plugin with 10 agents, 19 commands, 48 skills, 14 hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",