๐Ÿ› ๏ธ Raunak CLI Dart โ€“ Flutter Clean Architecture Generator

A powerful CLI tool to scaffold production-ready Clean Architecture Flutter projects using layered architecture and opinionated best practices.


๐Ÿš€ Features

๐Ÿ”น dart pub global activate raunak_cli

  • Activate the CLI globally from pub.dev

๐Ÿ”น raunak-cli init <project_name>

  • Creates a Flutter project using flutter create
  • Generates a scalable Clean Architecture folder structure
  • Prompts you for:
    • ๐ŸŽจ Primary theme color (default: 0xFF2196F3)
    • ๐ŸŒ Network client: dio, http, or none
  • Adds and installs essential dependencies:
    • dio, google_fonts, flutter_dotenv, flutter_secure_storage, go_router

๐Ÿ“ Generated Structure


lib/
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ theme/
โ”‚   โ”‚   โ””โ”€โ”€ app\_theme.dart
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ app\_routes.dart
โ”‚   โ”‚   โ””โ”€โ”€ navigate.dart
โ”‚   โ”œโ”€โ”€ env/
โ”‚   โ”‚   โ””โ”€โ”€ env.config.dart
โ”‚   โ””โ”€โ”€ storage/
โ”‚       โ””โ”€โ”€ local_storage.dart
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ entities/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ usecases/
โ”‚   โ”œโ”€โ”€ datasources/
โ”‚   โ”‚   โ”œโ”€โ”€ local/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ user\_token.dart
โ”‚   โ”‚   โ””โ”€โ”€ remote/
โ”‚   โ”‚       โ””โ”€โ”€ api\_client.dart
โ”‚   โ”œโ”€โ”€ utils/constants/
โ”‚   โ”‚   โ””โ”€โ”€ api\_endpoints.dart
โ”‚   โ””โ”€โ”€ error/
โ””โ”€โ”€ features/
main.dart
.env


๐Ÿงช Usage

โœ… Step-by-step

# Activate globally
dart pub global activate raunak_cli

# Create a new clean Flutter project
raunak-cli init my_app

During Setup:

  • ๐ŸŽจ Enter Primary Color Hex (e.g. 0xFF4CAF50)
  • ๐ŸŒ Choose Network Client: dio, http, or none

๐Ÿ“ฆ Default Dependencies Added

dependencies:
  dio: any
  google_fonts: any
  flutter_dotenv: any
  flutter_secure_storage: any
  go_router: any

You can also input additional dependencies during setup.


๐Ÿงฉ Coming Soon

  • generate:feature <name> โ€“ Create a feature module (Domain, Data, and Presentation layers)
  • generate:model <name> โ€“ Scaffold domain entities and data models
  • init --with-auth โ€“ Bootstrap login/signup and auth flow

๐Ÿ‘จโ€๐Ÿ’ป Author

Made with โค๏ธ by Raunak Pandey GitHub: @raunak-dows17

If you like this tool, don't forget to โญ๏ธ the repo and share it with your Flutter friends!