outfitter 0.2.2 → 0.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # outfitter
2
2
 
3
- Umbrella CLI for scaffolding Outfitter projects and managing development environments.
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 init cli my-project
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 cli my-cli
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
- # Scaffold a new MCP server
24
- outfitter init mcp my-mcp
27
+ ## CLI Overview
25
28
 
26
- # Scaffold a new daemon
27
- outfitter init daemon my-daemon
29
+ ```text
30
+ outfitter [--json] <command>
31
+ ```
28
32
 
29
- # Check your environment
30
- outfitter doctor
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
- ## Commands
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
- ### init
80
+ Examples:
36
81
 
37
- Scaffolds a new Outfitter project from a template.
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 init <cli|mcp|daemon> [directory] [options]
41
- outfitter init [directory] --template <template> [options]
94
+ outfitter scaffold <target> [name] [options]
42
95
  ```
43
96
 
44
- **Arguments:**
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
- **Templates:**
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
- **Examples:**
116
+ Add a tooling block from the registry.
62
117
 
63
118
  ```bash
64
- # Create in new directory
65
- outfitter init cli my-project
119
+ outfitter add <block> [options]
120
+ outfitter add list
121
+ ```
66
122
 
67
- # Create with specific template
68
- outfitter init mcp my-mcp
123
+ Options:
69
124
 
70
- # Create in current directory with custom name
71
- outfitter init . --name my-custom-name
125
+ - `-f, --force` - Overwrite existing files
126
+ - `--dry-run` - Preview without writing files
72
127
 
73
- # Create with a custom binary name
74
- outfitter init cli my-project --bin my-cli
128
+ Examples:
75
129
 
76
- # Force overwrite existing files
77
- outfitter init my-project --force
130
+ ```bash
131
+ outfitter add scaffolding
132
+ outfitter add biome --dry-run
133
+ outfitter add list
78
134
  ```
79
135
 
80
- ### doctor
136
+ ### `repo`
81
137
 
82
- Validates your environment and project dependencies.
138
+ Canonical namespace for repository maintenance workflows.
83
139
 
84
140
  ```bash
85
- outfitter doctor
141
+ outfitter repo check <subject> [options]
142
+ outfitter repo sync <subject> [options]
143
+ outfitter repo export <subject> [options]
86
144
  ```
87
145
 
88
- Performs the following checks:
89
- - **Bun Version** - Ensures Bun >= 1.3.6 is installed
90
- - **package.json** - Validates required fields (name, version)
91
- - **Dependencies** - Checks if node_modules is present and complete
92
- - **tsconfig.json** - Verifies TypeScript configuration exists
93
- - **src/ directory** - Confirms source directory structure
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
- **Example output:**
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
- [PASS] Bun Version: 1.3.6 (requires 1.3.6)
102
- [PASS] package.json
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
- 5/5 checks passed
172
+ ```bash
173
+ outfitter migrate kit [directory] [options]
111
174
  ```
112
175
 
113
- ## Template Variables
176
+ Options:
114
177
 
115
- Templates use placeholder syntax for project-specific values:
178
+ - `--dry-run` - Preview changes without writing files
116
179
 
117
- | Placeholder | Description | Default |
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
- Files ending in `.template` have their extension removed after processing (e.g., `package.json.template` becomes `package.json`).
182
+ ```bash
183
+ outfitter migrate kit --dry-run
184
+ outfitter migrate kit .
185
+ ```
126
186
 
127
- ## Programmatic API
187
+ ### `update`
128
188
 
129
- The CLI commands are also available as a programmatic API:
189
+ Check installed `@outfitter/*` packages against npm versions.
130
190
 
131
- ```typescript
132
- import { runInit, runDoctor } from "outfitter";
191
+ ```bash
192
+ outfitter update [options]
193
+ ```
133
194
 
134
- // Initialize a project programmatically
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
- if (initResult.isErr()) {
143
- console.error("Failed:", initResult.error.message);
144
- }
197
+ - `--guide` - Include composed migration guidance
198
+ - `--cwd <path>` - Working directory to inspect
145
199
 
146
- // Run doctor checks programmatically
147
- const doctorResult = await runDoctor({ cwd: process.cwd() });
200
+ Examples:
148
201
 
149
- if (doctorResult.exitCode === 0) {
150
- console.log("All checks passed!");
151
- } else {
152
- console.log(`${doctorResult.summary.failed} checks failed`);
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
- ### API Types
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
- interface InitOptions {
160
- readonly targetDir: string;
161
- readonly name: string | undefined;
162
- readonly template: string | undefined;
163
- readonly force: boolean;
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
- interface DoctorOptions {
167
- readonly cwd: string;
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
- interface DoctorResult {
171
- readonly checks: {
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.6
284
+ - Bun >= 1.3.7
186
285
 
187
286
  ## Related Packages
188
287
 
189
- - `@outfitter/cli` - CLI framework for building command-line tools
288
+ - `@outfitter/cli` - CLI framework primitives
289
+ - `@outfitter/contracts` - Result and error contracts
190
290
  - `@outfitter/mcp` - MCP server framework
191
- - `@outfitter/daemon` - Daemon lifecycle management
192
- - `@outfitter/config` - Configuration loading
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/cli.js CHANGED
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env bun
2
2
  import {
3
+ createRepoCommand,
3
4
  outfitterActions
4
- } from "./shared/chunk-sak1tt33.js";
5
+ } from "./shared/chunk-tpwtpa74.js";
5
6
 
6
7
  // src/cli.ts
7
8
  import { readFileSync } from "node:fs";
9
+ import { exitWithError } from "@outfitter/cli";
8
10
  import { buildCliCommands } from "@outfitter/cli/actions";
9
11
  import { createCLI } from "@outfitter/cli/command";
10
- import { exitWithError } from "@outfitter/cli/output";
11
12
  import { createContext, generateRequestId } from "@outfitter/contracts";
12
13
  import { createOutfitterLoggerFactory } from "@outfitter/logging";
13
14
  function createProgram() {
@@ -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";