optikit 1.2.5 → 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.
Files changed (104) hide show
  1. package/.claude/commands/build.md +57 -0
  2. package/.claude/commands/clean.md +45 -0
  3. package/.claude/commands/generate.md +64 -0
  4. package/.claude/commands/rollback.md +67 -0
  5. package/.claude/commands/run.md +63 -0
  6. package/.claude/commands/setup.md +69 -0
  7. package/.claude/commands/sync-docs.md +148 -0
  8. package/.claude/commands/version.md +63 -0
  9. package/.claude/settings.local.json +28 -0
  10. package/.claude-plugin/marketplace.json +36 -0
  11. package/.claude-plugin/plugin.json +25 -0
  12. package/.history/README_20260325211923.md +268 -0
  13. package/.history/README_20260325212116.md +268 -0
  14. package/.history/README_20260325212234.md +266 -0
  15. package/.history/README_20260325221838.md +321 -0
  16. package/.history/README_20260325221920.md +327 -0
  17. package/.history/README_20260325222245.md +328 -0
  18. package/.history/README_20260325222247.md +328 -0
  19. package/.mcp.json +8 -0
  20. package/CHANGELOG.md +67 -98
  21. package/CLAUDE.md +57 -206
  22. package/OPTIKIT_AGENT.md +398 -0
  23. package/README.md +293 -60
  24. package/dist/cli.js +75 -244
  25. package/dist/commands/build/commands.js +146 -0
  26. package/dist/commands/build/testflight.js +14 -0
  27. package/dist/commands/clean/commands.js +41 -0
  28. package/dist/commands/clean/flutter.js +8 -14
  29. package/dist/commands/clean/ios.js +12 -15
  30. package/dist/commands/config/aliases.js +122 -0
  31. package/dist/commands/config/commands.js +49 -0
  32. package/dist/commands/config/initApp.js +191 -0
  33. package/dist/commands/config/rollback.js +15 -4
  34. package/dist/commands/config/upgrade.js +36 -0
  35. package/dist/commands/mcp/commands.js +21 -0
  36. package/dist/commands/mcp/server.js +27 -0
  37. package/dist/commands/mcp/setup.js +62 -0
  38. package/dist/commands/mcp/tools.js +359 -0
  39. package/dist/commands/project/commands.js +132 -0
  40. package/dist/commands/project/devices.js +10 -26
  41. package/dist/commands/project/doctor.js +58 -0
  42. package/dist/commands/project/generate.js +183 -30
  43. package/dist/commands/project/setup.js +10 -28
  44. package/dist/commands/project/status.js +65 -0
  45. package/dist/commands/version/bump.js +75 -101
  46. package/dist/commands/version/commands.js +63 -0
  47. package/dist/commands/version/update.js +36 -24
  48. package/dist/constants.js +6 -1
  49. package/dist/styles.js +42 -5
  50. package/dist/utils/helpers/error.js +14 -0
  51. package/dist/utils/helpers/file.js +1 -1
  52. package/dist/utils/helpers/version.js +2 -1
  53. package/dist/utils/services/backup.js +12 -1
  54. package/dist/utils/services/command.js +1 -34
  55. package/dist/utils/services/exec.js +76 -101
  56. package/dist/utils/services/logger.js +10 -4
  57. package/dist/utils/validators/validation.js +24 -12
  58. package/docs/INSTALLATION.md +72 -0
  59. package/docs/TROUBLESHOOT.md +140 -0
  60. package/docs/USAGE.md +185 -0
  61. package/docs/VERSION_MANAGEMENT.md +177 -0
  62. package/package.json +7 -11
  63. package/src/cli.ts +82 -371
  64. package/src/commands/build/commands.ts +169 -0
  65. package/src/commands/build/testflight.ts +18 -0
  66. package/src/commands/clean/commands.ts +43 -0
  67. package/src/commands/clean/flutter.ts +9 -13
  68. package/src/commands/clean/ios.ts +13 -13
  69. package/src/commands/config/aliases.ts +150 -0
  70. package/src/commands/config/commands.ts +50 -0
  71. package/src/commands/config/initApp.ts +213 -0
  72. package/src/commands/config/rollback.ts +16 -4
  73. package/src/commands/config/upgrade.ts +40 -0
  74. package/src/commands/mcp/commands.ts +23 -0
  75. package/src/commands/mcp/server.ts +35 -0
  76. package/src/commands/mcp/setup.ts +69 -0
  77. package/src/commands/mcp/tools.ts +365 -0
  78. package/src/commands/project/commands.ts +132 -0
  79. package/src/commands/project/devices.ts +11 -24
  80. package/src/commands/project/doctor.ts +81 -0
  81. package/src/commands/project/generate.ts +211 -32
  82. package/src/commands/project/setup.ts +13 -30
  83. package/src/commands/project/status.ts +72 -0
  84. package/src/commands/version/bump.ts +98 -110
  85. package/src/commands/version/commands.ts +76 -0
  86. package/src/commands/version/update.ts +86 -75
  87. package/src/constants.ts +7 -1
  88. package/src/styles.ts +49 -7
  89. package/src/utils/helpers/error.ts +16 -0
  90. package/src/utils/helpers/file.ts +1 -1
  91. package/src/utils/helpers/version.ts +2 -1
  92. package/src/utils/services/backup.ts +17 -1
  93. package/src/utils/services/command.ts +1 -58
  94. package/src/utils/services/exec.ts +92 -117
  95. package/src/utils/services/logger.ts +12 -4
  96. package/src/utils/validators/validation.ts +24 -12
  97. package/CODE_QUALITY.md +0 -398
  98. package/ENHANCEMENTS.md +0 -310
  99. package/FEATURE_ENHANCEMENTS.md +0 -435
  100. package/INSTALLATION.md +0 -118
  101. package/SAFETY_FEATURES.md +0 -396
  102. package/TROUBLESHOOT.md +0 -60
  103. package/USAGE.md +0 -412
  104. package/VERSION_MANAGEMENT.md +0 -438
