Gocli
No description available
Install / Use
/learn @stebaia/GocliREADME
🚀 Fline CLI
<div align="center">A powerful Flutter project generator with Pine architecture
</div>✨ Features
Fline CLI helps you create professional Flutter projects with:
- 🏗️ Clean Architecture - Service, Repository, BLoC, UI layers
- 🔥 Firebase Integration - Auth, Firestore, Storage, Messaging
- 💧 Supabase Integration - Auth, Database, Storage
- 🔔 Push Notifications - FCM setup ready
- 📦 Model Generation - From JSON to complete features
- 🎨 Example Screens - Login, Home, Profile, Settings
- 🌈 Beautiful CLI - Interactive wizard with colors
- ⚡ Fast & Modern - Built with Go for speed
📋 Prerequisites
🔧 Installation
From Source
git clone https://github.com/yourusername/fline-cli
cd fline-cli
make install
Usage without installation
go run main.go [command]
🎯 Commands
fline create - Create a New Project
Create a new Flutter project with interactive wizard:
fline create
Or use flags for non-interactive mode:
fline create --name my_app --org com.example --firebase
What you get:
- ✅ Flutter project with Pine architecture
- ✅ Dependency injection setup
- ✅ Router configuration (auto_route)
- ✅ Localization (l10n) ready
- ✅ Theme configuration
- ✅ Optional Firebase/Supabase
- ✅ Optional example screens
- ✅ Optional models from JSON
fline generate - Generate Features
Generate service, repository, and BLoC for a feature:
# Interactive mode
fline generate
# With arguments
fline generate user
fline generate product --type service
Options:
--name, -n: Feature name--type, -t: Component type (all, service, repository, bloc)
fline model - Generate from JSON
Create complete feature from JSON data:
# Interactive mode
fline model
# From JSON string
fline model user --json '{"id":1,"name":"John","email":"john@example.com"}' --endpoint /api/users
# From JSON file
fline model product --json-file product.json
Generates:
- 📄 Model with json_annotation
- 🌐 Retrofit service
- 💾 Repository with error handling
- 🎯 BLoC with CRUD operations (Create, Read, Update, Delete)
📁 Project Structure
your_project/
├── lib/
│ ├── di/ # Dependency Injection
│ │ ├── dependency_injector.dart
│ │ ├── blocs.dart
│ │ ├── providers.dart
│ │ └── repositories.dart
│ ├── l10n/ # Localizations
│ ├── model/ # Data models
│ ├── network/
│ │ └── service/ # API services (Retrofit)
│ ├── repositories/ # Data repositories
│ ├── routers/ # Navigation (auto_route)
│ ├── state_management/
│ │ └── bloc/ # BLoC state management
│ ├── theme/ # App theming
│ ├── ui/ # UI screens & widgets
│ ├── utils/ # Utilities
│ ├── app.dart
│ └── main.dart
├── pubspec.yaml
└── ...
🔥 Firebase Setup
After generating a project with Firebase:
- Install FlutterFire CLI:
dart pub global activate flutterfire_cli
- Configure Firebase:
cd your_project
flutterfire configure
- Follow the prompts to select/create a Firebase project
💧 Supabase Setup
After generating a project with Supabase:
-
Create a project at supabase.com
-
Get your Project URL and anon key
-
Update
lib/utils/supabase_client.dart:
static const String supabaseUrl = 'YOUR_PROJECT_URL';
static const String supabaseAnonKey = 'YOUR_ANON_KEY';
🎨 Example Screens
Fline CLI can generate these example screens:
- Login Screen - Email/password authentication UI
- Home Screen - Dashboard with quick actions
- Profile Screen - User profile management
- Settings Screen - App settings and preferences
All screens are:
- ✅ Material Design 3 compliant
- ✅ Responsive
- ✅ Well-structured
- ✅ Ready to customize
🛠️ Development Workflow
After creating a project:
cd your_project
# Install dependencies
flutter pub get
# Generate code (routes, models, etc.)
flutter pub run build_runner build --delete-conflicting-outputs
# Generate localizations
flutter gen-l10n
# Run the app
flutter run
📖 Examples
Create a complete project
fline create
# Follow the interactive wizard:
# 1. Enter project name: my_awesome_app
# 2. Enter organization: com.mycompany
# 3. Select backend: Firebase
# 4. Enable notifications: Yes
# 5. Add models: Yes, paste JSON
# 6. Select screens: Login, Home, Profile
Generate a user feature
cd my_awesome_app
fline model user --json '{"id":1,"name":"John Doe","email":"john@example.com","avatar":"url"}' --endpoint /api/users
This generates:
lib/model/user.dartlib/network/service/user_service.dartlib/repositories/user_repository.dartlib/state_management/bloc/user/user_bloc.dartlib/state_management/bloc/user/user_event.dartlib/state_management/bloc/user/user_state.dart
Generate just a service
fline generate post --type service
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Pine Package - Flutter architecture helpers
- Charm.sh - Beautiful CLI tools
- Cobra - CLI framework
💬 Support
- 🐛 Report bugs via GitHub Issues
- 💡 Feature requests welcome
- ⭐ Star the project if you like it!
<div align="center"> Made with ❤️ for Flutter developers </div>
