🧱 moarch
A Dart/Flutter CLI package for scaffolding Clean Architecture apps with Riverpod, GoRouter, secure env support, and production-ready templates.
Install
dart pub global activate moarch
Make sure the global pub cache bin folder is on your PATH:
# macOS / Linux
export PATH="$PATH:$HOME/.pub-cache/bin"
# Windows
setx PATH "%PATH%;%APPDATA%\Pub\Cache\bin"
Quick start
flutter create my_app
cd my_app
moarch init
moarch create feature auth
Common commands
moarch init # scaffold a complete Flutter app structure
moarch init --all # generate the default app without prompts
moarch create feature auth
moarch create feature auth --all
moarch create feature auth --no-unit --no-integration
What moarch generates
- app structure with
lib/main.dart,core/,config/,shared/widgets/, andfeatures/ GoRouterrouting setupflutter_secure_storagewrappers.envsupport withEnviedcode generation- GitHub Actions CI workflow scaffold
- reusable UI widgets, loading states, and error handling
- feature scaffolding with Clean Architecture layers
- optional test scaffolding for notifiers, repositories, and use cases
Feature generation
moarch create feature <name> generates a feature folder with:
domain/(entities, repository interfaces, optional use cases)data/(remote/local datasources, models, repository implementations)presentation/(state, notifier, view)
The CLI uses an interactive checklist so you can generate only the layers you need.
Customize templates
Templates are defined in lib/src/templates/:
core_templates.dartconfig_templates.dartfeature_templates.dartshared_templates.darttest_templates.dartchecklist_templates.dartworkflow_templates.dart
To use local template changes:
git clone https://github.com/SuperMoooo/moarch.git
cd moarch
dart pub global activate --source path ./
Package details
- name:
moarch - license: MIT
- repository: https://github.com/SuperMoooo/moarch
Troubleshooting
- If
moarchis not found, confirm the global pub cache bin folder is on yourPATH. - If a feature already exists, rename or remove the existing folder first.
- After changing templates locally, re-activate with
dart pub global activate --source path ./.
License
MIT © André Montoito