@baseline-studio/cli 2.2.1 → 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.
@@ -28,11 +28,15 @@ async function init() {
28
28
  console.log(` ───────────────────────────────────\n`);
29
29
  // 1. Gather basic info
30
30
  const clientName = await ask(rl, " What's your company or project name? ");
31
- const folder = `${clientName.toLowerCase().replace(/\s+/g, "-")}-system`;
32
31
  const repo = "TrentM6/baseline-core";
33
- const destDir = (0, path_1.join)(process.cwd(), folder);
34
- if ((0, fs_1.existsSync)(destDir)) {
35
- console.error(`\n Error: ${folder} already exists.\n`);
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`);
36
40
  rl.close();
37
41
  process.exit(1);
38
42
  }
@@ -85,6 +89,10 @@ async function init() {
85
89
  }
86
90
  console.log(` ── ${prompt.title} ──\n`);
87
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
+ }
88
96
  for (const q of prompt.questions) {
89
97
  const answer = await ask(rl, ` ${q}\n > `);
90
98
  if (answer.trim()) {
@@ -148,12 +156,18 @@ async function init() {
148
156
  // Clean up
149
157
  (0, fs_1.rmSync)(tmpDir, { recursive: true });
150
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;
151
163
  console.log(` ───────────────────────────────────`);
152
- console.log(` ${clientName} system created at ./${folder}`);
164
+ console.log(` ${clientName} system created at ${displayPath}`);
153
165
  console.log(` Version: v${latest}`);
154
- 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`);
155
167
  console.log(`\n Next steps:`);
156
- console.log(` cd ${folder}`);
168
+ if (destDir !== cwd) {
169
+ console.log(` cd ${clientName.toLowerCase().replace(/\s+/g, "-")}-system`);
170
+ }
157
171
  console.log(` Edit context/ files to add more detail`);
158
172
  console.log(` Run \`npx baseline status\` to check for updates\n`);
159
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.1");
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.1",
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",