srik_cli 0.2.0
srik_cli: ^0.2.0 copied to clipboard
Flutter project scaffolder. Choose architecture (Clean, MVVM, Feature-first, Simple), design preset, gradients, and spacing. Generate projects and add features.
Changelog #
0.2.0 #
First public release after 0.1.0. Massive expansion of architecture, design, and code-generation capabilities.
New #
- Architecture choice —
srik create --arch=<arch>picks one of:clean— Clean Architecture (core + layered features/)mvvm— Model-View-ViewModel (models/ services/ viewmodels/ views/)feature-first— flat per-feature folders under features/simple— minimal structure, no layering
- Design presets —
--design=material|vibrant|minimal; each generates a full set of design tokens (colors, spacing, radius, typography) from your brand color. - Gradient themes —
--gradientflag generatesapp_gradients.dartwith brand-derived linear and radial gradients. - Spacing scales —
--spacing=compact|normal|spaciouspicks the density of the spacing tokens. srik add feature <name>— generates a full feature module appropriate to the project's architecture (works for all four archs).srik add screen <name> --feature <feature>— adds a screen (and optional provider) to an existing feature; works for all four archs.srik create --verbose/-vfor extra diagnostics.- Spinner shown during
flutter createandflutter pub get. srik.yamlis read automatically when runningsrik addfrom any subdirectory of a project.
Generated-code quality #
- Generated
main.dartinitializesSharedPreferencesand wires it intoProviderScope— no moreUnimplementedErrorat startup. - Generated projects pass
flutter analyzewith zero issues across all four architectures, both aftercreateand afteradd feature/add screen. - Generated repo stubs use a clear
TODOinstead of fakeFuture.delayed. - All generated code uses package imports (
package:app/...) for robustness.
Correctness #
srik.yamlmutation safely rewrites the file via a managed template (no more fragile line-based parsing).- Enum parsers (
AppArchitecture,DesignPreset,SpacingScale) throwFormatExceptionon unknown input instead of silently defaulting. LoggerhonorsNO_COLOR, non-TTY stdout, and Windows ANSI support.srik createvalidates that--outputexists and is writable before starting generation.srik doctortolerates empty/non-string version output.FeatureGenerator.designDirForerrors loudly on unknown architectures.
UX #
- Error messages echo the user's bad input and show a concrete example (e.g. "Invalid feature name 'Foo Bar'. ... Example: user_profile").
- Interactive prompts cover architecture, design preset, gradient, and spacing.
srik.yamlnow ships with a documented header explaining every field.
Internal #
- Unified
ProjectGeneratordispatches to per-architecture template sets. - Architecture templates split into
lib/templates/architectures/. - Per-arch add templates in
lib/templates/add/. - Shared design + common templates in
lib/templates/shared/. - Test suite expanded to 57 tests (was 8 in 0.1.0): integration tests across all four architectures, multi-arch add tests, validators, enums, generators.
0.1.0 #
Initial release.
srik create <name>generates a Clean Architecture + Riverpod project with go_router, Dio, shared_preferences, design tokens, and a sample feature.srik doctorchecks the environment.--versionflag.- Interactive prompts,
--no-interactivemode, input validation, git init.