sdtk-kit 1.2.0 → 1.3.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.
- package/LICENSE +21 -21
- package/README.md +190 -135
- package/bin/sdtk-code.js +6 -6
- package/bin/sdtk-design.js +6 -6
- package/bin/sdtk-ops.js +6 -6
- package/bin/sdtk-spec.js +12 -12
- package/bin/sdtk-wiki.js +6 -6
- package/bin/sdtk.js +90 -0
- package/package.json +65 -60
- package/scripts/install-smoke.js +190 -0
- package/scripts/postinstall.js +43 -40
- package/scripts/unified-init.test.js +242 -0
- package/src/commands/init.js +95 -0
- package/src/lib/unified-init.js +274 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 SDTK
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SDTK
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,135 +1,190 @@
|
|
|
1
|
-
# sdtk-kit
|
|
2
|
-
|
|
3
|
-
> Install all five SDTK toolkits in one command.
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install -g sdtk-kit
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
After install, all five SDTK CLI tools are available globally:
|
|
10
|
-
|
|
11
|
-
| CLI | Toolkit | Purpose |
|
|
12
|
-
|---------------|----------------|--------------------------------------------------|
|
|
13
|
-
| `sdtk
|
|
14
|
-
| `sdtk-
|
|
15
|
-
| `sdtk-
|
|
16
|
-
| `sdtk-
|
|
17
|
-
| `sdtk-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
npm
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
**
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
1
|
+
# sdtk-kit
|
|
2
|
+
|
|
3
|
+
> Install all five SDTK toolkits in one command.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g sdtk-kit
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
After install, all five SDTK CLI tools — plus the unified `sdtk` orchestrator — are available globally:
|
|
10
|
+
|
|
11
|
+
| CLI | Toolkit | Purpose |
|
|
12
|
+
|---------------|----------------|--------------------------------------------------|
|
|
13
|
+
| `sdtk` | (all five) | One-command setup: `sdtk init --runtime <r>` |
|
|
14
|
+
| `sdtk-spec` | SDTK-SPEC | Spec-first SDLC: PM → BA → ARCH → DEV → QA |
|
|
15
|
+
| `sdtk-design` | SDTK-DESIGN | MVP design: idea → prototype → handoff |
|
|
16
|
+
| `sdtk-code` | SDTK-CODE | Governed coding: handoff → PR with review gates |
|
|
17
|
+
| `sdtk-ops` | SDTK-OPS | Operations: deploy → smoke → sign-off |
|
|
18
|
+
| `sdtk-wiki` | SDTK-WIKI | Local second brain: your project memory |
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Set up the chosen runtime for the whole suite in one command
|
|
24
|
+
sdtk init --runtime claude # or --runtime codex
|
|
25
|
+
|
|
26
|
+
# Generate a 17-file spec scaffold for your first feature
|
|
27
|
+
sdtk-spec generate --feature-key MY_FEATURE
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Unified init: `sdtk init`
|
|
31
|
+
|
|
32
|
+
`sdtk init --runtime <claude|codex>` initialises **all five toolkits** in one step
|
|
33
|
+
— mirroring how `npm install -g sdtk-kit` installs every toolkit at once. It runs
|
|
34
|
+
each toolkit's own, already-shipped `init` in order:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
sdtk-spec → sdtk-ops → sdtk-code (with --runtime <r>)
|
|
38
|
+
sdtk-design → sdtk-wiki (their own non-runtime init)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
sdtk init --runtime claude
|
|
43
|
+
sdtk init --runtime codex --project-path ./my-app
|
|
44
|
+
sdtk init --runtime claude --keep-going # continue past a failing toolkit
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Options: `--runtime <claude|codex>` (required), `--runtime-scope <scope>`,
|
|
48
|
+
`--project-path <path>`, `--force`, `--skip-runtime-assets`, `--keep-going`
|
|
49
|
+
(default is fail-fast — stop at the first failing toolkit), `--verbose`.
|
|
50
|
+
`--runtime`, `--runtime-scope`, and `--skip-runtime-assets` apply to the runtime
|
|
51
|
+
toolkits (spec/ops/code); `sdtk-design` and `sdtk-wiki` receive only
|
|
52
|
+
`--project-path`, `--force`, and `--verbose`.
|
|
53
|
+
|
|
54
|
+
`sdtk init` is a thin orchestrator: it re-implements no init logic, writes no files
|
|
55
|
+
itself, and runs no PowerShell of its own — every side effect happens inside the
|
|
56
|
+
delegated per-toolkit init. The per-toolkit CLIs remain fully available standalone.
|
|
57
|
+
|
|
58
|
+
## Unified vs standalone install
|
|
59
|
+
|
|
60
|
+
You have two install options:
|
|
61
|
+
|
|
62
|
+
**Option 1 — Install everything at once (recommended for new projects)**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install -g sdtk-kit
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
npm installs all five sub-toolkits as dependencies. All CLI binaries land on PATH in one step.
|
|
69
|
+
|
|
70
|
+
**Option 2 — Install individual toolkits**
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install -g sdtk-spec-kit # spec / planning
|
|
74
|
+
npm install -g sdtk-design-kit # design
|
|
75
|
+
npm install -g sdtk-code-kit # coding
|
|
76
|
+
npm install -g sdtk-ops-kit # operations
|
|
77
|
+
npm install -g sdtk-wiki-kit # local second brain
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Use Option 2 if you only need one or two toolkits, or if you want granular version control per toolkit.
|
|
81
|
+
|
|
82
|
+
Both options are permanently supported. `sdtk-kit` does not replace the standalone packages.
|
|
83
|
+
|
|
84
|
+
## How the unified CLI works (maintainer note)
|
|
85
|
+
|
|
86
|
+
`sdtk-kit` declares the five sub-toolkits as dependencies AND ships thin bin
|
|
87
|
+
shims (`bin/sdtk-*.js`) that re-export each sub-package's CLI. This is required
|
|
88
|
+
because `npm install -g <pkg>` only links the bin entries of the top-level
|
|
89
|
+
package, never of its dependencies. A pure deps-only meta-package would install
|
|
90
|
+
the sub-toolkits but leave zero CLIs on PATH.
|
|
91
|
+
|
|
92
|
+
The umbrella also ships its own `sdtk` orchestrator bin (`bin/sdtk.js` + `src/`),
|
|
93
|
+
which delegates `sdtk init` to each sub-toolkit's published bin via subprocess
|
|
94
|
+
(`require.resolve` of the kit's `package.json` `bin` map, spawned with the current
|
|
95
|
+
Node). It adds no new dependency and re-implements no init logic.
|
|
96
|
+
|
|
97
|
+
Do not remove the `bin` field, the `bin/` shims, or `bin/sdtk.js` + `src/` — they
|
|
98
|
+
are the mechanism that puts `sdtk`, `sdtk-spec`, `sdtk-code`, `sdtk-ops`,
|
|
99
|
+
`sdtk-design`, and `sdtk-wiki` on PATH after a global install.
|
|
100
|
+
|
|
101
|
+
## Version pinning model
|
|
102
|
+
|
|
103
|
+
`sdtk-kit` uses caret-range dependencies (`^X.Y.Z`) on each sub-toolkit. This means:
|
|
104
|
+
|
|
105
|
+
- **Patch and minor updates** of sub-toolkits are picked up automatically when you run `npm update -g sdtk-kit`.
|
|
106
|
+
- **Major version bumps** in any sub-toolkit require a coordinated `sdtk-kit` major-bump and re-publish.
|
|
107
|
+
- If you need exact version control per toolkit, use standalone packages instead.
|
|
108
|
+
|
|
109
|
+
Current dependency ranges (as of sdtk-kit v1.3.0):
|
|
110
|
+
|
|
111
|
+
| Package | Version |
|
|
112
|
+
|------------------|---------|
|
|
113
|
+
| sdtk-spec-kit | ^0.4.7 |
|
|
114
|
+
| sdtk-code-kit | ^0.3.0 |
|
|
115
|
+
| sdtk-ops-kit | ^0.2.4 |
|
|
116
|
+
| sdtk-design-kit | ^0.3.0 |
|
|
117
|
+
| sdtk-wiki-kit | ^0.2.0 |
|
|
118
|
+
|
|
119
|
+
## Updating
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npm update -g sdtk-kit
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This updates all sub-toolkits within their caret ranges.
|
|
126
|
+
|
|
127
|
+
## Uninstalling
|
|
128
|
+
|
|
129
|
+
To remove sdtk-kit and its sub-toolkits:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm uninstall -g sdtk-kit
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Note: `npm uninstall` removes the package and its transitive dependencies. If you had any sub-toolkits installed standalone _before_ installing sdtk-kit, npm may or may not remove them depending on your npm version. Run `npm uninstall -g sdtk-spec-kit sdtk-code-kit sdtk-ops-kit sdtk-design-kit sdtk-wiki-kit` to be sure.
|
|
136
|
+
|
|
137
|
+
## Troubleshooting
|
|
138
|
+
|
|
139
|
+
**Command not found after install**
|
|
140
|
+
|
|
141
|
+
Re-open your terminal. npm global installs require a new shell session on some systems.
|
|
142
|
+
|
|
143
|
+
Check your global prefix:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm config get prefix
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Ensure `<prefix>/bin` is in `PATH`.
|
|
150
|
+
|
|
151
|
+
**Only three CLIs are visible after installing sdtk-kit**
|
|
152
|
+
|
|
153
|
+
If `sdtk-spec`, `sdtk-code`, and `sdtk-ops` are visible but `sdtk-design` or `sdtk-wiki` are missing, the usual cause is a stale global install, an old npm prefix on `PATH`, or a shell command cache rather than the current `sdtk-kit` package.
|
|
154
|
+
|
|
155
|
+
Reset and verify from a fresh shell:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npm uninstall -g sdtk-kit sdtk-spec-kit sdtk-code-kit sdtk-ops-kit sdtk-design-kit sdtk-wiki-kit
|
|
159
|
+
npm cache verify
|
|
160
|
+
npm install -g sdtk-kit@latest
|
|
161
|
+
hash -r
|
|
162
|
+
command -v sdtk-spec sdtk-code sdtk-ops sdtk-design sdtk-wiki
|
|
163
|
+
sdtk-spec --version
|
|
164
|
+
sdtk-code --version
|
|
165
|
+
sdtk-ops --version
|
|
166
|
+
sdtk-design --version
|
|
167
|
+
sdtk-wiki --version
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
On Windows PowerShell, close and reopen the terminal after reinstalling, then use `where.exe sdtk-spec`, `where.exe sdtk-design`, and the same `--version` commands.
|
|
171
|
+
|
|
172
|
+
**Windows PATH issues**
|
|
173
|
+
|
|
174
|
+
On Windows, npm global binaries land in `%APPDATA%\npm`. Make sure this is in your `PATH`. Run `npm config get prefix` to confirm the location.
|
|
175
|
+
|
|
176
|
+
**Binary collision**
|
|
177
|
+
|
|
178
|
+
If you have standalone sub-toolkits installed at different versions than what `sdtk-kit` pins, `npm install -g sdtk-kit` will upgrade them to the pinned versions. To keep a standalone version pinned, install it standalone after sdtk-kit:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npm install -g sdtk-kit
|
|
182
|
+
npm install -g sdtk-spec-kit@0.4.6 # pin to an older version
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Links
|
|
186
|
+
|
|
187
|
+
- Docs: [https://sdtk.dev](https://sdtk.dev)
|
|
188
|
+
- Source: [https://github.com/codexsdtk/sdtk-toolkit](https://github.com/codexsdtk/sdtk-toolkit)
|
|
189
|
+
- Issues: [https://github.com/codexsdtk/sdtk-toolkit/issues](https://github.com/codexsdtk/sdtk-toolkit/issues)
|
|
190
|
+
- License: MIT
|
package/bin/sdtk-code.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// Bin shim — re-exports the sdtk-code CLI from the sdtk-code-kit dependency.
|
|
5
|
-
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
-
require("sdtk-code-kit/bin/sdtk-code.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Bin shim — re-exports the sdtk-code CLI from the sdtk-code-kit dependency.
|
|
5
|
+
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
+
require("sdtk-code-kit/bin/sdtk-code.js");
|
package/bin/sdtk-design.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// Bin shim — re-exports the sdtk-design CLI from the sdtk-design-kit dependency.
|
|
5
|
-
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
-
require("sdtk-design-kit/bin/sdtk-design.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Bin shim — re-exports the sdtk-design CLI from the sdtk-design-kit dependency.
|
|
5
|
+
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
+
require("sdtk-design-kit/bin/sdtk-design.js");
|
package/bin/sdtk-ops.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// Bin shim — re-exports the sdtk-ops CLI from the sdtk-ops-kit dependency.
|
|
5
|
-
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
-
require("sdtk-ops-kit/bin/sdtk-ops.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Bin shim — re-exports the sdtk-ops CLI from the sdtk-ops-kit dependency.
|
|
5
|
+
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
+
require("sdtk-ops-kit/bin/sdtk-ops.js");
|
package/bin/sdtk-spec.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// Bin shim — re-exports the sdtk-spec CLI from the sdtk-spec-kit dependency.
|
|
5
|
-
//
|
|
6
|
-
// Why this exists: `npm install -g <pkg>` only links the bin entries of the
|
|
7
|
-
// top-level package, NOT of its dependencies. A pure meta-package (deps only,
|
|
8
|
-
// no bin) therefore installs the sub-packages but leaves no CLI on PATH.
|
|
9
|
-
//
|
|
10
|
-
// Each sub-toolkit CLI reads process.argv directly, so requiring its bin
|
|
11
|
-
// entry here runs it with the real arguments unchanged.
|
|
12
|
-
require("sdtk-spec-kit/bin/sdtk.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Bin shim — re-exports the sdtk-spec CLI from the sdtk-spec-kit dependency.
|
|
5
|
+
//
|
|
6
|
+
// Why this exists: `npm install -g <pkg>` only links the bin entries of the
|
|
7
|
+
// top-level package, NOT of its dependencies. A pure meta-package (deps only,
|
|
8
|
+
// no bin) therefore installs the sub-packages but leaves no CLI on PATH.
|
|
9
|
+
//
|
|
10
|
+
// Each sub-toolkit CLI reads process.argv directly, so requiring its bin
|
|
11
|
+
// entry here runs it with the real arguments unchanged.
|
|
12
|
+
require("sdtk-spec-kit/bin/sdtk.js");
|
package/bin/sdtk-wiki.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
// Bin shim — re-exports the sdtk-wiki CLI from the sdtk-wiki-kit dependency.
|
|
5
|
-
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
-
require("sdtk-wiki-kit/bin/sdtk-wiki.js");
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Bin shim — re-exports the sdtk-wiki CLI from the sdtk-wiki-kit dependency.
|
|
5
|
+
// See bin/sdtk-spec.js for the rationale behind these shims.
|
|
6
|
+
require("sdtk-wiki-kit/bin/sdtk-wiki.js");
|
package/bin/sdtk.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// `sdtk` — unified entry point for the SDTK suite (BK-268).
|
|
5
|
+
//
|
|
6
|
+
// sdtk init --runtime <claude|codex> one-command setup for all five toolkits
|
|
7
|
+
// sdtk --help top-level help
|
|
8
|
+
// sdtk --version sdtk-kit version + resolved per-kit versions
|
|
9
|
+
// sdtk no args → help
|
|
10
|
+
//
|
|
11
|
+
// `init` delegates to each toolkit's own shipped init (see src/lib/unified-init.js).
|
|
12
|
+
|
|
13
|
+
const SUB_KITS = [
|
|
14
|
+
"sdtk-spec-kit",
|
|
15
|
+
"sdtk-ops-kit",
|
|
16
|
+
"sdtk-code-kit",
|
|
17
|
+
"sdtk-design-kit",
|
|
18
|
+
"sdtk-wiki-kit",
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
function helpText() {
|
|
22
|
+
return [
|
|
23
|
+
"sdtk — unified SDTK suite CLI",
|
|
24
|
+
"",
|
|
25
|
+
"Usage:",
|
|
26
|
+
" sdtk init --runtime <claude|codex> [options] Initialise all five toolkits",
|
|
27
|
+
" sdtk --help Show this help",
|
|
28
|
+
" sdtk --version Show versions",
|
|
29
|
+
"",
|
|
30
|
+
"init options:",
|
|
31
|
+
" --runtime <claude|codex> Required. Runtime to install for spec/ops/code.",
|
|
32
|
+
" --runtime-scope <scope> Optional. Forwarded to the runtime toolkits.",
|
|
33
|
+
" --project-path <path> Optional. Target project directory.",
|
|
34
|
+
" --force Re-initialise existing assets.",
|
|
35
|
+
" --skip-runtime-assets Skip runtime asset install (runtime toolkits).",
|
|
36
|
+
" --keep-going Continue past a failing toolkit (default: fail-fast).",
|
|
37
|
+
" --verbose Verbose per-toolkit output.",
|
|
38
|
+
"",
|
|
39
|
+
"Runs: sdtk-spec → sdtk-ops → sdtk-code (with --runtime) → sdtk-design → sdtk-wiki",
|
|
40
|
+
"(sdtk-design and sdtk-wiki run their own non-runtime init).",
|
|
41
|
+
"",
|
|
42
|
+
"Standalone per-toolkit CLIs remain available: sdtk-spec, sdtk-ops, sdtk-code,",
|
|
43
|
+
"sdtk-design, sdtk-wiki.",
|
|
44
|
+
"",
|
|
45
|
+
"Docs: https://sdtk.dev",
|
|
46
|
+
].join("\n");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function versionText() {
|
|
50
|
+
// eslint-disable-next-line global-require
|
|
51
|
+
const self = require("../package.json");
|
|
52
|
+
const lines = [`sdtk-kit ${self.version}`];
|
|
53
|
+
for (const kit of SUB_KITS) {
|
|
54
|
+
let version = "not resolved";
|
|
55
|
+
try {
|
|
56
|
+
// eslint-disable-next-line global-require
|
|
57
|
+
version = require(`${kit}/package.json`).version;
|
|
58
|
+
} catch (err) {
|
|
59
|
+
version = "not resolved";
|
|
60
|
+
}
|
|
61
|
+
lines.push(` ${kit.padEnd(15)} ${version}`);
|
|
62
|
+
}
|
|
63
|
+
return lines.join("\n");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function main(argv) {
|
|
67
|
+
const command = argv[0];
|
|
68
|
+
|
|
69
|
+
if (!command || command === "--help" || command === "-h" || command === "help") {
|
|
70
|
+
console.log(helpText());
|
|
71
|
+
return 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (command === "--version" || command === "-v") {
|
|
75
|
+
console.log(versionText());
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (command === "init") {
|
|
80
|
+
// eslint-disable-next-line global-require
|
|
81
|
+
const { cmdInit } = require("../src/commands/init");
|
|
82
|
+
return cmdInit(argv.slice(1));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.error(`sdtk: unknown command '${command}'.`);
|
|
86
|
+
console.error("Run `sdtk --help` for usage.");
|
|
87
|
+
return 2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
process.exitCode = main(process.argv.slice(2));
|