Make

GEXD

πŸ“ Description

Generate various project files and components. The make command is the primary code generation tool in Gexd CLI, offering powerful scaffolding capabilities for Flutter projects with GetX and Clean Architecture patterns.


βš™οΈ Usage


πŸ“š Available Subcommands

πŸ—οΈ Core Components

Description: Generate complete screen components (controller, view, binding)

Description: Generate controller files for state management

Description: Generate view files (UI components)

Description: Generate binding files for dependency injection


πŸ“Š Data Layer

Description: Generate type-safe model files from JSON sources with advanced features

Description: Generate repository files for data access layers

Description: Generate service files for business logic

Description: Generate provider files for data sources


πŸ›οΈ Architecture Components

Description: Generate entity files for domain layer

Description: Generate interface files for contracts and abstractions

Description: Generate custom exception classes

Description: Generate middleware files for request/response handling


πŸ› οΈ Utility Components

Description: Generate reusable widget components

Description: Generate utility helper classes

Description: Generate constant definition files


🎯 Command Categories

πŸ“± UI Components

  • screen - Complete screen with controller, view, binding

  • view - UI view components

  • widget - Reusable widget components

πŸ”§ State Management

  • controller - State controllers

  • binding - Dependency injection bindings

  • middleware - Request/response middleware

πŸ“Š Data Management

  • model - Data models with serialization

  • repository - Data access repositories

  • service - Business logic services

  • provider - Data source providers

πŸ—οΈ Architecture

  • entity - Domain entities

  • interface - Contract abstractions

  • exception - Custom exceptions

πŸ› οΈ Utilities

  • util - Helper utilities

  • constant - Application constants


πŸš€ Common Usage Patterns

πŸ“± Complete Feature Generation

πŸ—οΈ Clean Architecture Setup

πŸ“Š API Integration Workflow


βš™οΈ Global Options

Most make subcommands support these common options:

πŸ“ Organization

  • --on <path> - Specify subdirectory for generated files

  • --force - Force overwrite existing files without prompting

🎨 Customization

  • --type <type> - Specify component type/style

  • --template <template> - Choose generation template

  • --style <style> - Select code generation style

πŸ”§ Features

  • --interface - Generate with interface abstraction

  • --immutable - Create immutable data structures

  • --copyWith - Add copy methods for state updates


πŸ’‘ Pro Tips

🎯 Best Practices

  1. Start with Architecture: Generate entities and interfaces first

  2. Use --on for Organization: Keep related files in subdirectories

  3. Enable Interfaces: Use --interface for better testability

  4. Force During Development: Use --force for rapid iteration

πŸš€ Efficiency Tips

  1. Batch Generation: Generate related components together

  2. Template Reuse: Save commonly used flag combinations

  3. API-First Development: Generate models from live APIs

  4. Relationship Management: Use --relationships-in-folder for complex models

πŸ”§ Advanced Workflows

  1. Feature-Based: Group components by feature using --on

  2. Layer-Based: Organize by architectural layers

  3. Test-Driven: Generate interfaces first for better testing

  4. Iterative: Start simple, add features with --force


For detailed documentation on each subcommand, click the links above or visit:


Generated automatically by gexd_doc

Last updated