flx_cli 1.0.0 copy "flx_cli: ^1.0.0" to clipboard
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.json configuration file
    • Customizable state manager selection
    • Toggleable Freezed/Equatable usage
    • Author name configuration

๐Ÿ› ๏ธ Commands

  • flx config init - Initialize configuration file
  • flx config state-manager <type> - Set default state manager (getx/bloc)
  • flx gen feature <name> - Generate complete feature with all layers
  • flx gen model <name> - Generate data model
  • flx gen screen <name> - Generate screen with state management
  • flx gen usecase <name> - Generate use case
  • flx 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 parsing
  • path: ^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
1
likes
140
points
53
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A powerful Flutter Clean Architecture CLI tool for generating scalable project structures with GetX/BLoC state management, Freezed models, and comprehensive boilerplate code.

Repository (GitHub)
View/report issues

Topics

#flutter #cli #clean-architecture #code-generation #scaffolding

License

MIT (license)

Dependencies

args, path

More

Packages that depend on flx_cli