flutter_enterprise_cli 1.1.3 copy "flutter_enterprise_cli: ^1.1.3" to clipboard
flutter_enterprise_cli: ^1.1.3 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

Create project with specific state management #

flutter_enterprise_cli create my_app --state riverpod --flavors dev,prod

Add CI/CD to Existing Project #

Run inside your Flutter project:

flutter_enterprise_cli ci

Generate a ready-to-use Bloc page module #

Run inside your Flutter project:

flutter_enterprise_cli page <page_name>

Generated structure: #

presentation/pages/login
├── login_page.dart
├── model
│    └── login_model.dart
└── bloc
├── login_bloc.dart
├── login_event.dart
└── login_state.dart

Generate Page with Model #

flutter_enterprise_cli page <page_name> json

Api Testing via CLI #

flutter_enterprise_cli api test

API Test Features #

This allows:
Testing API endpoints
Viewing formatted responses
Generating Dart models from API JSON

Example CLI Flow #

flutter_enterprise_cli api test
Enter API URL:
https://dev-api.example.com/Account/login
HTTP Method (GET/POST/PUT/DELETE):
POST

📦 Headers loaded from user project:
Content-Type : application/json
UtcOffsetInSecond : 19800
AppVersion : 1
DeviceTypeId : 1
LanguageCode : en

Enter extra headers JSON (optional, press ENTER twice to skip):


Enter Request JSON (press ENTER twice to finish):
{
"email":"test@yopmail.com",
"password":"Test@123",
"deviceToken":"",
"deviceType":1,
"userType":1,
"rememberMe":false
}


📡 Calling API...

✅ Server Message:
Success

📦 Full Response:
{
"data": {
"userId": 1518,
"firstName": "ravi",
"lastName": "singh",
"email": "ravi@yopmail.com",
"profileImage": null,
"authorizationToken": "",
"accessToken": "",
"userType": 2
},
"message": "Success",
"apiName": "Login"
}

Generate module from this response? (y/n)
y
Enter module name:
login

Generated model: #

class LoginModel {
    final LoginData? data;
    final String? message;
    final String? apiName;
    
    LoginModel({
        this.data,
        this.message,
        this.apiName,
    });

factory LoginModel.fromJson(Map<String, dynamic> json) {
return LoginModel(
    data: json['data'] != null ? LoginData.fromJson(json['data']) : null,
    message: json['message'],
    apiName: json['apiName'],
        );
    }
}

class LoginData {
    final int? userId;
    final String? firstName;
    final String? lastName;
    final String? email;
    final dynamic? profileImage;
    final String? authorizationToken;
    final String? accessToken;
    final int? userType;

LoginData({
    this.userId,
    this.firstName,
    this.lastName,
    this.email,
    this.profileImage,
    this.authorizationToken,
    this.accessToken,
    this.userType,
});

factory LoginData.fromJson(Map<String, dynamic> json) {
return LoginData(
    userId: json['userId'],
    firstName: json['firstName'],
    lastName: json['lastName'],
    email: json['email'],
    profileImage: json['profileImage'],
    authorizationToken: json['authorizationToken'],
    accessToken: json['accessToken'],
    userType: json['userType'],
    );
    }
}

Add Re-usable UI Widgets Module #

Run inside your Flutter project:

flutter_enterprise_cli add ui

Example generated file: #

lib/presentation/widgets/example_button.dart

Generate Ready to use Networking Module for api calling #

Run inside your Flutter project:

flutter_enterprise_cli add network

Example usage: #

final response = await ApiService.client.post(
ApiEndpoints.login,
    data: {
    "email": "test@email.com",
    "password": "123456"
    },
);
if (response.success) {
  print(response.data);
} else {
  print(response.message);
}

Generated structure: #

lib/core/network
├── api_client.dart
├── api_interceptor.dart
├── api_exception.dart
├── api_response.dart
├── api_endpoints.dart
└── network_info.dart

lib/core/config
└── app_config.dart

lib/core/services
└── api_service.dart

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/
 ├── 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

1
likes
0
points
293
downloads

Publisher

unverified uploader

Weekly Downloads

Enterprise-grade Flutter CLI tool for generating production-ready project scaffolding with clean architecture, multi-environment flavors, and CI/CD automation.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, equatable, flutter_bloc, http, path

More

Packages that depend on flutter_enterprise_cli