package/USAGE.md DELETED
@@ -1,412 +0,0 @@
1
- # Usage Guide for OptiKit CLI
2
-
3
- The **OptiKit CLI Tool** provides several commands to help streamline your development workflow. This guide explains how to use the tool, including all available commands and their respective options.
4
-
5
- Each command is designed to simplify tasks like building Flutter projects, generating modules, managing versions, and automating other aspects of your workflow. Below, you'll find detailed explanations and examples for each command supported by **OptiKit CLI**.
6
-
7
- After installing OptiKit, you can use it directly from the command line.
8
-
9
- ---
10
-
11
- ## Table of Contents
12
-
13
- - [Configuration Commands](#configuration-commands)
14
- - [Version Management Commands](#version-management-commands)
15
- - [Device Management Commands](#device-management-commands)
16
- - [Build Commands](#build-commands)
17
- - [Clean Commands](#clean-commands)
18
- - [Project Commands](#project-commands)
19
-
20
- ---
21
-
22
- ## Configuration Commands
23
-
24
- ### Initialize OptiKit Configuration
25
-
26
- Create `.optikitrc.json` configuration file in your project:
27
-
28
- ```bash
29
- optikit init
30
- ```
31
-
32
- **What it does:**
33
-
34
- - Creates configuration file with default settings
35
- - Adds `.optikit-backup/` to `.gitignore`
36
- - Sets up automatic backups and retention policies
37
-
38
- **Default configuration:**
39
-
40
- ```json
41
- {
42
- "backupRetentionCount": 5,
43
- "useFvmByDefault": true,
44
- "autoBackup": true,
45
- "verbose": false
46
- }
47
- ```
48
-
49
- ---
50
-
51
- ### Manage Backups
52
-
53
- List all available backups:
54
-
55
- ```bash
56
- optikit rollback
57
- ```
58
-
59
- Restore a specific backup:
60
-
61
- ```bash
62
- optikit rollback --restore <number>
63
- ```
64
-
65
- **What it does:**
66
-
67
- - Recursively searches for all OptiKit backups
68
- - Groups backups by original file
69
- - Shows timestamps and file sizes
70
- - Allows easy restoration by number
71
-
72
- ---
73
-
74
- ## Version Management Commands
75
-
76
- For detailed version management strategies, see [VERSION_MANAGEMENT.md](VERSION_MANAGEMENT.md).
77
-
78
- ### Show Current Version
79
-
80
- Display current version information:
81
-
82
- ```bash
83
- optikit version
84
- ```
85
-
86
- **Output:**
87
-
88
- ```text
89
- 📱 Current Version Information
90
-
91
- Version: 1.2.3+45
92
- Major: 1
93
- Minor: 2
94
- Patch: 3
95
- Build: 45
96
- ```
97
-
98
- ---
99
-
100
- ### Bump Version (Semantic Versioning)
101
-
102
- Increment patch version (bug fixes):
103
-
104
- ```bash
105
- optikit bump patch
106
- ```
107
-
108
- Increment minor version (new features):
109
-
110
- ```bash
111
- optikit bump minor
112
- ```
113
-
114
- Increment major version (breaking changes):
115
-
116
- ```bash
117
- optikit bump major
118
- ```
119
-
120
- **What it does:**
121
-
122
- - Updates version in pubspec.yaml
123
- - Increments Android build number
124
- - **Resets iOS build number to 1** (new version = fresh start)
125
- - Updates iOS project files (project.pbxproj, Info.plist)
126
- - Creates automatic backups before changes
127
-
128
- **Example:**
129
-
130
- ```text
131
- Current: 1.0.2+45
132
- After `optikit bump patch`:
133
- New: 1.0.3+46 (iOS build: 1)
134
- ```
135
-
136
- ---
137
-
138
- ### Bump iOS Build Only (TestFlight)
139
-
140
- Increment only iOS build number without changing version:
141
-
142
- ```bash
143
- optikit bump-ios
144
- ```
145
-
146
- **What it does:**
147
-
148
- - Keeps version unchanged
149
- - Keeps Android build number unchanged
150
- - **Increments iOS build from current Android build number**
151
- - Perfect for multiple TestFlight uploads
152
-
153
- **Example:**
154
-
155
- ```text
156
- Before:
157
- Version: 1.0.2+45
158
- iOS build: 1
159
-
160
- After:
161
- Version: 1.0.2+45 (unchanged)
162
- iOS build: 46 (incremented from 45)
163
- ```
164
-
165
- ---
166
-
167
- ### Bump Android Build Only
168
-
169
- Increment only Android build number:
170
-
171
- ```bash
172
- optikit bump-android
173
- ```
174
-
175
- **What it does:**
176
-
177
- - Keeps version unchanged
178
- - Keeps iOS build number unchanged
179
- - Increments Android build number
180
- - Perfect for Google Play uploads
181
-
182
- **Example:**
183
-
184
- ```text
185
- Before: 1.0.2+45 (iOS: 1)
186
- After: 1.0.2+46 (iOS: 1 unchanged)
187
- ```
188
-
189
- ---
190
-
191
- ### Bump Both Build Numbers
192
-
193
- Increment both Android and iOS build numbers:
194
-
195
- ```bash
196
- optikit bump-build
197
- ```
198
-
199
- **What it does:**
200
-
201
- - Keeps version unchanged
202
- - Increments Android build number
203
- - Increments iOS build number
204
- - Perfect for simultaneous Android and iOS releases
205
-
206
- **Example:**
207
-
208
- ```text
209
- Before: 1.0.2+45 (iOS: 3)
210
- After: 1.0.2+46 (iOS: 4)
211
- ```
212
-
213
- ---
214
-
215
- ## Build Commands
216
-
217
- All build commands support FVM and create automatic backups.
218
-
219
- ### Build Flutter APK for Release
220
-
221
- By default, the build command will use FVM for Flutter commands:
222
-
223
- ```bash
224
- optikit flutter-build-apk
225
- ```
226
-
227
- To run the build command without FVM, use the `--disable-fvm` flag:
228
-
229
- ```bash
230
- optikit flutter-build-apk --disable-fvm
231
- ```
232
-
233
- ---
234
-
235
- ### Build Flutter Bundle for Release
236
-
237
- By default, the build command will use FVM for Flutter commands:
238
-
239
- ```bash
240
- optikit flutter-build-bundle
241
- ```
242
-
243
- To run the build command without FVM, use the `--disable-fvm` flag:
244
-
245
- ```bash
246
- optikit flutter-build-bundle --disable-fvm
247
- ```
248
-
249
- ---
250
-
251
- ### Build Flutter iOS App for Release
252
-
253
- By default, the build command will use FVM for Flutter commands:
254
-
255
- ```bash
256
- optikit flutter-build-ios
257
- ```
258
-
259
- To run the build command without FVM, use the `--disable-fvm` flag:
260
-
261
- ```bash
262
- optikit flutter-build-ios --disable-fvm
263
- ```
264
-
265
- ---
266
-
267
- ### Create a Release IPA for Flutter App
268
-
269
- By default, the build command will use FVM for Flutter commands:
270
-
271
- ```bash
272
- optikit flutter-build-ipa
273
- ```
274
-
275
- To run the build command without FVM, use the `--disable-fvm` flag:
276
-
277
- ```bash
278
- optikit flutter-build-ipa --disable-fvm
279
- ```
280
-
281
- ---
282
-
283
- ## Clean Commands
284
-
285
- ### Clean Flutter Project
286
-
287
- By default, the clean command will use FVM for Flutter commands:
288
-
289
- ```bash
290
- optikit clean-flutter
291
- ```
292
-
293
- To run the clean command without FVM, use the `--disable-fvm` flag:
294
-
295
- ```bash
296
- optikit clean-flutter --disable-fvm
297
- ```
298
-
299
- ---
300
-
301
- ### Clean the iOS Project
302
-
303
- By default, the clean command will not clean CocoaPods cache:
304
-
305
- ```bash
306
- optikit clean-ios
307
- ```
308
-
309
- To clean with CocoaPods cache, use the `--clean-cache` flag:
310
-
311
- ```bash
312
- optikit clean-ios --clean-cache
313
- ```
314
-
315
- To update repositories during cleaning, use the `--repo-update` flag:
316
-
317
- ```bash
318
- optikit clean-ios --repo-update
319
- ```
320
-
321
- ---
322
-
323
- ## Project Commands
324
-
325
- ### Generate a New Module
326
-
327
- To generate a new module, run:
328
-
329
- ```bash
330
- optikit generate module <module_name>
331
- ```
332
-
333
- Replace `<module_name>` with the desired name for your module.
334
-
335
- ---
336
-
337
- ### Open Android Project in Android Studio
338
-
339
- Open the Android module of your Flutter project in Android Studio:
340
-
341
- ```bash
342
- optikit open-android
343
- ```
344
-
345
- ---
346
-
347
- ### Open iOS Project in Xcode
348
-
349
- Open the iOS module of your Flutter project in Xcode:
350
-
351
- ```bash
352
- optikit open-ios
353
- ```
354
-
355
- ---
356
-
357
- ### Open Build Output Directories
358
-
359
- Quickly access your build artifacts in Finder (macOS), File Explorer (Windows), or your default file manager (Linux).
360
-
361
- **Open IPA build output:**
362
-
363
- ```bash
364
- optikit open-ipa
365
- ```
366
-
367
- Opens: `build/ios/ipa/`
368
-
369
- **Open APK build output:**
370
-
371
- ```bash
372
- optikit open-apk
373
- ```
374
-
375
- Opens: `build/app/outputs/flutter-apk/`
376
-
377
- **Open Android Bundle build output:**
378
-
379
- ```bash
380
- optikit open-bundle
381
- ```
382
-
383
- Opens: `build/app/outputs/bundle/release/`
384
-
385
- **What it does:**
386
-
387
- - Validates that you're in a Flutter project
388
- - Checks if the build output directory exists
389
- - Opens the directory in your system's default file manager
390
- - Works cross-platform (macOS, Windows, Linux)
391
-
392
- **Note:** You must build the respective artifact first before opening its output directory.
393
-
394
- ---
395
-
396
- ### VS Code Setup Command
397
-
398
- Automatically create a `.vscode` folder with a `settings.json` file preconfigured for Flutter projects using FVM. This command streamlines your project setup by setting the Flutter SDK path to `.fvm/flutter_sdk`.
399
-
400
- ```bash
401
- optikit setup-vscode
402
- ```
403
-
404
- ---
405
-
406
- ## Verification
407
-
408
- After running any command, you can verify its success by observing the output or using the `optikit --version` command to confirm the CLI's version.
409
-
410
- ---
411
-
412
- Enjoy using **OptiKit CLI** to enhance your development workflow!