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