@baseline-studio/cli 2.2.0 → 2.2.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.
@@ -27,15 +27,16 @@ async function init() {
27
27
  console.log(`\n Baseline System — New Client Setup`);
28
28
  console.log(` ───────────────────────────────────\n`);
29
29
  // 1. Gather basic info
30
- const clientName = await ask(rl, " Client name: ");
31
- const folderName = await ask(rl, ` Folder name (${clientName.toLowerCase().replace(/\s+/g, "-")}-system): `);
32
- const folder = folderName.trim() ||
33
- `${clientName.toLowerCase().replace(/\s+/g, "-")}-system`;
34
- const coreRepo = await ask(rl, " Core repo (TrentM6/baseline-core): ");
35
- const repo = coreRepo.trim() || "TrentM6/baseline-core";
36
- const destDir = (0, path_1.join)(process.cwd(), folder);
37
- if ((0, fs_1.existsSync)(destDir)) {
38
- console.error(`\n Error: ${folder} already exists.\n`);
30
+ const clientName = await ask(rl, " What's your company or project name? ");
31
+ const repo = "TrentM6/baseline-core";
32
+ // Use current directory if empty, otherwise create a subfolder
33
+ const cwd = process.cwd();
34
+ const cwdEntries = (0, fs_1.readdirSync)(cwd).filter((f) => !f.startsWith("."));
35
+ const destDir = cwdEntries.length === 0
36
+ ? cwd
37
+ : (0, path_1.join)(cwd, `${clientName.toLowerCase().replace(/\s+/g, "-")}-system`);
38
+ if (destDir !== cwd && (0, fs_1.existsSync)(destDir)) {
39
+ console.error(`\n Error: ${destDir} already exists.\n`);
39
40
  rl.close();
40
41
  process.exit(1);
41
42
  }
@@ -88,6 +89,10 @@ async function init() {
88
89
  }
89
90
  console.log(` ── ${prompt.title} ──\n`);
90
91
  const answers = [];
92
+ // Pre-fill company name into identity file
93
+ if (ctxFile === "core/identity.md") {
94
+ answers.push(`**What is your company name?**\n${clientName}`);
95
+ }
91
96
  for (const q of prompt.questions) {
92
97
  const answer = await ask(rl, ` ${q}\n > `);
93
98
  if (answer.trim()) {
@@ -151,12 +156,18 @@ async function init() {
151
156
  // Clean up
152
157
  (0, fs_1.rmSync)(tmpDir, { recursive: true });
153
158
  rl.close();
159
+ const displayPath = destDir === cwd ? "." : `./${clientName.toLowerCase().replace(/\s+/g, "-")}-system`;
160
+ const skillCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "skills")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "skills")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
161
+ const frameworkCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "frameworks")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "frameworks")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
162
+ const scriptCount = (0, fs_1.existsSync)((0, path_1.join)(destDir, "scripts")) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, "scripts")).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0;
154
163
  console.log(` ───────────────────────────────────`);
155
- console.log(` ${clientName} system created at ./${folder}`);
164
+ console.log(` ${clientName} system created at ${displayPath}`);
156
165
  console.log(` Version: v${latest}`);
157
- console.log(` Skills: ${SYNC_DIRS.filter((d) => d !== "cli").map((d) => (0, fs_1.existsSync)((0, path_1.join)(destDir, d)) ? (0, fs_1.readdirSync)((0, path_1.join)(destDir, d)).filter((f) => !f.startsWith(".") && !f.startsWith("_")).length : 0).join(" | ")}`);
166
+ console.log(` ${skillCount} skills | ${frameworkCount} frameworks | ${scriptCount} scripts`);
158
167
  console.log(`\n Next steps:`);
159
- console.log(` cd ${folder}`);
168
+ if (destDir !== cwd) {
169
+ console.log(` cd ${clientName.toLowerCase().replace(/\s+/g, "-")}-system`);
170
+ }
160
171
  console.log(` Edit context/ files to add more detail`);
161
172
  console.log(` Run \`npx baseline status\` to check for updates\n`);
162
173
  }
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ const program = new commander_1.Command();
9
9
  program
10
10
  .name("baseline")
11
11
  .description("Distribute and update the Baseline System")
12
- .version("2.2.0");
12
+ .version("2.2.2");
13
13
  program
14
14
  .command("status")
15
15
  .description("Show current version and check for updates")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseline-studio/cli",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "CLI for distributing and updating the Baseline System — an AI-powered workflow system for product teams",
5
5
  "keywords": [
6
6
  "baseline",