relax_cli 1.0.1
relax_cli: ^1.0.1 copied to clipboard
CLI to scaffold Flutter projects with clean architecture, state management (Bloc, Provider, Riverpod, GetX), and RelaxORM integration.
1.0.1 #
- Changed generated project dependencies to the current stable RelaxORM:
relax_orm: ^1.0.0(was^0.1.4) andrelax_orm_generator: ^0.1.7(was^0.1.6), across all four architectures. TheCollectionCRUD used by generated modules is source-compatible with RelaxORM 1.0.0.
1.0.0 #
First stable release. The command surface and generated project structure are now considered stable.
- Added an automatic navigation layer to generated projects for all four architectures.
relax createnow scaffolds a router in the app composition root —lib/app/router/app_router.dart(go_router) for Bloc/Provider/Riverpod, orlib/app/router/app_pages.dart(GetXgetPages) for GetX — and wiresMaterialApp.router/GetMaterialApp(getPages:). The router lives inapp/, so features never depend on it (Clean Architecture dependency rule preserved).- Each feature owns its route identity: generated pages expose
static const routeName/routePath. Navigate withcontext.goNamed(CartPage.routeName)(go_router) orGet.toNamed(CartPage.routePath)(GetX). relax g feature <name>now auto-registers the feature's route — aGoRoutefor go_router architectures, or aGetPagecarrying the feature'sBindingfor GetX — and exports the feature fromfeatures/features.dart, with no manual editing. Route name/path derive from the full path spec, soauth/loginandadmin/logindon't collide.- Opt out with
relax g feature <name> --no-route. - Insertion is idempotent and anchor-based (
// relax:router-*); re-running never duplicates a route, and a missing router/anchor degrades to a warning instead of failing.
- Added
relax generate router— retroactively scaffolds the navigation layer into an existing project (created before navigation support, or where the router was removed).- Auto-detects the architecture, creates the router file, gives
HomePageitsrouteName/routePath, rewiresapp/view/app.darttoMaterialApp.router/GetMaterialApp(getPages:), adds thego_routerdependency (non-GetX), and creates thefeatures/features.dartbarrel from existing features. - Idempotent and safe: re-running reports "already present", and any hand-customized
app.dartit can't recognize degrades to actionable warnings instead of corrupting the file.
- Auto-detects the architecture, creates the router file, gives
- Added an aggregate
lib/features/features.dartbarrel that re-exports every feature. It is the single import the router uses to reach feature pages.relax generate featureregisters each new feature there automatically (replacing per-feature router imports). - Changed
relax generate page— the page name may now be given as a single path spec (relax g page product/product_details, leaf = page) in addition to the two-argument form. The new page is auto-exported from its feature barrel, and registered as a child route of its feature: a nestedGoRouteunder the feature route for go_router, or a flatGetPage(with the featureBinding) at/<feature>/<page>for GetX. Pass--no-routeto skip.
0.1.7 #
- Added path-spec support to every
relax generatesubcommand — the name argument may now include a/-separated parent path, and the missing folders are created before the component is generated.relax g feature auth/logincreateslib/features/auth/(if needed) then generates theloginfeature inside it.- Works at arbitrary depth, e.g.
relax g feature account/admin/login. - Applies to
feature,model,module, andpage(whose target feature folder may now be nested). - Class and file names are derived from the last segment only (
auth/login→LoginBloc,login.dart); the prefix is used purely as a path. - Each path segment is validated as a Dart name; a plain name with no
/behaves exactly as before (fully backwards compatible).
- Added
relax generate page <folder_name> <page_name>— generates a Page + View pair inside an existing feature folder.- Auto-detects the project architecture (Bloc, Provider, Riverpod, GetX) or accepts
-ato override. - Generates
<page_name>_page.dartand<page_name>_view.dartinlib/features/<folder_name>/view/. - Each architecture produces the correct imports and widget types (BlocProvider/BlocBuilder, ChangeNotifierProvider, ConsumerStatefulWidget/ConsumerWidget, GetView).
- Validates that the target feature folder exists and that the page does not already exist.
- Prints a hint to add the new page export to the feature's barrel file.
- Auto-detects the project architecture (Bloc, Provider, Riverpod, GetX) or accepts
0.1.6 #
- Added
relax pub get— runsflutter pub getin the current project. - Added
relax pub add <package>— runsflutter pub add; accepts-V <constraint>to pin a version. - Added
relax build apk— formats code then builds an optimized release APK with obfuscation, split-debug-info, tree-shaking, and split-per-ABI. - Added
relax build aab— formats code then builds an optimized release AAB (Android App Bundle) for Google Play. - Added
relax clean— runsflutter cleanin the current project. - Added FVM auto-detection — all Flutter commands use
fvm flutterautomatically when.fvm/fvm_config.jsonis present. - Added
--flavor(-f) and--target(-t) options forbuild apkandbuild aab; defaults toproductionflavor andlib/main_<flavor>.dartentry point.
0.1.5 #
- Added shared encrypted local storage scaffolding via
relax_storage, including a generatedCachedStorageservice in the app core. - Added
ENCRYPTION_KEYto generated flavor environment files and wired it intoRelaxStorageinitialization. - Updated generated project dependencies to
relax_orm ^0.1.4,relax_orm_generator ^0.1.6, andrelax_storage ^1.0.1. - Fixed generated DI and bootstrap templates so Bloc, Provider, Riverpod, and GetX projects initialize storage consistently and import the cache helper from the correct package path.
0.1.4 #
- Added shared encrypted local storage scaffolding via
relax_storage, including a generatedCachedStorageservice in the app core. - Added
ENCRYPTION_KEYto generated flavor environment files and wired it intoRelaxStorageinitialization. - Updated generated project dependencies to
relax_orm ^0.1.3,relax_orm_generator ^0.1.5, andrelax_storage ^1.0.1. - Fixed generated DI and bootstrap templates so Bloc, Provider, Riverpod, and GetX projects initialize storage consistently and import the cache helper from the correct package path.
0.1.3 #
- Fixed generated Flutter app templates to include
flutter_localizationsand correct relativecoreimports for Bloc, GetX, Provider, and Riverpod starter projects. - Fixed generated widget test scaffolding by wrapping
const App()insideTranslationProvidercorrectly. - Improved
relax createoutput by addingflutter pub getto the next steps instructions. - Removed an incomplete stray generator file from the repository.
0.1.2 #
- Fixed generated
build.gradle.ktsfailing to compile with Kotlin DSL errors.- Replaced Groovy syntax (
def,new Properties(), single-quoted strings,withReader,toInteger()) with valid Kotlin DSL (val,Properties(), double-quoted strings,.reader().use {},.toInt()). - Fixed deprecated
kotlinOptions→kotlin { compilerOptions {} }block. - Fixed
Unresolved reference: itin signing config by using explicit named lambda parameter. - Added required
import java.util.Propertiesandimport java.io.FileInputStream.
- Replaced Groovy syntax (
0.1.1 #
- Added built-in internationalization (i18n) support via slang.
- Projects are scaffolded with
fr(base) andenlocale JSON files. build.yamlis generated with slang configuration.- Translations are auto-generated after
relax createviadart run slang+build_runner.
- Projects are scaffolded with
- Automatic
flutter pub getand code generation run at the end ofrelax create. - Patched iOS
Info.plistwith supported locales during project creation. - Improved generated
README.mdwith flavor run commands and translation regeneration instructions. - Removed sample
productandusermodules from the example project. - Removed redundant
flutter pub getfrom post-create instructions (now runs automatically).
0.1.0 #
- Initial release.
relax create— scaffold Flutter projects with Bloc, Provider, Riverpod, or GetX.relax generate feature— add feature modules with auto-detected architecture.relax generate module— add domain/data modules with RelaxORM integration.relax generate model— add standalone ORM model classes with@RelaxTable.relax doctor— check Dart, Flutter, and project environment.- Automatic
build_runnerexecution after module and model generation. - Material 3 theming with customizable color palette and font.
- Android flavor configuration (development, staging, production).
- Environment package generation via
env_builder.