Scaffold Flutter projects and feature folders with a clean, opinionated architecture — flutter_bloc (cubits), get_it, and equatable — generating only the layers you need.
dart pub global activate sorcel_cliMake sure ~/.pub-cache/bin is on your PATH. You'll also need Flutter
installed, since create uses it to scaffold the native platforms.
sorcel create my_app --org com.acme
cd my_app
sorcel feature auth
flutter runAdd --verbose (-v) to any command for detailed, per-file output.
Creates a new Flutter project with the Sorcel architecture.
sorcel create my_app --org com.acme --platforms android,ios,web| Flag | Description | Default |
|---|---|---|
-d, --description |
Project description | A new project for Sorcel Tech |
--org |
Reverse-domain prefix. Bundle id becomes <org>.<name> |
com.example |
--platforms |
Comma-separated platforms (e.g. android,ios,web) |
android,ios |
-o, --output |
Parent directory to create the project in | . |
--no-pub-get |
Skip flutter pub get |
off |
Under the hood it runs flutter create to generate the native platform folders
(ios/, android/, …), then overlays the Sorcel lib/ and pubspec.yaml on
top. Native folders are intentionally not templated — they're large,
version-specific, and go stale quickly.
Adds a feature folder. Run it anywhere inside a project — it finds the nearest
pubspec.yaml.
sorcel feature auth # application + presentation (default)
sorcel feature auth --with-domain # + domain (entities, repositories)
sorcel feature auth --with-data # + data (models, datasources, repo impl)Beyond creating the files, it also:
- exports the feature from
lib/src/features/features.dart, - registers the cubit in
lib/src/common/di/injector.dart, - ensures
flutter_bloc,get_it, andequatableare inpubspec.yaml.
Names accept any casing (auth, user profile, user-profile, UserProfile)
and are normalised — folders/files become snake_case, classes PascalCase.
lib/src/
├── app.dart
├── common/
│ ├── di/injector.dart # getIt + configureDependencies()
│ ├── constants/ domain/ extensions/ router/ utilities/
│ └── presentation/theme/ # Material 3, AppColors, AppColorExtension,
│ # AppTextStyles, AppSpacing
└── features/
└── <feature>/
├── <feature>.dart # barrel
├── application/ # <feature>_cubit.dart + <feature>_state.dart
└── presentation/pages/ # <feature>_page.dart + <feature>_view.dart
Each feature ships a cubit + an Equatable state, a Page that provides the
cubit via getIt, and a View that consumes it — one class per file.
Templates live as editable Dart files under lib/src/templates/ (project/
and feature/). After changing any template, regenerate the embedded bundles:
dart run tool/bundle.dartSee CONTRIBUTING.md for the full workflow and release steps.