{
  "markdown": "<h1 align=\"center\">🚀 OptiKit CLI</h1>\n\n<p align=\"center\">\n  <strong>Build, version, and deploy Flutter apps in one CLI.</strong><br/>\n  The command-line toolkit for Flutter & Opticore developers.\n</p>\n\n<p align=\"center\">\n  <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>\n  <a href=\"https://flutter.dev\"><img src=\"https://img.shields.io/badge/Flutter-Compatible-02569B?style=flat-square&logo=flutter&logoColor=white\" alt=\"Flutter\"/></a>\n  <a href=\"https://claude.com/plugins/optikit\"><img src=\"https://img.shields.io/badge/Claude%20Code-Plugin-blueviolet?style=flat-square\" alt=\"Claude Code Plugin\"/></a>\n  <img src=\"https://img.shields.io/badge/MCP-Supported-orange?style=flat-square\" alt=\"MCP Supported\"/>\n  <img src=\"https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square\" alt=\"Platform\"/>\n  <a href=\"https://pub.dev/packages/opticore\"><img src=\"https://img.shields.io/badge/Opticore-pub.dev-teal?style=flat-square\" alt=\"Opticore\"/></a>\n  <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>\n  <a href=\"./LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-yellow?style=flat-square\" alt=\"License\"/></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.buymeacoffee.com/m.elshenawy\">\n    <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\"/>\n  </a>\n</p>\n\n---\n\n## ⚡ Install & Go\n\n```bash\nnpm install -g optikit\n```\n\nYou get two commands — `optikit` (full name) and `ok` (shorthand). Both work identically.\n\n```bash\noptikit init                    # 🔧 Setup OptiKit in your project\noptikit bump patch              # 📦 1.0.0 → 1.0.1\noptikit apk                     # 🏗️ Build release APK\noptikit tf -o                   # 🚀 TestFlight: bump iOS + build IPA + open\noptikit gen module login -r     # 🧩 Generate BLoC module with route\noptikit aliases                 # 📋 See all shortcuts\n```\n\n> 💡 Prefer shorter commands? Use `ok` instead of `optikit` — every example above works with both.\n\n---\n\n## 🔥 Why OptiKit?\n\n| Feature | Description |\n|---------|-------------|\n| 🤖 **Claude Code Plugin** | AI understands your project and acts on it via MCP |\n| ✅ **Short aliases** | Every command has a memorable shortcut |\n| ✅ **Combo flags** | Clean, bump, build, and open in one command |\n| ✅ **Smart versioning** | Dual iOS/Android build numbers handled automatically |\n| ✅ **Auto backups** | Version files backed up before every change |\n| ✅ **Module scaffolding** | Full BLoC pattern generated in one command |\n| ✅ **FVM support** | Built-in Flutter Version Manager integration |\n\n---\n\n## 📖 Commands at a Glance\n\n> Every command has a short alias. Run `optikit aliases` to see the full list in your terminal.\n\n### 🏗️ Build\n\n| Command | Alias | What it does |\n|---------|-------|-------------|\n| `optikit flutter-build-apk` | `apk` | Build release APK |\n| `optikit flutter-build-bundle` | `aab` | Build release AAB |\n| `optikit flutter-build-ios` | `ios` | Build iOS app |\n| `optikit flutter-build-ipa` | `ipa` | Build release IPA |\n| `optikit testflight` | `tf` | Bump iOS build + build IPA |\n\n**Combo flags** — mix and match on any build command:\n\n```bash\noptikit apk --clean             # 🧹 Clean → build\noptikit ipa -b patch -o         # 📦 Bump → build → open output\noptikit ipa --clean -i -o       # 🧹 Clean → bump iOS → build → open\noptikit tf -o                   # 🚀 TestFlight → open output\n```\n\n### 🧹 Clean\n\n| Command | Alias | What it does |\n|---------|-------|-------------|\n| `optikit clean` | `c` | Clean Flutter project |\n| `optikit clean-flutter` | `cf` | Clean Flutter (explicit) |\n| `optikit clean-ios` | `ci` | Clean iOS / CocoaPods |\n\n```bash\noptikit clean -a                # Clean all (Flutter + iOS)\noptikit ci -cu                  # Clean iOS + cache + repo update\n```\n\n### 📦 Version\n\n| Command | Alias | What it does |\n|---------|-------|-------------|\n| `optikit version` | `v` | Show current version |\n| `optikit bump patch` | | Bug fix: 1.0.0 → 1.0.1 |\n| `optikit bump minor` | | Feature: 1.0.0 → 1.1.0 |\n| `optikit bump major` | | Breaking: 1.0.0 → 2.0.0 |\n| `optikit bump-ios` | `bi` | Bump iOS build only |\n| `optikit bump-android` | `ba` | Bump Android build only |\n| `optikit bump-build` | `bb` | Bump both build numbers |\n\n> 📘 Deep dive: **[Version Management](docs/VERSION_MANAGEMENT.md)**\n\n### 🧩 Generate\n\n```bash\noptikit gen module login        # Scaffold BLoC module\noptikit gen module login -r     # Scaffold + register route\noptikit gen repo user           # Generate repository\noptikit route settings          # Add route to app_router.dart\n```\n\n### 📱 Run & Open\n\n```bash\noptikit run                     # Run app on device\noptikit rs                      # Interactive device picker\noptikit devs                    # List connected devices\noptikit xcode                   # Open in Xcode\noptikit studio                  # Open in Android Studio\n```\n\n### 🔧 Tools\n\n```bash\noptikit info                    # Project status snapshot\noptikit dr                      # Environment health check\noptikit undo                    # List/restore backups\noptikit up                      # Check for CLI updates\noptikit vscode                  # Setup VS Code settings\n```\n\n---\n\n## 🎯 Common Workflows\n\n```bash\n# 🚀 TestFlight upload\noptikit tf -o\n\n# 📦 Release APK with version bump\noptikit apk -b patch -o\n\n# 🧹 Full clean rebuild\noptikit ipa --clean -o\n\n# 🧩 New feature module\noptikit gen module user_profile -r\n\n# 🔍 Check project state\noptikit info\n```\n\n---\n\n## ⚙️ Configuration\n\n```bash\noptikit init                    # Creates .optikitrc.json\n```\n\n```json\n{\n  \"backupRetentionCount\": 5,\n  \"useFvmByDefault\": true,\n  \"autoBackup\": true\n}\n```\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| `backupRetentionCount` | `5` | Number of backups to keep per file |\n| `useFvmByDefault` | `true` | Use FVM for all Flutter commands |\n| `autoBackup` | `true` | Backup files before version changes |\n\n---\n\n## 💾 Backups & Rollback\n\nOptiKit **automatically backs up** version files before any modification:\n\n| File | Backed up before |\n|------|-----------------|\n| `pubspec.yaml` | Version bumps, clean |\n| `ios/Runner.xcodeproj/project.pbxproj` | Version bumps |\n| `ios/Runner/Info.plist` | Version bumps |\n\nBackups are stored in `.optikit-backup/` directories next to the original files with timestamps:\n\n```\nyour-project/\n├── pubspec.yaml\n├── .optikit-backup/\n│   ├── pubspec_2026-03-25T10-30-00-000Z.yaml\n│   └── pubspec_2026-03-25T11-15-30-000Z.yaml\n└── ios/Runner.xcodeproj/\n    ├── project.pbxproj\n    └── .optikit-backup/\n        └── project_2026-03-25T10-30-00-000Z.pbxproj\n```\n\n**Manage backups:**\n\n```bash\noptikit undo                    # 📋 List all backups\noptikit undo --restore 1        # ♻️ Restore backup #1\noptikit undo --before 2026-03-20  # 📅 Filter backups by date\n```\n\nOld backups are automatically cleaned up (keeps last 5 by default, configurable via `backupRetentionCount`).\n\n> 💡 `.optikit-backup/` is added to `.gitignore` during `optikit init`.\n\n---\n\n## 🤖 AI-Powered with Claude Code\n\nOptiKit ships as a **Claude Code plugin** powered by the **Model Context Protocol (MCP)**. Claude doesn't just run commands — it **understands your Flutter project** and makes intelligent decisions.\n\n### 🧠 How It Works\n\nYou describe what you need. Claude **picks the right tools automatically**:\n\n| You say | Claude does |\n|---------|-----------|\n| *\"Fix this build error\"* | Runs `clean` → `build` automatically |\n| *\"Prepare a TestFlight build\"* | Runs `testflight` (bump iOS + build IPA) |\n| *\"Create a login feature\"* | Generates BLoC module + registers route |\n| *\"We need to release v2.0\"* | Bumps major version + builds both platforms |\n| *\"What version are we on?\"* | Shows version with iOS & Android build numbers |\n| *\"Undo the last version bump\"* | Lists backups and restores the right one |\n\n### ⚡ Setup in Seconds\n\n**Option 1 — Plugin Marketplace:**\n```bash\n/plugin marketplace add dev-mahmoud-elshenawy/optikit\n/plugin install optikit\n```\n\n**Option 2 — One Command:**\n```bash\noptikit setup-claude\n```\n\nThat's it. All OptiKit tools are instantly available to Claude.\n\n### 🛠️ Available Tool Categories\n\n| Category | What Claude can do |\n|----------|--------------------|\n| 🏗️ **Build** | Build APK, AAB, iOS, IPA with clean/bump/open combos |\n| 🧹 **Clean** | Fix stale caches, CocoaPods issues, full project cleanup |\n| 📦 **Version** | Bump versions, manage iOS/Android build numbers independently |\n| 🧩 **Generate** | Scaffold BLoC modules, repositories, and auto-register routes |\n| 📱 **Run** | Launch app on devices, list connected devices |\n| 🔧 **Diagnostics** | Health checks, project status, backup management |\n| ⚙️ **Config** | Project setup, VS Code config, upgrade checks |\n\nThe MCP server runs locally via stdio — fast, private, no cloud dependency.\n\n```bash\noptikit setup-claude              # ✅ Register with Claude Code\noptikit setup-claude --uninstall  # ❌ Remove when needed\n```\n\n---\n\n## 📘 Documentation\n\n| Doc | Description |\n|-----|-------------|\n| 📖 **[Command Reference](docs/USAGE.md)** | All commands, flags, and examples |\n| 📦 **[Version Management](docs/VERSION_MANAGEMENT.md)** | iOS/Android dual build strategy |\n| 🔧 **[Installation Guide](docs/INSTALLATION.md)** | NPM, Homebrew, source install |\n| 🔍 **[Troubleshooting](docs/TROUBLESHOOT.md)** | Common issues and quick fixes |\n\n---\n\n## ⚡ Supercharge Development with Opticore\n\n**OptiKit CLI** is the companion tool for **[Opticore](https://pub.dev/packages/opticore)** — a lightweight BLoC-based micro-framework for Flutter.\n\n| Together they give you | |\n|---|---|\n| 🧩 **Module scaffolding** | Generate full BLoC modules that plug directly into Opticore |\n| 🛣️ **Auto-routing** | Register routes in `app_router.dart` with one flag |\n| 🏗️ **App initialization** | Scaffold `main.dart`, config, and router for Opticore projects |\n| 📦 **Smart builds** | Build, version, and clean with short commands and combo flags |\n\n> 💡 **Not using Opticore?** No problem — build, version, clean, and run commands work with **any Flutter project**.\n\n---\n\n## 👤 Created By\n\n<div align=\"center\">\n\n### Built with ❤️ by [Mahmoud El Shenawy](https://github.com/dev-mahmoud-elshenawy)\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?logo=linkedin&logoColor=white&style=for-the-badge)](https://www.linkedin.com/in/dev-mahmoud-elshenawy)\n[![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white&style=for-the-badge)](https://github.com/dev-mahmoud-elshenawy)\n[![Medium](https://img.shields.io/badge/Medium-000000?logo=medium&logoColor=white&style=for-the-badge)](https://medium.com/@dev-mahmoud-elshenawy)\n\n</div>\n\n---\n\n## 📜 License\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](./LICENSE)\n\n**OptiKit** is open-source under the **[MIT License](./LICENSE)**. Free for personal and commercial use.\n",
  "bytes": 11226,
  "sha": "d9fe570ae1b69f25a12f9440fe9a17d70db4dfd0b7e367ac417ca07bdbc3ff19",
  "repo_slug": "dev-mahmoud-elshenawy/optikit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_dev_mahmoud_elshenawy_optikit_optikit_63102c08/readme"
}