Your whole modular Flutter app, one command.
Scaffold a Clean Architecture project, then run pub get, build_runner, routes, localization, assets, clean and APK/IPA builds across every module from one fast, interactive CLI.
brew install gm-clicurl -fsSL https://ghozimahdi.github.io/GM_CLI/install.sh | shFirst time with Homebrew? Run
brew tap ghozimahdi/gm-cli https://github.com/ghozimahdi/GM_CLI and brew trust ghozimahdi/gm-cli before installing. The command is gm.
$ gm -b +----------------+------------------+----------------------+-------------------+ | Data Modules | Domain Modules | Feature Modules | Other Modules | +----------------+------------------+----------------------+-------------------+ | 3. data_auth | 5. domain_auth | 7. feature_auth | 1. app | | 4. data_common | 6. domain_common | 8. feature_common | 2. library_common | | | | 9. feature_dashboard | | +----------------+------------------+----------------------+-------------------+ Total modules available: 9, Select modules (example: 1,2,3 or 0 for all): 3,5,7 ✓ data_auth build_runner done ✓ domain_auth build_runner done ✓ feature_auth build_runner done $
Everything you run daily.
Run inside your Flutter project: gm [OPTIONS] [COMMAND]. Commands that touch modules let you pick one, several or all of them.
create projectNew Flutter project with a Clean Architecture, modular structure.
create moduleAdd a data, domain or feature module for modularization.
build-bRun build_runner for the modules you select.
get-gflutter pub get for selected modules.
clear-cflutter clean and remove pubspec.lock for selected modules.
appInteractively build APK or IPA files.
routeGenerate route files for your Flutter project.
flutter · dartPass-through commands such as pub add <package>.
info · help · donatePrerequisites, usage and ways to support the project.
| Option | What it does |
|---|---|
-b --build | Run build_runner after module selection |
-l --localize | Generate easy_localization files |
-a --assets | Generate assets with flutter gen |
-c --flutter_clean | Flutter clean for a single module |
-g --flutter_get | flutter pub get for a single module |
--all | build_runner, easy_localization and assets in one go |
-V --version | Print version information |
Clean Architecture,
already wired.
Every feature lives in its own data, domain and presentation module, so the app stays scalable as it grows.
app/ packages/ ├── library/ │ └── library_common/ ├── data/ │ ├── data_common/ │ ├── data_auth/ │ └── data_analytic/ │ ├── di/ config/ model/ │ └── mapper/ repository/ ├── domain/ │ ├── domain_common/ │ ├── domain_auth/ │ └── domain_analytic/ │ ├── di/ config/ model/ │ └── use_case/ repository/ └── presentation/ ├── feature_common/ ├── feature_dashboard/ └── feature_auth/ └── bloc/ config/ di/ page/
Library
Shared utilities, components and resources reused across modules.
Data
Data sources, models, mappers and repository implementations.
Domain
Business logic: use cases and repository interfaces per module.
Presentation
Features, pages and BLoC state management.
Up and running in a minute.
Requires Flutter. Prebuilt macOS binaries ship with every release.
Homebrew
Recommended on macOS.
brew tap ghozimahdi/gm-cli https://github.com/ghozimahdi/GM_CLIbrew trust ghozimahdi/gm-clibrew install gm-cliInstall script
No Homebrew needed. Downloads the binary for your Mac and verifies its checksum.
curl -fsSL https://ghozimahdi.github.io/GM_CLI/install.sh | shInstalls to /usr/local/bin or ~/.local/bin. Pin a version with GM_VERSION=v4.0.1, pick a folder with GM_INSTALL_DIR. Re-run to update.
Update
Pull the latest formula and upgrade.
brew updatebrew upgrade gm-cliBuild from source
Requires Rust.
git clone https://github.com/ghozimahdi/GM_CLI.gitcd GM_CLI && cargo build --release./target/release/gm helpHelp gm level up.
This project is maintained by an independent developer. Your donations help to:
- Add new features
- Fix bugs faster
- Improve documentation
QRIS · GoPay, BCA, Mandiri, BNI, BRI and more