UNPKG

flupilot-cli

Version:

FluPilot CLI is a lightweight tool to scaffold Flutter projects faster — with interactive package selection, auto-generated boilerplate, and a clean project setup

402 lines (281 loc) • 11.2 kB
# šŸš€ FluPilot CLI **A lightweight and powerful CLI tool to scaffold Flutter projects faster with interactive package selection, auto-generated boilerplate, and clean project setup.** [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC) [![GitHub Issues](https://img.shields.io/github/issues/ahmedali109/FluPilot-CLI)](https://github.com/ahmedali109/FluPilot-CLI/issues) [![GitHub Repo stars](https://img.shields.io/github/stars/ahmedali109/FluPilot-CLI)](https://github.com/ahmedali109/FluPilot-CLI) ## šŸ“– Overview FluPilot CLI streamlines Flutter development by providing an interactive command-line interface that automates project setup, package management, and boilerplate code generation. Whether you're building a simple app or a complex enterprise solution, FluPilot CLI helps you get started quickly with industry best practices baked in. ## ✨ Key Features ### šŸŽÆ **Interactive Project Creation** - **Smart Bundle ID Configuration**: Automated bundle ID setup for seamless deployment - **Directory Selection**: Choose your project location with an intuitive picker - **Platform Optimization**: Removes unnecessary platforms (web, desktop) for mobile-focused development ### šŸ“¦ **Comprehensive Package Management** FluPilot CLI supports 150+ popular Flutter packages across multiple categories: #### **šŸŽØ UI & UX** - **App Setup**: Icons, splash screens, onboarding flows - **Animations**: Lottie, animate_do, flutter_animate, animated_text_kit - **Navigation**: Bottom navigation bars, page indicators, pull-to-refresh - **Utilities**: Shimmer effects, loading indicators, toast notifications #### **šŸ—ļø Architecture & State Management** - **State Management**: BLoC, Provider, Riverpod, Hydrated BLoC - **Navigation**: GoRouter with auto-generated route configurations - **Dependency Injection**: GetIt with pre-configured service locator patterns #### **🌐 Networking & APIs** - **HTTP Clients**: Dio, Retrofit with interceptors and error handling - **Code Generation**: JSON serialization, Freezed models, build_runner - **Connectivity**: Network status monitoring, internet connection checking #### **šŸ’¾ Storage Solutions** - **Local Storage**: SharedPreferences, Hive, SQLite - **Cloud Services**: Firebase (Auth, Firestore, Analytics), Supabase - **Caching**: Cached network images, offline-first patterns #### **šŸ” Authentication & Security** - **Social Login**: Google, Apple, Facebook authentication - **Biometric Auth**: Fingerprint, Face ID, local authentication - **Security**: Secure storage, encryption, app lock screens #### **šŸŒ Localization & Accessibility** - **Internationalization**: Easy Localization with auto-generated translations - **Responsive Design**: Screen utilities, responsive frameworks - **Accessibility**: Screen readers, semantic labels #### **šŸ“± Device Integration** - **Media**: Image/video pickers, audio players, camera integration - **System**: Device info, package info, URL launcher - **Notifications**: Local notifications, push messaging, awesome notifications ### šŸ—ļø **Auto-Generated Architecture** #### **Clean Architecture Structure** ```plaintext lib/ ā”œā”€ā”€ core/ │ ā”œā”€ā”€ constants/ │ ā”œā”€ā”€ helpers/ # Extensions, spacing, regex utilities │ ā”œā”€ā”€ networking/ # API services, error handling │ ā”œā”€ā”€ services/ # Local auth, notifications, storage │ └── widgets/ # Reusable UI components ā”œā”€ā”€ features/ │ └── auth/ # Feature-based modular structure │ ā”œā”€ā”€ data/ │ │ ā”œā”€ā”€ models/ # Data models with JSON serialization │ │ └── repo/ # Repository pattern implementation │ ā”œā”€ā”€ logic/ # BLoC/Cubit state management │ └── ui/ # Screens and widgets └── main.dart ``` #### **Pre-built Authentication System** - Complete auth flow with login/register/forgot password - Social authentication (Google, Apple) integration - Biometric authentication support - Password validation with real-time feedback - Responsive form design with localization #### **Networking Layer** - Dio HTTP client with interceptors - API error handling and result patterns - Retrofit integration for type-safe API calls - Network connectivity monitoring #### **State Management** - BLoC pattern implementation - Cubit generators for rapid development - State persistence with Hydrated BLoC - Equatable for value comparison ### šŸ› ļø **Development Tools** #### **Code Generation** - JSON serialization with json_annotation - Freezed for immutable data classes - Build runner automation - Retrofit API client generation #### **Asset Management** - Automatic asset folder creation - pubspec.yaml asset configuration - Image optimization and organization - Icon and splash screen generation #### **Platform Configuration** - iOS Info.plist permissions setup - Android manifest permissions - Firebase/Supabase configuration - Platform-specific optimizations ## šŸš€ Quick Start ### Prerequisites - **Flutter SDK**: Latest stable version - **Git**: Version control - **Gum**: Interactive CLI components (auto-installed) - **Python 3**: For build tools (macOS/Linux) or Python (Windows) ### Installation #### via npm (Recommended) ```bash npm install -g flupilot-cli flupilot-cli ``` #### Manual Installation ```bash git clone https://github.com/ahmedali109/FluPilot-CLI.git cd FluPilot-CLI chmod +x scripts/helper/check_and_install_deps.sh ./scripts/helper/check_and_install_deps.sh ``` ### Usage 1. **Run FluPilot CLI**: ```bash flupilot-cli ``` 2. **Follow the Interactive Prompts**: - Select project directory - Enter project name and bundle ID - Choose package categories - Select specific packages - Configure Firebase/Supabase (if selected) 3. **Your Project is Ready!**: - All dependencies installed - Boilerplate code generated - Platform configurations applied - Ready to open in your preferred IDE ## šŸ“š Detailed Workflow ### 1. Project Initialization ```bash šŸ“ Select project location šŸ“ Enter Flutter project name šŸ†” Configure Bundle ID (com.example.yourapp) šŸš€ Create Flutter project with optimized structure ``` ### 2. Package Selection ```bash šŸ“¦ Choose from 15+ categories: ā”œā”€ā”€ App Setup (Icons, Splash, Onboarding) ā”œā”€ā”€ UI Components (Animations, Navigation) ā”œā”€ā”€ State Management (BLoC, Provider) ā”œā”€ā”€ Networking (HTTP, GraphQL) ā”œā”€ā”€ Storage (Local, Cloud) ā”œā”€ā”€ Authentication (Social, Biometric) └── System Integration (Notifications, Device) ``` ### 3. Code Generation ```bash šŸ› ļø Generate boilerplate for selected packages šŸ“„ Create service classes and utilities šŸ—ļø Set up architecture patterns āš™ļø Configure platform-specific settings ``` ### 4. Final Setup ```bash šŸ”§ Run build_runner (if needed) šŸŽÆ Open project in preferred IDE āœ… Ready for development! ``` ## šŸŽÆ Use Cases ### **MVP Development** Quick prototype creation with essential features: - Authentication system - Basic UI components - Local storage - API integration ### **Enterprise Applications** Production-ready setup with: - Clean architecture - State management - Comprehensive testing structure - CI/CD configurations ### **Learning Projects** Educational setup with: - Best practices implementation - Modern Flutter patterns - Code organization examples - Documentation templates ## šŸ› ļø Available Commands ### CLI Flags ```bash --help, -h Show help information --version, -v Display version information ``` ## šŸ“‹ Package Categories ### šŸŽØ UI & Visual (35+ packages) - **Animations**: Lottie, animate_do, flutter_animate, animated_text_kit - **Indicators**: Progress bars, loading spinners, shimmer effects - **Navigation**: Bottom nav bars, page indicators, sliding panels - **Utilities**: Toast notifications, dialogs, overlays ### šŸ—ļø Architecture (20+ packages) - **State Management**: BLoC, Provider, Riverpod, GetX - **Navigation**: GoRouter, AutoRoute, Navigator 2.0 - **Dependency Injection**: GetIt, Injectable, Kiwi - **Code Generation**: Build runner, JSON serialization, Freezed ### 🌐 Networking (15+ packages) - **HTTP**: Dio, Retrofit, HTTP interceptors - **GraphQL**: GraphQL Flutter, Ferry - **Connectivity**: Network monitoring, offline support - **Caching**: Image caching, data persistence ### šŸ’¾ Storage (12+ packages) - **Local**: SharedPreferences, Hive, SQLite, Secure Storage - **Cloud**: Firebase, Supabase, AWS Amplify - **Caching**: Cache management, offline-first patterns ### šŸ” Authentication (10+ packages) - **Social**: Google, Apple, Facebook, Twitter sign-in - **Biometric**: Fingerprint, Face ID, local authentication - **Security**: JWT handling, secure storage, encryption ## šŸ”§ Configuration Examples ### Firebase Setup ```yaml # Automatically configured firebase_core: ^latest firebase_auth: ^latest cloud_firestore: ^latest firebase_analytics: ^latest ``` ### BLoC State Management ```dart // Auto-generated cubit structure class AuthCubit extends Cubit<AuthState> { AuthCubit() : super(AuthInitial()); void login(String email, String password) { // Implementation generated } } ``` ### Networking with Dio ```dart // Auto-configured API service class ApiService { final Dio _dio = DioFactory.getDio(); Future<Response> getData() { // Type-safe API calls } } ``` ## šŸ¤ Contributing We welcome contributions! Here's how you can help: ### **šŸ› Bug Reports** - Use the [issue tracker](https://github.com/ahmedali109/FluPilot-CLI/issues) - Provide detailed reproduction steps - Include system information ### **šŸ’” Feature Requests** - Suggest new packages or integrations - Propose architecture improvements - Share use case scenarios ### **šŸ”§ Development** ```bash # Fork the repository git clone https://github.com/yourusername/FluPilot-CLI.git cd FluPilot-CLI # Create feature branch git checkout -b feature/amazing-feature # Make your changes and test ./scripts/helper/check_and_install_deps.sh # Submit pull request ``` ### **šŸ“š Documentation** - Improve README sections - Add code examples - Create tutorial content - Translate documentation ## šŸ“ˆ Roadmap ### **šŸ”œ Coming Soon** - [ ] **Template System**: Custom project templates - [ ] **Plugin Architecture**: Third-party integrations - [ ] **Testing Setup**: Unit, widget, and integration tests - [ ] **CI/CD Templates**: GitHub Actions, GitLab CI ### **šŸŽÆ Future Plans** - [ ] **Web Support**: Web-specific packages and setup - [ ] **Desktop Support**: Windows, macOS, Linux configurations ## šŸ“œ License This project is licensed under the **ISC License** - see the [LICENSE](LICENSE) file for details. --- ### Made with ā¤ļø by Ahmed Ali **_Made with ā¤ļø by Ahmed Ali_** [⭐ Star this repo](https://github.com/ahmedali109/FluPilot-CLI) &#124; [šŸ› Report Bug](https://github.com/ahmedali109/FluPilot-CLI/issues) &#124; [šŸ’” Request Feature](https://github.com/ahmedali109/FluPilot-CLI/issues/new) </div>