fli
A powerful CLI tool for generating clean and standardized Flutter project structures.
π Why fli?
Every Flutter developer has faced this problem: inconsistent project structures across different projects and teams. fli
solves this by providing:
- Standardized Structure: Clean, organized folder structures that scale
- Multiple Templates: Choose from various architectural patterns
- Best Practices: Built-in Flutter and Dart best practices
- Developer Friendly: Simple commands, interactive prompts
- Extensible: Easy to customize and extend
π¦ Installation
Option 1: Install from pub.flutter-io.cn (Recommended)
dart pub global activate fli
Option 2: Install from source
git clone https://github.com/faizahmaddae/fli.git
cd fli
dart pub global activate --source path .
Option 3: Quick install script
curl -fsSL https://rawgit.flutter-io.cn/faizahmaddae/fli/main/install.sh | bash
Note: Make sure ~/.pub-cache/bin
is in your PATH to use fli
directly.
π οΈ Usage
Generate a new Flutter project (Complete & Ready to Use!)
fli create my_app
That's it! Your Flutter project is completely ready to use. No need to run flutter create .
or flutter pub get
manually.
Interactive mode with template selection
fli create my_app --interactive
Choose a specific template
fli create my_app --template=clean_architecture
What you get out of the box:
- β Complete Flutter project with all platform support
- β Template structure applied with best practices
- β Dependencies installed and ready to use
- β Tests included and passing
- β Documentation generated with template-specific guides
- β
Ready to run with
flutter run
Available templates
basic
- Simple, clean structure for small to medium appsfeature_driven
- Feature-based organizationclean_architecture
- Clean Architecture with proper separationbloc_pattern
- BLoC pattern implementationprovider_pattern
- Provider state management structure
ποΈ Generated Structure Example
my_app/
βββ lib/
β βββ core/
β β βββ constants/
β β βββ errors/
β β βββ theme/
β β βββ utils/
β βββ features/
β β βββ home/
β β βββ data/
β β βββ domain/
β β βββ presentation/
β βββ shared/
β β βββ widgets/
β β βββ services/
β βββ main.dart
βββ test/
βββ assets/
β βββ images/
β βββ icons/
β βββ fonts/
βββ doc/
π― Commands
fli create <project_name>
- Create a new Flutter projectfli templates
- List available templatesfli --help
- Show help informationfli --version
- Show version
π Documentation
For comprehensive documentation, examples, and architectural guides:
π Complete Template Documentation
- Template Guide - Detailed overview of all templates with structure explanations
- Architecture Guide - Design patterns, conventions, and best practices
- Usage Examples - Real-world scenarios and practical implementation examples
π Templates
- Basic Template - Simple apps and prototypes
- Feature Driven - Scalable feature-based architecture
- Clean Architecture - Enterprise-level applications
- State Management - BLoC and Provider patterns
π€ Contributing
We welcome contributions! Please feel free to submit issues and pull requests.
Contributing to Documentation
Found something unclear or want to add examples? Check out our documentation contribution guide.
β Support
If you find this project helpful and would like to support its development, consider buying me a coffee!
Your support helps maintain and improve this tool for the Flutter community.
π License
MIT License - see LICENSE file for details.
Libraries
- fli
- A powerful CLI tool for generating clean and standardized Flutter project structures.