optikit 1.2.4 → 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 +79 -46
  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 -241
  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 +96 -82
  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 -362
  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 +124 -85
  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 -388
  104. package/VERSION_MANAGEMENT.md +0 -438
package/USAGE.md DELETED
@@ -1,388 +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
- ## Build Commands
192
-
193
- All build commands support FVM and create automatic backups.
194
-
195
- ### Build Flutter APK for Release
196
-
197
- By default, the build command will use FVM for Flutter commands:
198
-
199
- ```bash
200
- optikit flutter-build-apk
201
- ```
202
-
203
- To run the build command without FVM, use the `--disable-fvm` flag:
204
-
205
- ```bash
206
- optikit flutter-build-apk --disable-fvm
207
- ```
208
-
209
- ---
210
-
211
- ### Build Flutter Bundle for Release
212
-
213
- By default, the build command will use FVM for Flutter commands:
214
-
215
- ```bash
216
- optikit flutter-build-bundle
217
- ```
218
-
219
- To run the build command without FVM, use the `--disable-fvm` flag:
220
-
221
- ```bash
222
- optikit flutter-build-bundle --disable-fvm
223
- ```
224
-
225
- ---
226
-
227
- ### Build Flutter iOS App for Release
228
-
229
- By default, the build command will use FVM for Flutter commands:
230
-
231
- ```bash
232
- optikit flutter-build-ios
233
- ```
234
-
235
- To run the build command without FVM, use the `--disable-fvm` flag:
236
-
237
- ```bash
238
- optikit flutter-build-ios --disable-fvm
239
- ```
240
-
241
- ---
242
-
243
- ### Create a Release IPA for Flutter App
244
-
245
- By default, the build command will use FVM for Flutter commands:
246
-
247
- ```bash
248
- optikit flutter-build-ipa
249
- ```
250
-
251
- To run the build command without FVM, use the `--disable-fvm` flag:
252
-
253
- ```bash
254
- optikit flutter-build-ipa --disable-fvm
255
- ```
256
-
257
- ---
258
-
259
- ## Clean Commands
260
-
261
- ### Clean Flutter Project
262
-
263
- By default, the clean command will use FVM for Flutter commands:
264
-
265
- ```bash
266
- optikit clean-flutter
267
- ```
268
-
269
- To run the clean command without FVM, use the `--disable-fvm` flag:
270
-
271
- ```bash
272
- optikit clean-flutter --disable-fvm
273
- ```
274
-
275
- ---
276
-
277
- ### Clean the iOS Project
278
-
279
- By default, the clean command will not clean CocoaPods cache:
280
-
281
- ```bash
282
- optikit clean-ios
283
- ```
284
-
285
- To clean with CocoaPods cache, use the `--clean-cache` flag:
286
-
287
- ```bash
288
- optikit clean-ios --clean-cache
289
- ```
290
-
291
- To update repositories during cleaning, use the `--repo-update` flag:
292
-
293
- ```bash
294
- optikit clean-ios --repo-update
295
- ```
296
-
297
- ---
298
-
299
- ## Project Commands
300
-
301
- ### Generate a New Module
302
-
303
- To generate a new module, run:
304
-
305
- ```bash
306
- optikit generate module <module_name>
307
- ```
308
-
309
- Replace `<module_name>` with the desired name for your module.
310
-
311
- ---
312
-
313
- ### Open Android Project in Android Studio
314
-
315
- Open the Android module of your Flutter project in Android Studio:
316
-
317
- ```bash
318
- optikit open-android
319
- ```
320
-
321
- ---
322
-
323
- ### Open iOS Project in Xcode
324
-
325
- Open the iOS module of your Flutter project in Xcode:
326
-
327
- ```bash
328
- optikit open-ios
329
- ```
330
-
331
- ---
332
-
333
- ### Open Build Output Directories
334
-
335
- Quickly access your build artifacts in Finder (macOS), File Explorer (Windows), or your default file manager (Linux).
336
-
337
- **Open IPA build output:**
338
-
339
- ```bash
340
- optikit open-ipa
341
- ```
342
-
343
- Opens: `build/ios/ipa/`
344
-
345
- **Open APK build output:**
346
-
347
- ```bash
348
- optikit open-apk
349
- ```
350
-
351
- Opens: `build/app/outputs/flutter-apk/`
352
-
353
- **Open Android Bundle build output:**
354
-
355
- ```bash
356
- optikit open-bundle
357
- ```
358
-
359
- Opens: `build/app/outputs/bundle/release/`
360
-
361
- **What it does:**
362
-
363
- - Validates that you're in a Flutter project
364
- - Checks if the build output directory exists
365
- - Opens the directory in your system's default file manager
366
- - Works cross-platform (macOS, Windows, Linux)
367
-
368
- **Note:** You must build the respective artifact first before opening its output directory.
369
-
370
- ---
371
-
372
- ### VS Code Setup Command
373
-
374
- 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`.
375
-
376
- ```bash
377
- optikit setup-vscode
378
- ```
379
-
380
- ---
381
-
382
- ## Verification
383
-
384
- 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.
385
-
386
- ---
387
-
388
- Enjoy using **OptiKit CLI** to enhance your development workflow!