outfitter 0.2.2 → 0.2.3
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/README.md +215 -116
- package/dist/actions.d.ts +2 -0
- package/dist/actions.js +34 -0
- package/dist/cli.js +3 -1
- package/dist/commands/add.d.ts +54 -0
- package/dist/commands/add.js +16 -0
- package/dist/commands/check.d.ts +91 -0
- package/dist/commands/check.js +14 -0
- package/dist/commands/demo.d.ts +21 -0
- package/dist/commands/demo.js +8 -0
- package/dist/commands/docs-module-loader.d.ts +2 -0
- package/dist/commands/docs-module-loader.js +8 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +13 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.js +31 -0
- package/dist/commands/migrate-kit.d.ts +2 -0
- package/dist/commands/migrate-kit.js +15 -0
- package/dist/commands/repo.d.ts +3 -0
- package/dist/commands/repo.js +9 -0
- package/dist/commands/scaffold.d.ts +4 -0
- package/dist/commands/scaffold.js +31 -0
- package/dist/commands/shared-deps.d.ts +36 -0
- package/dist/commands/shared-deps.js +10 -0
- package/dist/commands/update-planner.d.ts +58 -0
- package/dist/commands/update-planner.js +8 -0
- package/dist/commands/update-workspace.d.ts +76 -0
- package/dist/commands/update-workspace.js +16 -0
- package/dist/commands/update.d.ts +113 -0
- package/dist/commands/update.js +21 -0
- package/dist/create/index.d.ts +5 -0
- package/dist/create/index.js +29 -0
- package/dist/create/planner.d.ts +3 -0
- package/dist/create/planner.js +21 -0
- package/dist/create/presets.d.ts +3 -0
- package/dist/create/presets.js +12 -0
- package/dist/create/types.d.ts +2 -0
- package/dist/create/types.js +1 -0
- package/dist/engine/blocks.d.ts +3 -0
- package/dist/engine/blocks.js +12 -0
- package/dist/engine/collector.d.ts +2 -0
- package/dist/engine/collector.js +8 -0
- package/dist/engine/config.d.ts +3 -0
- package/dist/engine/config.js +12 -0
- package/dist/engine/executor.d.ts +3 -0
- package/dist/engine/executor.js +16 -0
- package/dist/engine/index.d.ts +8 -0
- package/dist/engine/index.js +59 -0
- package/dist/engine/names.d.ts +2 -0
- package/dist/engine/names.js +16 -0
- package/dist/engine/post-scaffold.d.ts +3 -0
- package/dist/engine/post-scaffold.js +8 -0
- package/dist/engine/render-plan.d.ts +7 -0
- package/dist/engine/render-plan.js +9 -0
- package/dist/engine/template.d.ts +3 -0
- package/dist/engine/template.js +17 -0
- package/dist/engine/types.d.ts +2 -0
- package/dist/engine/types.js +8 -0
- package/dist/engine/workspace.d.ts +3 -0
- package/dist/engine/workspace.js +13 -0
- package/dist/index.d.ts +228 -152
- package/dist/index.js +144 -14
- package/dist/manifest.d.ts +71 -0
- package/dist/manifest.js +16 -0
- package/dist/output-mode.d.ts +2 -0
- package/dist/output-mode.js +10 -0
- package/dist/shared/chunk-b0y0cwkr.js +5533 -0
- package/dist/shared/outfitter-193jvzg4.d.ts +5 -0
- package/dist/shared/outfitter-1dd0k853.js +194 -0
- package/dist/shared/outfitter-1h7k8xxt.js +29 -0
- package/dist/shared/outfitter-1qwpjt6w.js +125 -0
- package/dist/shared/outfitter-2ngep1h2.d.ts +5 -0
- package/dist/shared/outfitter-2np85etz.js +95 -0
- package/dist/shared/outfitter-33w361tc.d.ts +18 -0
- package/dist/shared/outfitter-344t1r38.js +1 -0
- package/dist/shared/outfitter-3weh61w7.d.ts +25 -0
- package/dist/shared/outfitter-4s9meh3j.js +221 -0
- package/dist/shared/outfitter-6a4bq054.js +322 -0
- package/dist/shared/outfitter-6bkqjk86.d.ts +3 -0
- package/dist/shared/outfitter-6gc3g5wk.js +98 -0
- package/dist/shared/outfitter-7cv5fg1m.js +61 -0
- package/dist/shared/outfitter-7ha7p61k.d.ts +6 -0
- package/dist/shared/outfitter-7r12fj7f.js +30 -0
- package/dist/shared/outfitter-8y2dfx6n.js +11 -0
- package/dist/shared/outfitter-9c8edfsn.js +715 -0
- package/dist/shared/outfitter-9x1brcmq.js +184 -0
- package/dist/shared/outfitter-a79xrm12.d.ts +17 -0
- package/dist/shared/outfitter-amc4jbs1.d.ts +50 -0
- package/dist/shared/outfitter-ara3djt0.js +73 -0
- package/dist/shared/outfitter-avhm5z6w.js +82 -0
- package/dist/shared/outfitter-b5nd42y4.d.ts +45 -0
- package/dist/shared/outfitter-dd0btgec.d.ts +40 -0
- package/dist/shared/outfitter-e2zz5wv7.d.ts +51 -0
- package/dist/shared/outfitter-ehp18x1n.js +1 -0
- package/dist/shared/outfitter-fnsmx3xg.js +750 -0
- package/dist/shared/outfitter-gdvm5c0b.d.ts +4 -0
- package/dist/shared/outfitter-gp4v5gkf.js +322 -0
- package/dist/shared/outfitter-h1mnzzd1.d.ts +14 -0
- package/dist/shared/outfitter-hpymx4m9.js +184 -0
- package/dist/shared/outfitter-hvsaxgcp.js +1 -0
- package/dist/shared/outfitter-j8yc7294.d.ts +22 -0
- package/dist/shared/outfitter-jyxwznk1.js +404 -0
- package/dist/shared/outfitter-k112c427.js +21 -0
- package/dist/shared/outfitter-k56rmt24.d.ts +30 -0
- package/dist/shared/outfitter-ksa1pp4t.d.ts +4 -0
- package/dist/shared/outfitter-mdt37hqm.js +4 -0
- package/dist/shared/outfitter-mtbpabf3.js +91 -0
- package/dist/shared/outfitter-nm4m0v6x.d.ts +131 -0
- package/dist/shared/outfitter-nmeecf1b.js +531 -0
- package/dist/shared/outfitter-npyfbdmc.d.ts +6 -0
- package/dist/shared/outfitter-pxt58tsq.js +582 -0
- package/dist/shared/outfitter-q9agarmb.js +42 -0
- package/dist/shared/outfitter-qfgj5xpq.js +70 -0
- package/dist/shared/outfitter-qfh36ddg.d.ts +66 -0
- package/dist/shared/outfitter-s6k8y2p4.js +269 -0
- package/dist/shared/outfitter-sftf1s26.js +199 -0
- package/dist/shared/outfitter-sg7ncy4a.d.ts +51 -0
- package/dist/shared/outfitter-sgtq57qr.d.ts +5 -0
- package/dist/shared/outfitter-txre6cdn.d.ts +60 -0
- package/dist/shared/outfitter-vh4xgb93.js +35 -0
- package/dist/shared/outfitter-ya44h1km.js +191 -0
- package/dist/shared/outfitter-zwyvewr1.js +36 -0
- package/dist/targets/index.d.ts +4 -0
- package/dist/targets/index.js +29 -0
- package/dist/targets/registry.d.ts +3 -0
- package/dist/targets/registry.js +28 -0
- package/dist/targets/types.d.ts +2 -0
- package/dist/targets/types.js +1 -0
- package/package.json +154 -37
- package/templates/minimal/.gitignore.template +30 -0
- package/templates/minimal/.lefthook.yml.template +26 -0
- package/templates/minimal/package.json.template +46 -0
- package/templates/minimal/src/index.ts.template +26 -0
- package/templates/minimal/tsconfig.json.template +34 -0
- package/dist/shared/chunk-sak1tt33.js +0 -3457
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# outfitter
|
|
2
2
|
|
|
3
|
-
Umbrella CLI for scaffolding Outfitter projects and managing
|
|
3
|
+
Umbrella CLI for scaffolding Outfitter projects and managing workspace adoption.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -11,186 +11,285 @@ bun add -g outfitter
|
|
|
11
11
|
Or run directly with `bunx`:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
bunx outfitter
|
|
14
|
+
bunx outfitter --help
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Quick Start
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
# Scaffold a new CLI project
|
|
21
|
-
outfitter init
|
|
20
|
+
# Scaffold a new CLI project with defaults
|
|
21
|
+
bunx outfitter init my-cli --preset cli --yes
|
|
22
|
+
cd my-cli
|
|
23
|
+
bun install
|
|
24
|
+
bun run dev
|
|
25
|
+
```
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
outfitter init mcp my-mcp
|
|
27
|
+
## CLI Overview
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
outfitter
|
|
29
|
+
```text
|
|
30
|
+
outfitter [--json] <command>
|
|
31
|
+
```
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
Global options:
|
|
34
|
+
|
|
35
|
+
- `--json` - Force JSON output for supported commands
|
|
36
|
+
|
|
37
|
+
Top-level commands:
|
|
38
|
+
|
|
39
|
+
- `init [directory]` - Create a new project from scratch (interactive or scripted)
|
|
40
|
+
- `scaffold <target> [name]` - Add a new capability to an existing project
|
|
41
|
+
- `add <block>` - Add a tooling block (`claude`, `biome`, `lefthook`, `bootstrap`, `scaffolding`)
|
|
42
|
+
- `repo <action> <subject>` - Repository maintenance namespace (`check|sync|export`)
|
|
43
|
+
- `migrate kit [directory]` - Migrate foundation imports and dependencies to `@outfitter/kit`
|
|
44
|
+
- `update` - Check installed `@outfitter/*` versions and optionally show migration guidance
|
|
45
|
+
- `doctor` - Validate local environment and project dependencies
|
|
46
|
+
- `demo [section]` - Forward to the dedicated demo CLI (`outfitter-demo`)
|
|
47
|
+
|
|
48
|
+
## Command Reference
|
|
49
|
+
|
|
50
|
+
### `init`
|
|
51
|
+
|
|
52
|
+
Create a new project from scratch.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
outfitter init [directory] [options]
|
|
56
|
+
outfitter init cli [directory] [options]
|
|
57
|
+
outfitter init mcp [directory] [options]
|
|
58
|
+
outfitter init daemon [directory] [options]
|
|
31
59
|
```
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
Options:
|
|
62
|
+
|
|
63
|
+
- `-n, --name <name>` - Package name
|
|
64
|
+
- `-b, --bin <name>` - Binary name
|
|
65
|
+
- `-p, --preset <preset>` - Preset (`minimal`, `cli`, `mcp`, `daemon`)
|
|
66
|
+
- `-t, --template <template>` - Deprecated alias for `--preset`
|
|
67
|
+
- `-s, --structure <mode>` - Project structure (`single` | `workspace`)
|
|
68
|
+
- `--workspace-name <name>` - Workspace root package name
|
|
69
|
+
- `--local` - Use `workspace:*` for `@outfitter/*` dependencies
|
|
70
|
+
- `--workspace` - Alias for `--local`
|
|
71
|
+
- `--with <blocks>` - Add specific tooling blocks
|
|
72
|
+
- `--no-tooling` - Skip tooling setup
|
|
73
|
+
- `-f, --force` - Overwrite existing files
|
|
74
|
+
- `-y, --yes` - Skip prompts and use defaults
|
|
75
|
+
- `--dry-run` - Preview changes without writing files
|
|
76
|
+
- `--skip-install` - Skip `bun install`
|
|
77
|
+
- `--skip-git` - Skip `git init` and initial commit
|
|
78
|
+
- `--skip-commit` - Skip initial commit only
|
|
34
79
|
|
|
35
|
-
|
|
80
|
+
Examples:
|
|
36
81
|
|
|
37
|
-
|
|
82
|
+
```bash
|
|
83
|
+
outfitter init my-lib --preset minimal --yes
|
|
84
|
+
outfitter init cli my-project --yes
|
|
85
|
+
outfitter init my-workspace --preset mcp --structure workspace --workspace-name @acme/root
|
|
86
|
+
outfitter init . --template basic --name my-lib
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### `scaffold`
|
|
90
|
+
|
|
91
|
+
Add a target capability into an existing project/workspace.
|
|
38
92
|
|
|
39
93
|
```bash
|
|
40
|
-
outfitter
|
|
41
|
-
outfitter init [directory] --template <template> [options]
|
|
94
|
+
outfitter scaffold <target> [name] [options]
|
|
42
95
|
```
|
|
43
96
|
|
|
44
|
-
|
|
45
|
-
- `directory` - Target directory (defaults to current directory)
|
|
97
|
+
Options:
|
|
46
98
|
|
|
47
|
-
**Options:**
|
|
48
|
-
- `-n, --name <name>` - Project name (defaults to directory name)
|
|
49
|
-
- `-b, --bin <name>` - Binary name (defaults to project name)
|
|
50
|
-
- `-t, --template <template>` - Template to use (default: `basic`, used with `outfitter init`)
|
|
51
99
|
- `-f, --force` - Overwrite existing files
|
|
100
|
+
- `--skip-install` - Skip `bun install`
|
|
101
|
+
- `--dry-run` - Preview changes without writing files
|
|
102
|
+
- `--with <blocks>` - Add specific tooling blocks
|
|
103
|
+
- `--no-tooling` - Skip default tooling blocks
|
|
104
|
+
- `--local` - Use `workspace:*` for `@outfitter/*` dependencies
|
|
105
|
+
|
|
106
|
+
Examples:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
outfitter scaffold mcp
|
|
110
|
+
outfitter scaffold lib shared-utils
|
|
111
|
+
outfitter scaffold cli admin-console --with biome,lefthook
|
|
112
|
+
```
|
|
52
113
|
|
|
53
|
-
|
|
54
|
-
| Template | Description |
|
|
55
|
-
|----------|-------------|
|
|
56
|
-
| `basic` | Minimal TypeScript project structure |
|
|
57
|
-
| `cli` | CLI application with Commander.js |
|
|
58
|
-
| `mcp` | MCP server with typed tools |
|
|
59
|
-
| `daemon` | Background daemon with IPC and health checks |
|
|
114
|
+
### `add`
|
|
60
115
|
|
|
61
|
-
|
|
116
|
+
Add a tooling block from the registry.
|
|
62
117
|
|
|
63
118
|
```bash
|
|
64
|
-
|
|
65
|
-
outfitter
|
|
119
|
+
outfitter add <block> [options]
|
|
120
|
+
outfitter add list
|
|
121
|
+
```
|
|
66
122
|
|
|
67
|
-
|
|
68
|
-
outfitter init mcp my-mcp
|
|
123
|
+
Options:
|
|
69
124
|
|
|
70
|
-
|
|
71
|
-
|
|
125
|
+
- `-f, --force` - Overwrite existing files
|
|
126
|
+
- `--dry-run` - Preview without writing files
|
|
72
127
|
|
|
73
|
-
|
|
74
|
-
outfitter init cli my-project --bin my-cli
|
|
128
|
+
Examples:
|
|
75
129
|
|
|
76
|
-
|
|
77
|
-
outfitter
|
|
130
|
+
```bash
|
|
131
|
+
outfitter add scaffolding
|
|
132
|
+
outfitter add biome --dry-run
|
|
133
|
+
outfitter add list
|
|
78
134
|
```
|
|
79
135
|
|
|
80
|
-
###
|
|
136
|
+
### `repo`
|
|
81
137
|
|
|
82
|
-
|
|
138
|
+
Canonical namespace for repository maintenance workflows.
|
|
83
139
|
|
|
84
140
|
```bash
|
|
85
|
-
outfitter
|
|
141
|
+
outfitter repo check <subject> [options]
|
|
142
|
+
outfitter repo sync <subject> [options]
|
|
143
|
+
outfitter repo export <subject> [options]
|
|
86
144
|
```
|
|
87
145
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
146
|
+
Current subjects:
|
|
147
|
+
|
|
148
|
+
- `check docs` - Validate generated package docs are up to date
|
|
149
|
+
- `sync docs` - Generate package docs into `docs/packages`
|
|
150
|
+
- `export docs` - Export package and LLM docs artifacts
|
|
151
|
+
- `check exports` - Validate package export maps
|
|
152
|
+
- `check readme` - Validate README import examples
|
|
153
|
+
- `check registry` - Validate bunup workspace registration
|
|
154
|
+
- `check changeset` - Validate required changesets for package changes
|
|
155
|
+
- `check tree` - Assert no modified/untracked files
|
|
156
|
+
- `check boundary-invocations` - Disallow direct `packages/*/src` execution from root/app scripts
|
|
94
157
|
|
|
95
|
-
|
|
158
|
+
Examples:
|
|
96
159
|
|
|
160
|
+
```bash
|
|
161
|
+
outfitter repo check docs --cwd .
|
|
162
|
+
outfitter repo sync docs --cwd .
|
|
163
|
+
outfitter repo export docs --target llms
|
|
164
|
+
outfitter repo check exports --json
|
|
165
|
+
outfitter repo check readme
|
|
97
166
|
```
|
|
98
|
-
Outfitter Doctor
|
|
99
167
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
my-project@0.1.0-rc.0
|
|
104
|
-
[PASS] Dependencies
|
|
105
|
-
12 dependencies installed
|
|
106
|
-
[PASS] tsconfig.json
|
|
107
|
-
[PASS] src/ directory
|
|
168
|
+
### `migrate kit`
|
|
169
|
+
|
|
170
|
+
Codemod for kit-first foundation adoption.
|
|
108
171
|
|
|
109
|
-
|
|
110
|
-
|
|
172
|
+
```bash
|
|
173
|
+
outfitter migrate kit [directory] [options]
|
|
111
174
|
```
|
|
112
175
|
|
|
113
|
-
|
|
176
|
+
Options:
|
|
114
177
|
|
|
115
|
-
|
|
178
|
+
- `--dry-run` - Preview changes without writing files
|
|
116
179
|
|
|
117
|
-
|
|
118
|
-
|-------------|-------------|---------|
|
|
119
|
-
| `{{name}}` | Project name (legacy) | Directory name |
|
|
120
|
-
| `{{projectName}}` | Project name | Directory name |
|
|
121
|
-
| `{{binName}}` | Binary name | Project name |
|
|
122
|
-
| `{{version}}` | Initial version | `0.1.0-rc.0` |
|
|
123
|
-
| `{{description}}` | Project description | Generic description |
|
|
180
|
+
Examples:
|
|
124
181
|
|
|
125
|
-
|
|
182
|
+
```bash
|
|
183
|
+
outfitter migrate kit --dry-run
|
|
184
|
+
outfitter migrate kit .
|
|
185
|
+
```
|
|
126
186
|
|
|
127
|
-
|
|
187
|
+
### `update`
|
|
128
188
|
|
|
129
|
-
|
|
189
|
+
Check installed `@outfitter/*` packages against npm versions.
|
|
130
190
|
|
|
131
|
-
```
|
|
132
|
-
|
|
191
|
+
```bash
|
|
192
|
+
outfitter update [options]
|
|
193
|
+
```
|
|
133
194
|
|
|
134
|
-
|
|
135
|
-
const initResult = await runInit({
|
|
136
|
-
targetDir: "./my-project",
|
|
137
|
-
name: "my-project",
|
|
138
|
-
template: "cli",
|
|
139
|
-
force: false,
|
|
140
|
-
});
|
|
195
|
+
Options:
|
|
141
196
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
197
|
+
- `--guide` - Include composed migration guidance
|
|
198
|
+
- `--cwd <path>` - Working directory to inspect
|
|
145
199
|
|
|
146
|
-
|
|
147
|
-
const doctorResult = await runDoctor({ cwd: process.cwd() });
|
|
200
|
+
Examples:
|
|
148
201
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
202
|
+
```bash
|
|
203
|
+
outfitter update
|
|
204
|
+
outfitter update --guide
|
|
205
|
+
outfitter update --json --cwd .
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### `doctor`
|
|
209
|
+
|
|
210
|
+
Validate local environment and project structure.
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
outfitter doctor
|
|
154
214
|
```
|
|
155
215
|
|
|
156
|
-
###
|
|
216
|
+
### `demo`
|
|
217
|
+
|
|
218
|
+
Compatibility bridge to the dedicated demo CLI.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
outfitter demo [section] [options]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Options:
|
|
225
|
+
|
|
226
|
+
- `-l, --list` - List available sections
|
|
227
|
+
- `-a, --animate` - Run animated spinner demo
|
|
228
|
+
|
|
229
|
+
Use `outfitter-demo` (or `cli-demo`) directly for the dedicated demo app.
|
|
230
|
+
|
|
231
|
+
## Command Conventions
|
|
232
|
+
|
|
233
|
+
Canonical boundary and command conventions are documented in
|
|
234
|
+
[`docs/BOUNDARY-CONVENTIONS.md`](../../docs/BOUNDARY-CONVENTIONS.md).
|
|
235
|
+
|
|
236
|
+
Quick model status:
|
|
237
|
+
|
|
238
|
+
- `init`, `add`, `check`: implemented user-facing verbs
|
|
239
|
+
- `setup`, `fix`, user-facing `docs`: planned convergence verbs
|
|
240
|
+
- `repo check|sync|export`: canonical maintenance namespace
|
|
241
|
+
|
|
242
|
+
## Programmatic API
|
|
243
|
+
|
|
244
|
+
Root exports:
|
|
157
245
|
|
|
158
246
|
```typescript
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
247
|
+
import {
|
|
248
|
+
runDoctor,
|
|
249
|
+
runInit,
|
|
250
|
+
runMigrateKit,
|
|
251
|
+
runScaffold,
|
|
252
|
+
type InitOptions,
|
|
253
|
+
type MigrateKitOptions,
|
|
254
|
+
type ScaffoldOptions,
|
|
255
|
+
} from "outfitter";
|
|
256
|
+
```
|
|
165
257
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
258
|
+
Command subpath exports:
|
|
259
|
+
|
|
260
|
+
```typescript
|
|
261
|
+
import { runAdd } from "outfitter/commands/add";
|
|
262
|
+
import { runUpdate } from "outfitter/commands/update";
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Example:
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
import { runInit } from "outfitter";
|
|
269
|
+
|
|
270
|
+
const result = await runInit({
|
|
271
|
+
targetDir: "./my-app",
|
|
272
|
+
preset: "cli",
|
|
273
|
+
force: false,
|
|
274
|
+
yes: true,
|
|
275
|
+
});
|
|
169
276
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
readonly bunVersion: BunVersionCheck;
|
|
173
|
-
readonly packageJson: PackageJsonCheck;
|
|
174
|
-
readonly dependencies: DependenciesCheck;
|
|
175
|
-
readonly configFiles: ConfigFilesCheck;
|
|
176
|
-
readonly directories: DirectoriesCheck;
|
|
177
|
-
};
|
|
178
|
-
readonly summary: DoctorSummary;
|
|
179
|
-
readonly exitCode: number;
|
|
277
|
+
if (result.isErr()) {
|
|
278
|
+
console.error(result.error.message);
|
|
180
279
|
}
|
|
181
280
|
```
|
|
182
281
|
|
|
183
282
|
## Requirements
|
|
184
283
|
|
|
185
|
-
- Bun >= 1.3.
|
|
284
|
+
- Bun >= 1.3.7
|
|
186
285
|
|
|
187
286
|
## Related Packages
|
|
188
287
|
|
|
189
|
-
- `@outfitter/cli` - CLI framework
|
|
288
|
+
- `@outfitter/cli` - CLI framework primitives
|
|
289
|
+
- `@outfitter/contracts` - Result and error contracts
|
|
190
290
|
- `@outfitter/mcp` - MCP server framework
|
|
191
|
-
- `@outfitter/
|
|
192
|
-
-
|
|
193
|
-
- `@outfitter/contracts` - Result types and error patterns
|
|
291
|
+
- `@outfitter/tooling` - Tooling presets and verification CLI
|
|
292
|
+
- `outfitter-cli-demo` - Dedicated CLI/TUI demo app
|
|
194
293
|
|
|
195
294
|
## License
|
|
196
295
|
|
package/dist/actions.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
outfitterActions
|
|
4
|
+
} from "./shared/outfitter-fnsmx3xg.js";
|
|
5
|
+
import"./shared/outfitter-9c8edfsn.js";
|
|
6
|
+
import"./shared/outfitter-nmeecf1b.js";
|
|
7
|
+
import"./shared/outfitter-pxt58tsq.js";
|
|
8
|
+
import"./shared/outfitter-ehp18x1n.js";
|
|
9
|
+
import"./shared/outfitter-1dd0k853.js";
|
|
10
|
+
import"./shared/outfitter-jyxwznk1.js";
|
|
11
|
+
import"./shared/outfitter-qfgj5xpq.js";
|
|
12
|
+
import"./shared/outfitter-sftf1s26.js";
|
|
13
|
+
import"./shared/outfitter-6a4bq054.js";
|
|
14
|
+
import"./shared/outfitter-ya44h1km.js";
|
|
15
|
+
import"./shared/outfitter-gp4v5gkf.js";
|
|
16
|
+
import"./shared/outfitter-4s9meh3j.js";
|
|
17
|
+
import"./shared/outfitter-344t1r38.js";
|
|
18
|
+
import"./shared/outfitter-2np85etz.js";
|
|
19
|
+
import"./shared/outfitter-q9agarmb.js";
|
|
20
|
+
import"./shared/outfitter-1qwpjt6w.js";
|
|
21
|
+
import"./shared/outfitter-9x1brcmq.js";
|
|
22
|
+
import"./shared/outfitter-7cv5fg1m.js";
|
|
23
|
+
import"./shared/outfitter-s6k8y2p4.js";
|
|
24
|
+
import"./shared/outfitter-mtbpabf3.js";
|
|
25
|
+
import"./shared/outfitter-6gc3g5wk.js";
|
|
26
|
+
import"./shared/outfitter-7r12fj7f.js";
|
|
27
|
+
import"./shared/outfitter-ara3djt0.js";
|
|
28
|
+
import"./shared/outfitter-k112c427.js";
|
|
29
|
+
import"./shared/outfitter-8y2dfx6n.js";
|
|
30
|
+
import"./shared/outfitter-1h7k8xxt.js";
|
|
31
|
+
import"./shared/outfitter-mdt37hqm.js";
|
|
32
|
+
export {
|
|
33
|
+
outfitterActions
|
|
34
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import {
|
|
3
|
+
createRepoCommand,
|
|
3
4
|
outfitterActions
|
|
4
|
-
} from "./shared/chunk-
|
|
5
|
+
} from "./shared/chunk-b0y0cwkr.js";
|
|
5
6
|
|
|
6
7
|
// src/cli.ts
|
|
7
8
|
import { readFileSync } from "node:fs";
|
|
@@ -46,6 +47,7 @@ function createProgram() {
|
|
|
46
47
|
})) {
|
|
47
48
|
cli.register(command);
|
|
48
49
|
}
|
|
50
|
+
cli.register(createRepoCommand());
|
|
49
51
|
return cli;
|
|
50
52
|
}
|
|
51
53
|
var DEFAULT_CLI_VERSION = "0.0.0";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { OutputMode } from "@outfitter/cli/types";
|
|
2
|
+
import { Result } from "@outfitter/contracts";
|
|
3
|
+
import { AddBlockResult } from "@outfitter/tooling";
|
|
4
|
+
/**
|
|
5
|
+
* Input for the add command.
|
|
6
|
+
*/
|
|
7
|
+
interface AddInput {
|
|
8
|
+
/** Block name to add */
|
|
9
|
+
readonly block: string;
|
|
10
|
+
/** Overwrite existing files */
|
|
11
|
+
readonly force: boolean;
|
|
12
|
+
/** Show what would be done without making changes */
|
|
13
|
+
readonly dryRun: boolean;
|
|
14
|
+
/** Working directory (defaults to cwd) */
|
|
15
|
+
readonly cwd?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Error returned when adding a block fails.
|
|
19
|
+
*/
|
|
20
|
+
declare class AddError extends Error {
|
|
21
|
+
readonly _tag: "AddError";
|
|
22
|
+
constructor(message: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Runs the add command programmatically.
|
|
26
|
+
*
|
|
27
|
+
* @param input - Add command input
|
|
28
|
+
* @returns Result with details of what was added
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const result = await runAdd({
|
|
33
|
+
* block: "scaffolding",
|
|
34
|
+
* force: false,
|
|
35
|
+
* dryRun: false,
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* if (result.isOk()) {
|
|
39
|
+
* console.log(`Created ${result.value.created.length} files`);
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare function runAdd(input: AddInput): Promise<Result<AddBlockResult, AddError>>;
|
|
44
|
+
/**
|
|
45
|
+
* Prints the results of the add command.
|
|
46
|
+
*/
|
|
47
|
+
declare function printAddResults(result: AddBlockResult, dryRun: boolean, options?: {
|
|
48
|
+
mode?: OutputMode;
|
|
49
|
+
}): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Lists available blocks.
|
|
52
|
+
*/
|
|
53
|
+
declare function listBlocks(): Result<string[], AddError>;
|
|
54
|
+
export { runAdd, printAddResults, listBlocks, AddInput, AddError };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
AddError,
|
|
4
|
+
listBlocks,
|
|
5
|
+
printAddResults,
|
|
6
|
+
runAdd
|
|
7
|
+
} from "../shared/outfitter-s6k8y2p4.js";
|
|
8
|
+
import"../shared/outfitter-mtbpabf3.js";
|
|
9
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
10
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
11
|
+
export {
|
|
12
|
+
runAdd,
|
|
13
|
+
printAddResults,
|
|
14
|
+
listBlocks,
|
|
15
|
+
AddError
|
|
16
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { OutputMode } from "@outfitter/cli/types";
|
|
2
|
+
import { Result } from "@outfitter/contracts";
|
|
3
|
+
/**
|
|
4
|
+
* Options for the check command.
|
|
5
|
+
*/
|
|
6
|
+
interface CheckOptions {
|
|
7
|
+
/** Working directory to check. */
|
|
8
|
+
readonly cwd: string;
|
|
9
|
+
/** Show diff information for drifted files. */
|
|
10
|
+
readonly verbose?: boolean;
|
|
11
|
+
/** Check a specific block only. */
|
|
12
|
+
readonly block?: string;
|
|
13
|
+
/** Machine-oriented output for CI. */
|
|
14
|
+
readonly ci?: boolean;
|
|
15
|
+
/** Output mode override. */
|
|
16
|
+
readonly outputMode?: OutputMode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Information about a drifted file (included in verbose mode).
|
|
20
|
+
*/
|
|
21
|
+
interface DriftedFileInfo {
|
|
22
|
+
/** File path relative to project root. */
|
|
23
|
+
readonly path: string;
|
|
24
|
+
/** Reason for drift classification. */
|
|
25
|
+
readonly reason: "modified" | "missing";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Status of a single block after comparison.
|
|
29
|
+
*/
|
|
30
|
+
interface BlockCheckStatus {
|
|
31
|
+
/** Block name. */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
/** Comparison result. */
|
|
34
|
+
readonly status: "current" | "drifted" | "missing";
|
|
35
|
+
/** Tooling version the block was installed from. */
|
|
36
|
+
readonly installedFrom?: string;
|
|
37
|
+
/** Current tooling version providing the registry. */
|
|
38
|
+
readonly currentToolingVersion?: string;
|
|
39
|
+
/** Drifted file details (populated when verbose is true). */
|
|
40
|
+
readonly driftedFiles?: DriftedFileInfo[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Complete result of the check command.
|
|
44
|
+
*/
|
|
45
|
+
interface CheckResult {
|
|
46
|
+
/** Per-block comparison results. */
|
|
47
|
+
readonly blocks: BlockCheckStatus[];
|
|
48
|
+
/** Number of blocks checked. */
|
|
49
|
+
readonly totalChecked: number;
|
|
50
|
+
/** Number of blocks matching the registry. */
|
|
51
|
+
readonly currentCount: number;
|
|
52
|
+
/** Number of blocks with local modifications. */
|
|
53
|
+
readonly driftedCount: number;
|
|
54
|
+
/** Number of blocks with missing files. */
|
|
55
|
+
readonly missingCount: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Error returned when the check command fails.
|
|
59
|
+
*/
|
|
60
|
+
declare class CheckError extends Error {
|
|
61
|
+
readonly _tag: "CheckError";
|
|
62
|
+
constructor(message: string);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Runs the check command programmatically.
|
|
66
|
+
*
|
|
67
|
+
* Reads the manifest (or falls back to file-presence heuristic) and
|
|
68
|
+
* compares each installed block against the registry.
|
|
69
|
+
*
|
|
70
|
+
* @param options - Check command options
|
|
71
|
+
* @returns Result with per-block comparison statuses
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const result = await runCheck({ cwd: process.cwd() });
|
|
76
|
+
* if (result.isOk()) {
|
|
77
|
+
* if (result.value.driftedCount > 0) {
|
|
78
|
+
* console.log("Some blocks have drifted from the registry");
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare function runCheck(options: CheckOptions): Promise<Result<CheckResult, CheckError>>;
|
|
84
|
+
/**
|
|
85
|
+
* Formats and outputs check results.
|
|
86
|
+
*/
|
|
87
|
+
declare function printCheckResults(result: CheckResult, options?: {
|
|
88
|
+
mode?: OutputMode;
|
|
89
|
+
verbose?: boolean;
|
|
90
|
+
}): Promise<void>;
|
|
91
|
+
export { runCheck, printCheckResults, DriftedFileInfo, CheckResult, CheckOptions, CheckError, BlockCheckStatus };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CheckError,
|
|
4
|
+
printCheckResults,
|
|
5
|
+
runCheck
|
|
6
|
+
} from "../shared/outfitter-gp4v5gkf.js";
|
|
7
|
+
import"../shared/outfitter-mtbpabf3.js";
|
|
8
|
+
import"../shared/outfitter-7r12fj7f.js";
|
|
9
|
+
import"../shared/outfitter-mdt37hqm.js";
|
|
10
|
+
export {
|
|
11
|
+
runCheck,
|
|
12
|
+
printCheckResults,
|
|
13
|
+
CheckError
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CliOutputMode } from "../shared/outfitter-a79xrm12";
|
|
2
|
+
/**
|
|
3
|
+
* Options for forwarding to the demo CLI.
|
|
4
|
+
*/
|
|
5
|
+
interface DemoOptions {
|
|
6
|
+
readonly section?: string | undefined;
|
|
7
|
+
readonly list?: boolean | undefined;
|
|
8
|
+
readonly animate?: boolean | undefined;
|
|
9
|
+
readonly outputMode: CliOutputMode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Result of forwarding the demo command.
|
|
13
|
+
*/
|
|
14
|
+
interface DemoResult {
|
|
15
|
+
readonly exitCode: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Runs the demo command through available entrypoints.
|
|
19
|
+
*/
|
|
20
|
+
declare function runDemo(options: DemoOptions): Promise<DemoResult>;
|
|
21
|
+
export { runDemo, DemoResult, DemoOptions };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { CreateDocsCommandOptions, DocsCommandIo, DocsExportTarget, ExecuteCheckCommandOptions, ExecuteExportCommandOptions, ExecuteSyncCommandOptions, loadDocsModule } from "../shared/outfitter-dd0btgec";
|
|
2
|
+
export { loadDocsModule, ExecuteSyncCommandOptions, ExecuteExportCommandOptions, ExecuteCheckCommandOptions, DocsExportTarget, DocsCommandIo, CreateDocsCommandOptions };
|