create-krispya 0.5.3 → 0.6.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/README.md CHANGED
@@ -19,6 +19,7 @@ yarn create krispya
19
19
  - **TypeScript first** — Full type safety with JavaScript fallback
20
20
  - **Library ready** — ESM/CJS dual output with proper exports
21
21
  - **React & R3F** — First-class support with optional integrations
22
+ - **Config strategy** — Choose between stealth (`.config/`) or root placement
22
23
 
23
24
  ## Project Types
24
25
 
@@ -46,7 +47,8 @@ yarn create krispya
46
47
  Generate a monorepo with shared configuration packages:
47
48
 
48
49
  ```bash
49
- pnpm create krispya my-workspace --monorepo
50
+ pnpm create krispya
51
+ # Select "Monorepo" when prompted for project type
50
52
  ```
51
53
 
52
54
  This creates:
@@ -113,18 +115,68 @@ if pnpm create krispya --check; then
113
115
  fi
114
116
  ```
115
117
 
116
- ### AI Instruction Files
118
+ ### Updating a Workspace
119
+
120
+ Update an existing monorepo to the latest template:
121
+
122
+ ```bash
123
+ pnpm create krispya --update
124
+ ```
125
+
126
+ This compares your workspace against the latest template and offers to:
127
+
128
+ - Add new files (AI instructions, VS Code settings, etc.)
129
+ - Update config packages to latest versions
130
+ - Merge workspace config changes
131
+
132
+ Files are grouped by category. For each category with changes:
133
+
134
+ - `+` indicates new files (safe to add)
135
+ - `~` indicates changed files (will overwrite your customizations)
136
+
137
+ Use `--yes` for non-interactive mode (adds new files only, skips modified).
138
+
139
+ ### Migrating Linter/Formatter
140
+
141
+ Switch between linters or formatters:
142
+
143
+ ```bash
144
+ # Migrate linter
145
+ pnpm create krispya --update --linter eslint
146
+
147
+ # Migrate formatter
148
+ pnpm create krispya --update --formatter prettier
149
+
150
+ # Migrate both
151
+ pnpm create krispya --update --linter biome --formatter biome
152
+ ```
153
+
154
+ Migration automatically:
155
+
156
+ - Removes old config packages (e.g., `.config/oxlint/`)
157
+ - Generates new config packages (e.g., `.config/eslint/`)
158
+ - Updates root `package.json` (devDependencies, scripts)
159
+ - Updates all sub-package devDependencies
160
+ - Regenerates VS Code settings and AI files
161
+
162
+ Run `pnpm install` after migration to update dependencies.
163
+
164
+ ### AI Rules
117
165
 
118
- When creating a monorepo, you can generate AI instruction files to help AI assistants understand the workspace:
166
+ Optionally generate AI instruction files to help coding assistants understand the project:
119
167
 
120
- | File | Tool |
121
- | --------------------------------- | ----------------------- |
122
- | `.cursor/rules` | Cursor |
123
- | `AGENTS.md` | GitHub Copilot, general |
124
- | `CLAUDE.md` | Claude |
125
- | `.github/copilot-instructions.md` | GitHub Copilot |
168
+ | File | Supported by |
169
+ | ----------- | --------------------------------- |
170
+ | `AGENTS.md` | OpenAI, Cursor, Windsurf, Copilot |
171
+ | `CLAUDE.md` | Claude Code |
126
172
 
127
- Select which files to generate during monorepo creation. Your selection can be saved as a default.
173
+ These are pointer files that reference `.ai/workspace.md`, which contains:
174
+
175
+ - Project type and tooling (linter, formatter, package manager)
176
+ - Common commands (`pnpm test`, `pnpm build`, etc.)
177
+ - Project structure documentation
178
+
179
+ Select which files to generate during project creation. Your selection can be saved as a default.
128
180
 
129
181
  ## Tooling Options
130
182
 
@@ -137,6 +189,50 @@ Select which files to generate during monorepo creation. Your selection can be s
137
189
 
138
190
  \*Testing defaults to `vitest` for libraries, `none` for applications (configurable via prompts).
139
191
 
192
+ ## Config Strategy
193
+
194
+ Control where configuration files are placed in single-package projects:
195
+
196
+ | Strategy | Description |
197
+ | --------- | ---------------------------------------------- |
198
+ | `stealth` | Configs in `.config/` directory (default) |
199
+ | `root` | Configs at project root (traditional approach) |
200
+
201
+ **Stealth mode** keeps your project root clean:
202
+
203
+ ```
204
+ my-project/
205
+ ├── .config/
206
+ │ ├── oxlint.json
207
+ │ ├── prettier.json
208
+ │ ├── tsconfig.app.json
209
+ │ └── tsconfig.node.json
210
+ ├── src/
211
+ ├── package.json
212
+ └── tsconfig.json
213
+ ```
214
+
215
+ **Root mode** uses traditional config placement:
216
+
217
+ ```
218
+ my-project/
219
+ ├── src/
220
+ ├── oxlint.json
221
+ ├── .prettierrc
222
+ ├── tsconfig.json
223
+ ├── tsconfig.app.json
224
+ ├── tsconfig.node.json
225
+ └── package.json
226
+ ```
227
+
228
+ Set your default via the global config file (`~/.config/create-krispya/config.json`):
229
+
230
+ ```json
231
+ {
232
+ "configStrategy": "root"
233
+ }
234
+ ```
235
+
140
236
  ## CLI Options
141
237
 
142
238
  ```
@@ -161,6 +257,8 @@ Utility Options:
161
257
  --check Validate current monorepo workspace (exit 0/1)
162
258
  --fix Fix monorepo by generating missing config packages
163
259
  (use with --linter and --formatter for non-interactive)
260
+ --update Update monorepo to latest template (add new files, update configs)
261
+ --yes Accept defaults for prompts (non-interactive mode)
164
262
  --clear-config Clear saved preferences (editor, window reuse)
165
263
  --config-path Print path to config file
166
264
  ```
@@ -221,6 +319,12 @@ pnpm create krispya --fix
221
319
  # Fix monorepo (non-interactive)
222
320
  pnpm create krispya --fix --linter oxlint --formatter oxfmt
223
321
 
322
+ # Update monorepo to latest template
323
+ pnpm create krispya --update
324
+
325
+ # Update monorepo (non-interactive - adds new files only)
326
+ pnpm create krispya --update --yes
327
+
224
328
  # Clear saved preferences
225
329
  pnpm create krispya --clear-config
226
330
  ```
@@ -231,7 +335,7 @@ The CLI saves preferences for:
231
335
 
232
336
  - **Editor** — Cursor, VS Code, WebStorm, or skip
233
337
  - **Window reuse** — Open in current window or new window
234
- - **AI files** — Which AI instruction files to generate for monorepos
338
+ - **AI platforms** — Which AI rule files to generate (AGENTS.md, CLAUDE.md)
235
339
 
236
340
  Clear saved preferences:
237
341