flx_cli 1.0.0 
flx_cli: ^1.0.0 copied to clipboard
A powerful Flutter Clean Architecture CLI tool for generating scalable project structures with GetX/BLoC state management, Freezed models, and comprehensive boilerplate code.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-01-15 #
π Initial Release #
β¨ Features
- Clean Architecture Generator: Complete Clean Architecture structure with data, domain, and presentation layers
 - State Management Support:
- GetX controllers with reactive state management
 - BLoC pattern with events, states, and business logic
 
 - Code Generation Integration:
- Freezed models for immutable data classes
 - Equatable support for value equality
 - JSON serialization with json_annotation
 
 - Feature Generation: Full feature generation with all architectural layers
 - Individual Component Generation:
- Models with Freezed/Equatable options
 - Repositories with implementation
 - Use cases for business logic
 - Screens with state management
 
 - Configuration System:
.flxrc.jsonconfiguration file- Customizable state manager selection
 - Toggleable Freezed/Equatable usage
 - Author name configuration
 
 
π οΈ Commands
flx config init- Initialize configuration fileflx config state-manager <type>- Set default state manager (getx/bloc)flx gen feature <name>- Generate complete feature with all layersflx gen model <name>- Generate data modelflx gen screen <name>- Generate screen with state managementflx gen usecase <name>- Generate use caseflx gen repository <name>- Generate repository
ποΈ Architecture
- Data Layer: Remote data sources, models, repository implementations
 - Domain Layer: Entities, repository contracts, use cases
 - Presentation Layer: Controllers/BLoC, bindings, pages
 
π¦ Dependencies
args: ^2.4.2- Command line argument parsingpath: ^1.9.0- File system path manipulation
π§ͺ Testing
- Comprehensive unit tests for CLI functionality
 - Template generation testing
 - Configuration management testing
 
π Documentation
- Complete getting started guide
 - Clean Architecture principles
 - State management comparisons
 - Configuration options
 - Best practices and naming conventions
 
π― Supported Patterns #
- GetX: Reactive state management with dependency injection
 - BLoC: Business Logic Component pattern with events and states
 - Freezed: Immutable data classes with copy semantics
 - Equatable: Value equality for entities and models
 
π§ Configuration Options #
{
  "useFreezed": true,
  "useEquatable": false,
  "defaultStateManager": "getx",
  "author": "Developer"
}
π Generated Structure Example #
lib/features/auth/
βββ data/
β   βββ datasources/auth_remote_data_source.dart
β   βββ models/auth_model.dart
β   βββ repositories/auth_repository_impl.dart
βββ domain/
β   βββ entities/auth_entity.dart
β   βββ repositories/auth_repository.dart
β   βββ usecases/auth_usecase.dart
βββ presentation/
    βββ bindings/auth_binding.dart
    βββ controllers/auth_controller.dart (GetX)
    βββ bloc/ (BLoC)
    β   βββ auth_bloc.dart
    β   βββ auth_event.dart
    β   βββ auth_state.dart
    βββ pages/auth_page.dart