rekeens_flutter_cli 0.26.3 copy "rekeens_flutter_cli: ^0.26.3" to clipboard
rekeens_flutter_cli: ^0.26.3 copied to clipboard

CLI tool for scaffolding Flutter applications with Feature-First Clean Architecture, Riverpod/BLoC, GoRouter, Dio, and modular code generators.

Rekeens Flutter CLI #

Production-ready Flutter scaffolding and code generation tool.
Built on Feature-First Clean Architecture, pre-configured state management (Riverpod / BLoC), typed models, and modular generators.

Pub Version Pub Points Dart SDK Version Flutter CI Status E2E Smoke License


Highlights #

  • Deterministic Scaffolding — Creates a runnable Flutter app with routing, theme tokens, error models, and networking pre-wired.
  • Feature-First Architecture — Enforces domain boundaries (data, domain, presentation) per business feature.
  • Typed Code Generators — Scaffolds features, screens, repositories, services, datasources, use cases, providers, and typed models with serialization.
  • State Management Adaptability — Auto-detects Riverpod (StateNotifier) or BLoC (Cubit) in the target project.
  • Presets and Configs — Predefined profiles (minimal, mobile, full) and team-wide defaults via rekeens.yaml.
  • Pre/Post Generation Hooks — Executes arbitrary shell commands (format, analyze, code generation) around CLI actions.
  • Environment Diagnostics — Built-in doctor command to inspect your local Flutter and Dart toolchain.

For complete specifications and template override guides, see the Technical Documentation.


Installation #

Activate globally via Dart:

dart pub global activate rekeens_flutter_cli

Verify the installation and check system prerequisites:

rekeens doctor

(Ensure your global pub cache bin directory is in your system PATH)


Quick Start #

1. Create a Project #

# Interactive wizard
rekeens create my_app

# Or use a preset
rekeens create my_app --preset=mobile

# Or use CLI flags
rekeens create my_app --state-management=riverpod --router=go_router --networking=dio --localization

Presets

Preset Platforms State Router Network Storage Localization Codegen
minimal android, ios None None None None No No
mobile android, ios Riverpod GoRouter Dio SharedPreferences Yes No
full android, ios, windows, linux, macos, web Riverpod GoRouter Dio SecureStorage Yes Yes (freezed, json_serializable)

2. Generate Components #

Inside your project directory, scaffold modular code using rekeens generate (or rekeens g):

# Generate a complete feature structure
rekeens g feature auth

# Generate a typed model with JSON serialization
rekeens g model auth user id:string name:string email:string? age:int createdAt:datetime \
  address:AddressModel? orders:List<OrderModel> role:enum Role metadata:Map<String, dynamic>

# Generate screen, repository, service, and state provider
rekeens g screen auth login
rekeens g repository auth user
rekeens g service auth api
rekeens g provider auth session

# Generate domain-layer entities and use cases
rekeens g entity auth user
rekeens g usecase auth login

# Generate a data source (interface + HTTP implementation)
rekeens g datasource auth user_api

The provider generator automatically detects whether your project uses Riverpod (generates StateNotifierProvider + StateNotifier + state class) or BLoC (generates Cubit + State).


Architecture #

Generated projects follow a modular Feature-First Clean Architecture:

lib/
├── app/                  # Application bootstrap, routing and theme
├── core/                 # Shared network client, storage, error models, utils
├── features/             # Business modules
│   └── <feature_name>/
│       ├── data/         # Models (with JSON mapping), datasources, repositories
│       ├── domain/       # Entities, repository interfaces, use cases
│       └── presentation/ # UI pages, state providers (Riverpod/Bloc), widgets
├── shared/               # Reusable presentation widgets and design tokens
├── l10n/                 # Localization catalogs (.arb files)
└── main.dart             # Application entrypoint

Note: Currently, only feature-first architecture is supported. Additional architecture patterns are planned for future releases.


Command Reference #

Command Description Example
rekeens doctor Inspects local development toolchain rekeens doctor
rekeens create <name> Scaffolds a new Flutter application rekeens create my_app --preset=mobile
rekeens list Lists all available presets and generators rekeens list
rekeens g feature <name> Scaffolds feature layers (data, domain, presentation) rekeens g feature profile
rekeens g screen <feature> <name> Creates a screen widget inside a feature rekeens g screen profile settings
rekeens g model <feature> <name> [fields] Creates a typed model with fromJson/toJson; supports primitives, DateTime, List<>, custom models, enums, Map rekeens g model profile user name:string age:int role:enum Role
rekeens g repository <feature> <name> Creates a repository (interface + implementation) inside a feature rekeens g repository profile user
rekeens g service <feature> <name> Creates an API service inside a feature rekeens g service profile user_api
rekeens g provider <feature> <name> Creates a Riverpod StateNotifierProvider or BLoC Cubit rekeens g provider profile profile_state
rekeens g entity <feature> <name> Creates a domain entity inside a feature rekeens g entity profile user
rekeens g usecase <feature> <name> Creates a domain use case inside a feature rekeens g usecase profile update_profile
rekeens g datasource <feature> <name> Creates a data source (interface + HTTP impl) inside a feature rekeens g datasource auth user_api
rekeens config init Generates a rekeens.yaml default configuration file rekeens config init

Pass -f, --force to overwrite existing files, or -n, --dry-run to preview actions without writing to disk.


Configuration (rekeens.yaml) #

Define shared team defaults and lifecycle hooks in rekeens.yaml:

defaults:
  platforms: [android, ios, windows]
  architecture: feature-first
  state_management: riverpod
  router: go_router
  networking: dio
  storage: shared_preferences
  localization: true
  theme: material3
  codegen: false

hooks:
  after_generate:
    - run: dart format lib/
      description: Auto-format generated Dart files

Documentation #

For full guides on:

  • Architecture layer responsibilities and data flow
  • Advanced CLI flags and CI/CD integration
  • Model generator field types and nullability rules
  • Overriding templates via ~/.rekeens/templates/ or ./.rekeens/templates/
  • Troubleshooting and local development workflows

See the Technical Documentation (DOCUMENTATION.md).

A runnable example lives in example/: example/main.dart drives all nine generators against a temporary demo project and prints the resulting file tree — run it with dart run example/main.dart.


License & Author #

Developed by Igor Smoleac for Rekeens.
Released under the MIT License.

0
likes
160
points
163
downloads

Documentation

Documentation
API reference

Publisher

verified publisherrekeens.com

Weekly Downloads

CLI tool for scaffolding Flutter applications with Feature-First Clean Architecture, Riverpod/BLoC, GoRouter, Dio, and modular code generators.

Repository (GitHub)
View/report issues

Topics

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

License

MIT (license)

Dependencies

args, mason_logger, meta, path, yaml, yaml_edit

More

Packages that depend on rekeens_flutter_cli