flutter_enterprise_cli 1.1.1
flutter_enterprise_cli: ^1.1.1 copied to clipboard
Enterprise-grade Flutter CLI tool for generating production-ready project scaffolding with clean architecture, multi-environment flavors, and CI/CD automation.
flutter_enterprise_cli #
Enterprise-grade Flutter CLI tool for generating production-ready project scaffolding with clean architecture, multi-environment flavors, and CI/CD automation.
✨ Features #
- 🏗 Clean Architecture folder structure
- 🔀 Android flavor automation (dev / prod)
- 🍎 iOS entrypoint configuration support
- 🚀 GitHub Actions CI/CD template (Enterprise-ready)
- 📦 Dev APK + Prod AAB builds
- 📱 Dev & Prod IPA generation (Signed or Unsigned)
- 🔐 Optional Android & iOS code signing support
- 🛑 Prevents nested project creation
- 🛡 Safe project overwrite protection
- ⚙ CLI-based architecture generation
- 🌍 Cross-platform support (Windows / macOS / Linux)
🚀 Installation #
Activate globally:
dart pub global activate flutter_enterprise_cli
⚙ If Command Not Found #
After activation, if you see:
flutter_enterprise_cli: command not found
You need to add Dart Pub Cache to your system PATH.
🪟 Windows #
Add this to Environment Variables:
%LOCALAPPDATA%\Pub\Cache\bin
Then restart your terminal.
🍎 macOS / 🐧 Linux #
Add this line to your ~/.zshrc or ~/.bashrc:
export PATH="$PATH:$HOME/.pub-cache/bin"
Then run:
source ~/.zshrc
🛠 Usage #
Create a new enterprise project #
flutter_enterprise_cli create my_app
Advanced Usage #
flutter_enterprise_cli create my_app --state bloc --flavors dev,prod
Add CI/CD to Existing Project #
Run inside your Flutter project:
flutter_enterprise_cli ci
Configure Flavors in Existing Project #
Run inside your Flutter project:
flutter_enterprise_cli flavors
🧠 Available State Management Options #
- bloc (default)
- riverpod
📂 Generated Project Structure #
lib/
├── core/
│ ├── config/
│ ├── network/
│ ├── services/
│ ├── constants/
│ └── utils/
├── data/
├── domain/
├── presentation/
├── routes/
├── app/
│ ├── app.dart
│ └── bootstrap.dart
├── main_dev.dart
└── main_prod.dart
🔀 Android Flavors #
Run example:
flutter run --flavor dev -t lib/main_dev.dart
🍎 iOS Support #
- Generates dev.xcconfig and prod.xcconfig
- Supports IPA generation in CI
- Uses unsigned IPA by default (--no-codesign)
- Automatically signs if secrets are configured
🔐 Optional Code Signing (CI Configuration) #
The generated CI workflow supports optional signing.
If secrets are not configured:
- Android builds will be unsigned
- iOS builds will use --no-codesign
- CI will NOT fail
🤖 Android Signing (Play Store Release) #
Add the following GitHub Repository Secrets:
ANDROID_KEYSTORE_BASE64
ANDROID_KEYSTORE_PASSWORD
ANDROID_KEY_ALIAS
ANDROID_KEY_PASSWORD
Convert Keystore to Base64 #
base64 release.keystore > keystore.txt
Copy the output into ANDROID_KEYSTORE_BASE64.
🍎 iOS Signing (App Store / TestFlight) #
Add the following GitHub Repository Secrets:
APPLE_CERTIFICATE_BASE64
APPLE_CERTIFICATE_PASSWORD
APPLE_PROVISION_PROFILE_BASE64
Convert Certificate to Base64 #
base64 certificate.p12 > cert.txt
Convert Provisioning Profile to Base64 #
base64 profile.mobileprovision > profile.txt
🚀 CI/CD Included #
Generated project includes:
- Android Dev APK
- Android Prod AAB
- iOS Dev IPA
- iOS Prod IPA
- Artifact uploads
- Flutter analyze step
- Gradle & Pub caching
- Java 17 setup
Workflow file:
.github/workflows/flutter_ci.yml
⚙ Requirements #
- Flutter 3.35.5+
- Dart SDK 3.5+
- macOS required for iOS builds
- GitHub Actions for CI/CD
📄 License #
MIT License