tcsetup 1.0.0

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/bin/cli.js +74 -0
  2. package/package.json +25 -0
package/bin/cli.js ADDED
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execSync } from "node:child_process";
4
+ import { argv } from "node:process";
5
+
6
+ const flags = argv.slice(2);
7
+
8
+ const HELP = `
9
+ tcsetup — Bootstrap a project with the full TC toolchain.
10
+
11
+ Usage:
12
+ npx tcsetup Run all setup steps
13
+ npx tcsetup help Show this help message
14
+
15
+ Options:
16
+ --skip-bmad Skip BMAD Method install
17
+ --skip-speckit Skip Spec Kit init
18
+ --skip-agreements Skip Agreement System init
19
+ --skip-mermaid Skip Mermaid Workbench init
20
+ `;
21
+
22
+ if (flags.includes("help") || flags.includes("--help") || flags.includes("-h")) {
23
+ console.log(HELP);
24
+ process.exit(0);
25
+ }
26
+
27
+ const steps = [
28
+ {
29
+ name: "BMAD Method",
30
+ flag: "--skip-bmad",
31
+ cmd: "npx bmad-method install",
32
+ },
33
+ {
34
+ name: "Spec Kit",
35
+ flag: "--skip-speckit",
36
+ cmd: "specify init --here --ai claude",
37
+ },
38
+ {
39
+ name: "Agreement System",
40
+ flag: "--skip-agreements",
41
+ cmd: "npx agreement-system init --yes",
42
+ },
43
+ {
44
+ name: "Mermaid Workbench",
45
+ flag: "--skip-mermaid",
46
+ cmd: "npx mermaid-workbench init",
47
+ },
48
+ ];
49
+
50
+ console.log("\n tcsetup v1.0.0\n");
51
+
52
+ let current = 0;
53
+ const total = steps.filter((s) => !flags.includes(s.flag)).length;
54
+
55
+ for (const step of steps) {
56
+ if (flags.includes(step.flag)) {
57
+ console.log(` [skip] ${step.name} (${step.flag})\n`);
58
+ continue;
59
+ }
60
+
61
+ current++;
62
+ console.log(` [${current}/${total}] ${step.name}`);
63
+ console.log(` > ${step.cmd}\n`);
64
+
65
+ try {
66
+ execSync(step.cmd, { stdio: "inherit" });
67
+ console.log();
68
+ } catch (err) {
69
+ console.error(`\n ⚠ ${step.name} failed (exit code ${err.status}).`);
70
+ console.error(` Continuing with remaining steps...\n`);
71
+ }
72
+ }
73
+
74
+ console.log(" Done! Project setup complete.\n");
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "tcsetup",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "Bootstrap a new project with BMAD, Spec Kit, Agreement System, and Mermaid Workbench in one command.",
6
+ "bin": {
7
+ "tcsetup": "./bin/cli.js"
8
+ },
9
+ "keywords": [
10
+ "bmad",
11
+ "speckit",
12
+ "agreement-system",
13
+ "mermaid-workbench",
14
+ "scaffolding",
15
+ "bootstrap"
16
+ ],
17
+ "author": "Thibaud Canaud",
18
+ "license": "MIT",
19
+ "files": [
20
+ "bin/"
21
+ ],
22
+ "engines": {
23
+ "node": ">=18.0.0"
24
+ }
25
+ }