karna_cli 1.0.0
karna_cli: ^1.0.0 copied to clipboard
CLI tool to create and manage Karna MVC Flutter projects.
karna_cli #
CLI tool to create and manage Karna MVC Flutter projects.
Install #
dart pub global activate karna_cli
Commands #
Create a project #
karna create my_app
karna create my_app --org com.mycompany
Scaffolds a full Karna MVC Flutter project with:
- Typed error handling (
Result<T>) - Data strategies (localFirst, staleWhileRevalidate, remoteFirst)
- Memory management (priority-based service lifecycle)
- Storage-agnostic caching (Hive, SharedPrefs, InMemory)
- Event bus for cross-feature communication
- SnackBar notification service
Create a feature #
Run from inside a Karna MVC project:
karna feature auth
karna feature feed --memory-aware
Options:
--memory-aware/-m— UseMemoryAwareControllerwith automatic memory management
Generates model, repository, data sources, controller, view, and tests. Automatically registers in providers.dart.
Requirements #
- Dart SDK
^3.0.0 - Flutter SDK (for
flutter createandflutter pub add)