glopr_cli 1.0.2
glopr_cli: ^1.0.2 copied to clipboard
A CLI to generate Flutter starter project from template. Built by Glopr Team <3
๐ต๏ธ Holmes CLI #
A command-line tool to scaffold Flutter apps using a custom template.
๐ Features #
- Create a new Flutter project from your own template
- Automatically replace placeholders like project name, bundle ID, description, etc.
- Text and binary file support
- Check development environment with
doctorcommand - Simple and extendable CLI
๐ Installation #
Clone this repo and activate locally:
git clone https://github.com/your-org/glopr_cli.git
cd glopr_cli
dart pub global activate --source path .
๐ฆ Usage #
๐ Create a New Project #
Create a new Flutter project from your local template:
glopr create <project-name> [-o com.example.app]
Example:
glopr create my_app -o com.mycompany.myapp
You will be prompted to enter:
๐ App display name: My App
๐ App description: A beautiful Flutter app built with Holmes CLI.
Then the CLI will:
- Copy the template from the local
template/directory - Replace placeholders in file names and content:
__project_name__โmy_app__app_name__โMy App__description__โA beautiful Flutter app built with Holmes CLI.__bundle_id__โcom.mycompany.myapp
- Print status for each copied file:
๐ Generating project "my_app"... ๐ Copied text: pubspec.yaml ๐ Copied text: lib/main.dart ๐ผ๏ธ Copied binary: assets/icon.png โ Project generated successfully!
๐ฉบ Run Doctor #
Check your environment for Flutter and Dart:
glopr doctor
Output:
๐ Running doctor...
Flutter:
Flutter 3.32.7 โข channel stable โข https://flutter.dev
Dart:
Dart SDK version: 3.8.1 (stable)
โ
Environment check complete.
๐ Show Version #
Check the current CLI version:
glopr --version
Output:
glopr_cli version 1.0.0
๐ Show Help #
Display available commands and options:
glopr --help
Output:
Holmes CLI
Create a Flutter project from your custom template
Usage:
glopr create <project_name> [-o com.example.app]
glopr -v | --version
glopr -h | --help
glopr doctor
Options:
-o, --org Set the bundleId (e.g., com.example.app)
-v, --version Show CLI version
-h, --help Show this help message
Commands:
create Generate a new Flutter project based on template
doctor Check system requirements
๐งช Example Template Structure #
template/
โโโ main.dart # Entry point of the app
โโโ injection_container.dart # Dependency injection setup (e.g., GetIt)
โโโ core/ # Core-level utilities and services
โ โโโ constants/ # App-wide constant values
โ โโโ env/ # Environment-specific configuration
โ โโโ error/ # Error handling and exceptions
โ โโโ extensions/ # Dart extensions (e.g., StringX)
โ โโโ impl/ # Concrete implementations of services
โ โโโ services/ # Abstract service definitions
โ โโโ themes/ # App themes and color schemes
โ โโโ utils/ # Generic utility functions
โโโ core_bloc/ # Global BLoC (e.g., theme switching)
โ โโโ theme/ # Theme-related BLoC logic
โโโ data/ # Data layer of Clean Architecture
โ โโโ data_sources/ # Remote/local data fetching logic
โ โโโ models/ # Data models and DTOs
โ โโโ repositories/ # Data access abstraction
โโโ dialogs/ # Global/custom dialogs
โ โโโ alert_dialog/ # Custom alert dialog implementation
โโโ domain/ # Domain layer: business logic
โ โโโ entities/ # Core business entities
โ โโโ usecases/ # Application-specific use cases
โโโ presentation/ # UI and BLoC logic
โ โโโ bloc/ # Presentation-specific BLoC
โ โโโ pages/ # Screens and pages
โโโ root/ # App configuration and entry points
โ โโโ app/ # App widget and app-level config
โ โโโ bootstrap.dart # Bootstrapping the app
โ โโโ l10n/ # Localization support
โ โโโ main_development.dart # Entry point for development build
โ โโโ main_production.dart # Entry point for production build
โโโ widgets/ # Reusable UI components
โ โโโ app_safe_area.dart # Wrapper for safe UI rendering
โ โโโ app_text.dart # Custom text widget
โ License #
MIT โ feel free to use, modify, and distribute.
๐จโ๐ป Author #
Made with โค๏ธ by Holmes