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
@@ -0,0 +1,268 @@
1
+ <h1 align="center">OptiKit CLI</h1>
2
+
3
+ <p align="center">
4
+ <strong>The command-line toolkit for Flutter & Opticore developers.</strong><br/>
5
+ Build &middot; Version &middot; Clean &middot; Generate &middot; Ship
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/optikit"><img src="https://img.shields.io/npm/v/optikit?style=flat-square&color=cyan&label=npm" alt="npm"/></a>
10
+ <img src="https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square" alt="Platform"/>
11
+ <a href="https://pub.dev/packages/opticore"><img src="https://img.shields.io/badge/Opticore-pub.dev-teal?style=flat-square" alt="Opticore"/></a>
12
+ <a href="https://www.linkedin.com/in/dev-mahmoud-elshenawy/"><img src="https://img.shields.io/badge/Creator-Mahmoud%20El%20Shenawy-blue?style=flat-square" alt="Creator"/></a>
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow?style=flat-square" alt="License"/></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.buymeacoffee.com/m.elshenawy">
18
+ <img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support%20My%20Work-FFDD00?style=for-the-badge&logo=buymeacoffee&logoColor=0D1117" alt="Buy Me A Coffee"/>
19
+ </a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install -g optikit
28
+ ```
29
+
30
+ Then add one alias to your shell:
31
+
32
+ ```bash
33
+ echo 'alias ok="optikit"' >> ~/.zshrc && source ~/.zshrc
34
+ ```
35
+
36
+ Now every command starts with `ok`.
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ ok init # Setup OptiKit in your project
44
+ ok v # Show current version
45
+ ok bump patch # 1.0.0 -> 1.0.1
46
+ ok apk # Build release APK
47
+ ok ipa --clean -o # Clean, build IPA, open output
48
+ ok tf # TestFlight: bump iOS + build IPA
49
+ ok gen module login -r # Generate BLoC module with route
50
+ ok aliases # See all commands & shortcuts
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Commands
56
+
57
+ Every command has a **short alias**. Use whichever you prefer.
58
+
59
+ ### Build
60
+
61
+ | Alias | Command | What it does |
62
+ |-------|---------|-------------|
63
+ | `ok apk` | `flutter-build-apk` | Build release APK |
64
+ | `ok aab` | `flutter-build-bundle` | Build release AAB |
65
+ | `ok ios` | `flutter-build-ios` | Build iOS app |
66
+ | `ok ipa` | `flutter-build-ipa` | Build release IPA |
67
+ | `ok tf` | `testflight` | Bump iOS build + build IPA |
68
+
69
+ **Build flags** — combine freely:
70
+
71
+ | Flag | Short | What it does |
72
+ |------|-------|-------------|
73
+ | `--clean` | | Clean before building |
74
+ | `--open` | `-o` | Open output folder after build |
75
+ | `--bump <type>` | `-b` | Bump version before build (major/minor/patch) |
76
+ | `--bump-ios` | `-i` | Bump iOS build number before build (IPA only) |
77
+ | `--disable-fvm` | `-f` | Use global Flutter SDK |
78
+
79
+ ```bash
80
+ ok apk --clean # Clean + build APK
81
+ ok ipa -b patch -o # Bump patch + build IPA + open
82
+ ok ipa --clean -i -o # Clean + bump iOS + build IPA + open
83
+ ok tf -o # TestFlight + open output
84
+ ```
85
+
86
+ ### Clean
87
+
88
+ | Alias | Command | What it does |
89
+ |-------|---------|-------------|
90
+ | `ok c` | `clean` | Clean Flutter project |
91
+ | `ok cf` | `clean-flutter` | Clean Flutter (explicit) |
92
+ | `ok ci` | `clean-ios` | Clean iOS / CocoaPods |
93
+
94
+ ```bash
95
+ ok c -a # Clean Flutter + iOS (all)
96
+ ok ci -c # Clean iOS + clear cache
97
+ ok ci -u # Clean iOS + update repo
98
+ ok ci -cu # Clean iOS + cache + repo update
99
+ ```
100
+
101
+ ### Version & Bump
102
+
103
+ | Alias | Command | What it does |
104
+ |-------|---------|-------------|
105
+ | `ok v` | `version` | Show current version info |
106
+ | `ok bump patch` | `bump patch` | Bump patch (1.0.0 -> 1.0.1) |
107
+ | `ok bump minor` | `bump minor` | Bump minor (1.0.0 -> 1.1.0) |
108
+ | `ok bump major` | `bump major` | Bump major (1.0.0 -> 2.0.0) |
109
+ | `ok bi` | `bump-ios` | Bump iOS build number only |
110
+ | `ok ba` | `bump-android` | Bump Android build number only |
111
+ | `ok bb` | `bump-build` | Bump both build numbers |
112
+ | `ok vset` | `flutter-update-version` | Set version manually |
113
+
114
+ > Version bumps auto-backup files and update `pubspec.yaml` + iOS project files.
115
+ > See [Version Management](docs/VERSION_MANAGEMENT.md) for the full strategy.
116
+
117
+ ### Generate
118
+
119
+ | Alias | Command | What it does |
120
+ |-------|---------|-------------|
121
+ | `ok gen module <name>` | `generate module` | Scaffold BLoC module (bloc, event, state, screen, factory) |
122
+ | `ok gen repo <name>` | `generate repo` | Generate repository file |
123
+ | `ok route <name>` | `add-route` | Add route to `app_router.dart` |
124
+
125
+ ```bash
126
+ ok gen module login -r # Generate module + register route
127
+ ```
128
+
129
+ ### Run & Devices
130
+
131
+ | Alias | Command | What it does |
132
+ |-------|---------|-------------|
133
+ | `ok run` | `run` | Run app on connected device |
134
+ | `ok rs` | `run-select` | Interactive device picker |
135
+ | `ok devs` | `devices` | List connected devices |
136
+
137
+ ```bash
138
+ ok run -r # Run in release mode
139
+ ok run -d <device-id> # Run on specific device
140
+ ok rs -r # Pick device + release mode
141
+ ```
142
+
143
+ ### Open
144
+
145
+ | Alias | Command | What it does |
146
+ |-------|---------|-------------|
147
+ | `ok xcode` | `open-ios` | Open in Xcode |
148
+ | `ok studio` | `open-android` | Open in Android Studio |
149
+ | `ok open-ipa` | `open-ipa` | Open IPA output folder |
150
+ | `ok open-apk` | `open-apk` | Open APK output folder |
151
+ | `ok open-bundle` | `open-bundle` | Open AAB output folder |
152
+
153
+ > Tip: Use `ok ipa -o` or `ok apk -o` to build and open in one step.
154
+
155
+ ### Config & Tools
156
+
157
+ | Alias | Command | What it does |
158
+ |-------|---------|-------------|
159
+ | `ok init` | `init` | Initialize OptiKit config |
160
+ | `ok init-app` | `init-app` | Scaffold Opticore app structure |
161
+ | `ok vscode` | `setup-vscode` | Create VS Code Flutter settings |
162
+ | `ok undo` | `rollback` | List/restore file backups |
163
+ | `ok info` | `status` | Project status snapshot |
164
+ | `ok dr` | `doctor` | Check environment health |
165
+ | `ok up` | `upgrade` | Check for CLI updates |
166
+ | `ok aliases` | `aliases` | Show all aliases & shortcuts |
167
+
168
+ ---
169
+
170
+ ## Common Workflows
171
+
172
+ **Release an APK:**
173
+ ```bash
174
+ ok bump patch && ok apk # or: ok apk -b patch
175
+ ```
176
+
177
+ **TestFlight upload:**
178
+ ```bash
179
+ ok tf -o # Bump iOS + build IPA + open output
180
+ ```
181
+
182
+ **Full clean rebuild (iOS):**
183
+ ```bash
184
+ ok ipa --clean -o # Clean + build IPA + open
185
+ ```
186
+
187
+ **New module:**
188
+ ```bash
189
+ ok gen module user_profile -r # Generate + auto-route
190
+ ```
191
+
192
+ **Check everything:**
193
+ ```bash
194
+ ok info # Version, config, platforms
195
+ ok dr # Environment health check
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Configuration
201
+
202
+ Initialize with `ok init`. This creates `.optikitrc.json`:
203
+
204
+ ```json
205
+ {
206
+ "backupRetentionCount": 5,
207
+ "useFvmByDefault": true,
208
+ "autoBackup": true,
209
+ "verbose": false
210
+ }
211
+ ```
212
+
213
+ **FVM:** All Flutter commands use FVM by default. Disable per-command with `-f` or set `"useFvmByDefault": false` in config.
214
+
215
+ **Backups:** Version files are backed up automatically before changes. Use `ok undo` to list and restore.
216
+
217
+ ---
218
+
219
+ ## Tab Completion
220
+
221
+ ```bash
222
+ optikit completion >> ~/.zshrc
223
+ source ~/.zshrc
224
+ ```
225
+
226
+ Now press Tab to autocomplete commands and flags.
227
+
228
+ ---
229
+
230
+ ## Documentation
231
+
232
+ | Doc | What it covers |
233
+ |-----|---------------|
234
+ | **[Command Reference](docs/USAGE.md)** | All commands with flags and examples |
235
+ | **[Version Management](docs/VERSION_MANAGEMENT.md)** | Dual build number strategy, iOS/Android workflows |
236
+ | **[Installation](docs/INSTALLATION.md)** | NPM, Homebrew, and source install |
237
+
238
+ ---
239
+
240
+ ## Built for Opticore
241
+
242
+ OptiKit is the companion CLI for the **[Opticore](https://pub.dev/packages/opticore)** Flutter micro-framework. Module generation scaffolds the full BLoC pattern that Opticore expects.
243
+
244
+ Not using Opticore? OptiKit's build, version, and clean commands work with **any Flutter project**.
245
+
246
+ ---
247
+
248
+ ## Created By
249
+
250
+ <div align="center">
251
+
252
+ ### Built with love by [Mahmoud El Shenawy](https://github.com/dev-mahmoud-elshenawy)
253
+
254
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?logo=linkedin&logoColor=white&style=for-the-badge)](https://www.linkedin.com/in/dev-mahmoud-elshenawy)
255
+ [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white&style=for-the-badge)](https://github.com/dev-mahmoud-elshenawy)
256
+ [![Medium](https://img.shields.io/badge/Medium-000000?logo=medium&logoColor=white&style=for-the-badge)](https://medium.com/@dev-mahmoud-elshenawy)
257
+
258
+ </div>
259
+
260
+ ---
261
+
262
+ ## License
263
+
264
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](./LICENSE)
265
+
266
+ **OptiKit** is open-source software released under the **[MIT License](./LICENSE)**.
267
+
268
+ Free to use, modify, and distribute — in personal and commercial projects.
@@ -0,0 +1,268 @@
1
+ <h1 align="center">OptiKit CLI</h1>
2
+
3
+ <p align="center">
4
+ <strong>The command-line toolkit for Flutter & Opticore developers.</strong><br/>
5
+ Build &middot; Version &middot; Clean &middot; Generate &middot; Ship
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/optikit"><img src="https://img.shields.io/npm/v/optikit?style=flat-square&color=cyan&label=npm" alt="npm"/></a>
10
+ <img src="https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square" alt="Platform"/>
11
+ <a href="https://pub.dev/packages/opticore"><img src="https://img.shields.io/badge/Opticore-pub.dev-teal?style=flat-square" alt="Opticore"/></a>
12
+ <a href="https://www.linkedin.com/in/dev-mahmoud-elshenawy/"><img src="https://img.shields.io/badge/Creator-Mahmoud%20El%20Shenawy-blue?style=flat-square" alt="Creator"/></a>
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow?style=flat-square" alt="License"/></a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.buymeacoffee.com/m.elshenawy">
18
+ <img src="https://img.shields.io/badge/Buy%20Me%20A%20Coffee-Support%20My%20Work-FFDD00?style=for-the-badge&logo=buymeacoffee&logoColor=0D1117" alt="Buy Me A Coffee"/>
19
+ </a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install -g optikit
28
+ ```
29
+
30
+ Then add one alias to your shell:
31
+
32
+ ```bash
33
+ echo 'alias ok="optikit"' >> ~/.zshrc && source ~/.zshrc
34
+ ```
35
+
36
+ Now every command starts with `ok`.
37
+
38
+ ---
39
+
40
+ ## Quick Start
41
+
42
+ ```bash
43
+ ok init # Setup OptiKit in your project
44
+ ok v # Show current version
45
+ ok bump patch # 1.0.0 -> 1.0.1
46
+ ok apk # Build release APK
47
+ ok ipa --clean -o # Clean, build IPA, open output
48
+ ok tf # TestFlight: bump iOS + build IPA
49
+ ok gen module login -r # Generate BLoC module with route
50
+ ok aliases # See all commands & shortcuts
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Commands
56
+
57
+ Every command has a **short alias**. Use whichever you prefer.
58
+
59
+ ### Build
60
+
61
+ | Alias | Command | What it does |
62
+ |-------|---------|-------------|
63
+ | `ok apk` | `flutter-build-apk` | Build release APK |
64
+ | `ok aab` | `flutter-build-bundle` | Build release AAB |
65
+ | `ok ios` | `flutter-build-ios` | Build iOS app |
66
+ | `ok ipa` | `flutter-build-ipa` | Build release IPA |
67
+ | `ok tf` | `testflight` | Bump iOS build + build IPA |
68
+
69
+ **Build flags** — combine freely:
70
+
71
+ | Flag | Short | What it does |
72
+ |------|-------|-------------|
73
+ | `--clean` | | Clean before building |
74
+ | `--open` | `-o` | Open output folder after build |
75
+ | `--bump <type>` | `-b` | Bump version before build (major/minor/patch) |
76
+ | `--bump-ios` | `-i` | Bump iOS build number before build (IPA only) |
77
+ | `--disable-fvm` | `-f` | Use global Flutter SDK |
78
+
79
+ ```bash
80
+ ok apk --clean # Clean + build APK
81
+ ok ipa -b patch -o # Bump patch + build IPA + open
82
+ ok ipa --clean -i -o # Clean + bump iOS + build IPA + open
83
+ ok tf -o # TestFlight + open output
84
+ ```
85
+
86
+ ### Clean
87
+
88
+ | Alias | Command | What it does |
89
+ |-------|---------|-------------|
90
+ | `ok c` | `clean` | Clean Flutter project |
91
+ | `ok cf` | `clean-flutter` | Clean Flutter (explicit) |
92
+ | `ok ci` | `clean-ios` | Clean iOS / CocoaPods |
93
+
94
+ ```bash
95
+ ok c -a # Clean Flutter + iOS (all)
96
+ ok ci -c # Clean iOS + clear cache
97
+ ok ci -u # Clean iOS + update repo
98
+ ok ci -cu # Clean iOS + cache + repo update
99
+ ```
100
+
101
+ ### Version & Bump
102
+
103
+ | Alias | Command | What it does |
104
+ |-------|---------|-------------|
105
+ | `ok v` | `version` | Show current version info |
106
+ | `ok bump patch` | `bump patch` | Bump patch (1.0.0 -> 1.0.1) |
107
+ | `ok bump minor` | `bump minor` | Bump minor (1.0.0 -> 1.1.0) |
108
+ | `ok bump major` | `bump major` | Bump major (1.0.0 -> 2.0.0) |
109
+ | `ok bi` | `bump-ios` | Bump iOS build number only |
110
+ | `ok ba` | `bump-android` | Bump Android build number only |
111
+ | `ok bb` | `bump-build` | Bump both build numbers |
112
+ | `ok vset` | `flutter-update-version` | Set version manually |
113
+
114
+ > Version bumps auto-backup files and update `pubspec.yaml` + iOS project files.
115
+ > See [Version Management](docs/VERSION_MANAGEMENT.md) for the full strategy.
116
+
117
+ ### Generate
118
+
119
+ | Alias | Command | What it does |
120
+ |-------|---------|-------------|
121
+ | `ok gen module <name>` | `generate module` | Scaffold BLoC module (bloc, event, state, screen, factory) |
122
+ | `ok gen repo <name>` | `generate repo` | Generate repository file |
123
+ | `ok route <name>` | `add-route` | Add route to `app_router.dart` |
124
+
125
+ ```bash
126
+ ok gen module login -r # Generate module + register route
127
+ ```
128
+
129
+ ### Run & Devices
130
+
131
+ | Alias | Command | What it does |
132
+ |-------|---------|-------------|
133
+ | `ok run` | `run` | Run app on connected device |
134
+ | `ok rs` | `run-select` | Interactive device picker |
135
+ | `ok devs` | `devices` | List connected devices |
136
+
137
+ ```bash
138
+ ok run -r # Run in release mode
139
+ ok run -d <device-id> # Run on specific device
140
+ ok rs -r # Pick device + release mode
141
+ ```
142
+
143
+ ### Open
144
+
145
+ | Alias | Command | What it does |
146
+ |-------|---------|-------------|
147
+ | `ok xcode` | `open-ios` | Open in Xcode |
148
+ | `ok studio` | `open-android` | Open in Android Studio |
149
+ | `ok open-ipa` | `open-ipa` | Open IPA output folder |
150
+ | `ok open-apk` | `open-apk` | Open APK output folder |
151
+ | `ok open-bundle` | `open-bundle` | Open AAB output folder |
152
+
153
+ > Tip: Use `ok ipa -o` or `ok apk -o` to build and open in one step.
154
+
155
+ ### Config & Tools
156
+
157
+ | Alias | Command | What it does |
158
+ |-------|---------|-------------|
159
+ | `ok init` | `init` | Initialize OptiKit config |
160
+ | `ok init-app` | `init-app` | Scaffold Opticore app structure |
161
+ | `ok vscode` | `setup-vscode` | Create VS Code Flutter settings |
162
+ | `ok undo` | `rollback` | List/restore file backups |
163
+ | `ok info` | `status` | Project status snapshot |
164
+ | `ok dr` | `doctor` | Check environment health |
165
+ | `ok up` | `upgrade` | Check for CLI updates |
166
+ | `ok aliases` | `aliases` | Show all aliases & shortcuts |
167
+
168
+ ---
169
+
170
+ ## Common Workflows
171
+
172
+ **Release an APK:**
173
+ ```bash
174
+ ok bump patch && ok apk # or: ok apk -b patch
175
+ ```
176
+
177
+ **TestFlight upload:**
178
+ ```bash
179
+ ok tf -o # Bump iOS + build IPA + open output
180
+ ```
181
+
182
+ **Full clean rebuild (iOS):**
183
+ ```bash
184
+ ok ipa --clean -o # Clean + build IPA + open
185
+ ```
186
+
187
+ **New module:**
188
+ ```bash
189
+ ok gen module user_profile -r # Generate + auto-route
190
+ ```
191
+
192
+ **Check everything:**
193
+ ```bash
194
+ ok info # Version, config, platforms
195
+ ok dr # Environment health check
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Configuration
201
+
202
+ Initialize with `ok init`. This creates `.optikitrc.json`:
203
+
204
+ ```json
205
+ {
206
+ "backupRetentionCount": 5,
207
+ "useFvmByDefault": true,
208
+ "autoBackup": true,
209
+ "verbose": false
210
+ }
211
+ ```
212
+
213
+ **FVM:** All Flutter commands use FVM by default. Disable per-command with `-f` or set `"useFvmByDefault": false` in config.
214
+
215
+ **Backups:** Version files are backed up automatically before changes. Use `ok undo` to list and restore.
216
+
217
+ ---
218
+
219
+ ## Tab Completion
220
+
221
+ ```bash
222
+ optikit completion >> ~/.zshrc
223
+ source ~/.zshrc
224
+ ```
225
+
226
+ Now press Tab to autocomplete commands and flags.
227
+
228
+ ---
229
+
230
+ ## Documentation
231
+
232
+ | Doc | What it covers |
233
+ |-----|---------------|
234
+ | **[Command Reference](docs/USAGE.md)** | All commands with flags and examples |
235
+ | **[Version Management](docs/VERSION_MANAGEMENT.md)** | Dual build number strategy, iOS/Android workflows |
236
+ | **[Installation](docs/INSTALLATION.md)** | NPM, Homebrew, and source install |
237
+
238
+ ---
239
+
240
+ ## Built for Opticore
241
+
242
+ OptiKit is the companion CLI for the **[Opticore](https://pub.dev/packages/opticore)** Flutter micro-framework. Module generation scaffolds the full BLoC pattern that Opticore expects.
243
+
244
+ Not using Opticore? OptiKit's build, version, and clean commands work with **any Flutter project**.
245
+
246
+ ---
247
+
248
+ ## Created By
249
+
250
+ <div align="center">
251
+
252
+ ### Built with ❤️ by [Mahmoud El Shenawy](https://github.com/dev-mahmoud-elshenawy)
253
+
254
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?logo=linkedin&logoColor=white&style=for-the-badge)](https://www.linkedin.com/in/dev-mahmoud-elshenawy)
255
+ [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white&style=for-the-badge)](https://github.com/dev-mahmoud-elshenawy)
256
+ [![Medium](https://img.shields.io/badge/Medium-000000?logo=medium&logoColor=white&style=for-the-badge)](https://medium.com/@dev-mahmoud-elshenawy)
257
+
258
+ </div>
259
+
260
+ ---
261
+
262
+ ## License
263
+
264
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](./LICENSE)
265
+
266
+ **OptiKit** is open-source software released under the **[MIT License](./LICENSE)**.
267
+
268
+ Free to use, modify, and distribute — in personal and commercial projects.