flx_cli 1.0.2 copy "flx_cli: ^1.0.2" to clipboard
flx_cli: ^1.0.2 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.2 - 2024-01-15 #

πŸ“š API Documentation #

  • Comprehensive Dartdoc Comments: Added detailed documentation for all public API elements
  • FlxCli Class: Complete documentation with usage examples and command descriptions
  • FileGenerator Class: Documented all public methods including generateFeature, generateScreen, generateModel, generateUseCase, generateRepository
  • TemplateGenerator Class: Added documentation for template generation methods and utility functions
  • ConfigModel Class: Documented configuration loading and JSON handling
  • Utility Methods: Added documentation for naming convention helpers (toCamelCase, toPascalCase, toSnakeCase)
  • String Extension: Documented the capitalize() helper method

πŸ”§ Code Quality Improvements #

  • Linter Rules: Added public_member_api_docs lint rule to enforce documentation coverage
  • Additional Rules: Added prefer_single_quotes and avoid_print for better code quality
  • pub.flutter-io.cn Score: Significantly improved documentation coverage from 0% to 20%+ for better pub.flutter-io.cn score

🎯 pub.flutter-io.cn Optimization #

  • API Coverage: Documented 20+ public API elements to meet pub.flutter-io.cn documentation requirements
  • Examples: Added comprehensive usage examples throughout the documentation
  • Type Safety: Improved parameter documentation with proper type annotations

1.0.1 - 2024-01-15 #

πŸ“ Documentation Updates #

  • README.md: Updated installation commands to use flx_cli package name
  • Documentation Site: Complete documentation available at https://flx-doc.netlify.app
  • Package References: All documentation updated to reflect correct package name
  • Installation Guide: Fixed all activation commands throughout documentation

πŸ”§ Package Updates #

  • Package Name: Changed from flx to flx_cli (original name was taken)
  • Import Statements: Updated all internal imports to use flx_cli
  • pub.flutter-io.cn Links: Updated badge and installation instructions

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
0
likes
140
points
30
downloads

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

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

args, path

More

Packages that depend on flx_cli