@b0tts/template-dev-installer 1.0.2 → 1.0.4

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/bin/cli.mjs CHANGED
@@ -5,13 +5,13 @@
5
5
  // the current working directory.
6
6
  //
7
7
  // Categories:
8
- // 1. Skills — AGENTS.md, README.md, .agents/
9
- // 2. OpenCode — .opencode/plugins/, opencode.json, settings.json
10
- // 3. Pi — .pi/agent/settings.json, extensions/, mcp.json
11
- // 4. All — everything above
8
+ // 1. Skills — AGENTS.md, README.md, .agents/, b0ttsagent/ (additive)
9
+ // 2. OpenCode — .opencode/plugins/, opencode.json, settings.json
10
+ // 3. Pi — .pi/agent/settings.json, extensions/, mcp.json
11
+ // 4. All — everything above
12
12
  // ────────────────────────────────────────────────────────────────────
13
13
 
14
- import { select, confirm } from "@inquirer/prompts";
14
+ import { checkbox, confirm } from "@inquirer/prompts";
15
15
  import { cpSync, existsSync } from "node:fs";
16
16
  import { resolve, dirname } from "node:path";
17
17
  import { fileURLToPath } from "node:url";
@@ -26,11 +26,15 @@ const CWD = process.cwd();
26
26
 
27
27
  const CATEGORIES = {
28
28
  skills: {
29
- label: "Skills (AGENTS.md, README.md, .agents/)",
29
+ label: "Skills (AGENTS.md, README.md, .agents/, b0ttsagent/)",
30
30
  items: [
31
31
  { src: "AGENTS.md", dest: "AGENTS.md" },
32
32
  { src: "README.md", dest: "README.md" },
33
33
  { src: ".agents", dest: ".agents" },
34
+ { src: "b0ttsagent/temp", dest: "b0ttsagent/temp", additive: true },
35
+ { src: "b0ttsagent/sessionlogs", dest: "b0ttsagent/sessionlogs", additive: true },
36
+ { src: "b0ttsagent/handoffs", dest: "b0ttsagent/handoffs", additive: true },
37
+ { src: "b0ttsagent/NavGuides", dest: "b0ttsagent/NavGuides", additive: true },
34
38
  ],
35
39
  },
36
40
  opencode: {
@@ -66,8 +70,14 @@ function copyItem(item) {
66
70
  console.log(` ✘ Source not found: ${item.src} (skipping)`);
67
71
  return;
68
72
  }
69
- warnIfExists(dest);
70
- cpSync(src, dest, { recursive: true, force: true });
73
+ if (item.additive && existsSync(dest)) {
74
+ console.log(` → ${item.dest} already exists skipping.`);
75
+ return;
76
+ }
77
+ if (!item.additive) {
78
+ warnIfExists(dest);
79
+ }
80
+ cpSync(src, dest, { recursive: true, force: !item.additive });
71
81
  console.log(` ✓ ${item.dest}`);
72
82
  }
73
83
 
@@ -86,38 +96,38 @@ async function main() {
86
96
  console.log(" Development Template Installer");
87
97
  console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n");
88
98
 
89
- const choice = await select({
90
- message: "Which template category do you want to install?",
99
+ const chosen = await checkbox({
100
+ message: "Select categories to install (Space to toggle, Enter to confirm):",
91
101
  choices: [
92
- { name: "Skills", value: "skills" },
93
- { name: "OpenCode", value: "opencode" },
94
- { name: "Pi", value: "pi" },
95
- { name: "All", value: "all" },
102
+ { name: "All", value: "all" },
103
+ { name: "Skills", value: "skills" },
104
+ { name: "OpenCode", value: "opencode" },
105
+ { name: "Pi", value: "pi" },
96
106
  ],
97
107
  });
98
108
 
99
- if (choice === "all") {
100
- const ok = await confirm({
101
- message: `Install everything into ${CWD}? Existing files will be overwritten.`,
102
- default: true,
103
- });
104
- if (!ok) {
105
- console.log("Aborted.");
106
- process.exit(0);
107
- }
108
- for (const name of Object.keys(CATEGORIES)) {
109
- installCategory(name);
110
- }
111
- } else {
112
- const ok = await confirm({
113
- message: `Install "${CATEGORIES[choice].label}" into ${CWD}?`,
114
- default: true,
115
- });
116
- if (!ok) {
117
- console.log("Aborted.");
118
- process.exit(0);
119
- }
120
- installCategory(choice);
109
+ if (chosen.length === 0) {
110
+ console.log("Nothing selected. Aborted.");
111
+ process.exit(0);
112
+ }
113
+
114
+ // Determine what to install
115
+ const toInstall = chosen.includes("all")
116
+ ? Object.keys(CATEGORIES)
117
+ : chosen;
118
+
119
+ const labels = toInstall.map((n) => CATEGORIES[n].label.split(" (")[0]).join(", ");
120
+ const ok = await confirm({
121
+ message: `Install ${labels} into ${CWD}?`,
122
+ default: true,
123
+ });
124
+ if (!ok) {
125
+ console.log("Aborted.");
126
+ process.exit(0);
127
+ }
128
+
129
+ for (const name of toInstall) {
130
+ installCategory(name);
121
131
  }
122
132
 
123
133
  console.log("\n✔ Done.\n");
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b0tts/template-dev-installer",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "description": "Interactive installer for the DevelopmentTemplate — pick Skills, OpenCode, Pi, or install everything at once.",
6
6
  "bin": {
@@ -11,7 +11,8 @@
11
11
  "files/"
12
12
  ],
13
13
  "dependencies": {
14
- "@inquirer/prompts": "^5.0.0"
14
+ "@inquirer/prompts": "^5.0.0",
15
+ "adm-zip": "^0.5.17"
15
16
  },
16
17
  "keywords": [
17
18
  "template",