ag_cli 2.3.2
ag_cli: ^2.3.2 copied to clipboard
Flutter GetX code generator CLI. Scaffolds modules, components, models, repos, controllers, bindings, and pages.
2.3.2 #
- Fix: Fixed broken image links in
README.mdand restored pub.dev formatting.
2.3.1 #
- Docs: Added a high-quality GIF demo to the
README.md. - Docs: Added a custom neon logo to the
README.md.
2.3.0 #
- Feature:
ag initnow automatically scaffolds a best-practiceAuthGuard(GetMiddleware) insidelib/core/guards/auth_guard.dart. It intelligently checks for a session token using the globally injectedSharedPreferencesfromInitialBinding, and redirects toAppRoutes.loginif unauthenticated. - Improvement: Added
AppRoutes.loginstub out-of-the-box so theAuthGuardhas a valid redirection target. - Improvement:
ag doctornow verifies that thecore/guards/auth_guard.dartexists and is properly formed.
2.2.0 #
- Feature: Nested submodule generation. Run
ag g m orders/detailsto create a smart nested module. MVC files are automatically prefixed (orders_details_controller.dart) and stay flat in the parent folder, while UI widgets are cleanly isolated incomponents/details/. - Fix: Moved
initial_binding.darttolib/core/bindings/initial_binding.dartto adhere to standard Core organization patterns.
2.1.0 #
- Feature: Auto-route injection.
ag g modulenow automatically injects routes intoapp_routes.dart,app_pages.dart, androute_management.dart. No manual wiring needed. - Feature:
ag upgradecommand — self-update ag_cli to the latest version from pub.dev with one command. - Feature:
ag doctorcommand — diagnose your Dart SDK, Flutter installation, project structure, and dependencies before generating code. - Improvement:
ag initnow rewritesmain.dartto useGetMaterialApp+ScreenUtilInitwith dark/light theme support. - Improvement:
ag initupdatesanalysis_options.yamlwithformatter: page_width: 140. - Improvement: Progress spinners on all long-running operations via
mason_logger. - Fix: Removed domain-specific
ROUTE_TODO.mdgeneration when auto-injection succeeds. - Improvement: Added robust support for Angular CLI-style compound paths (e.g.,
ag g ctrl orders/dashboard) with correctly mapped internal imports.
2.0.0 #
- Breaking: Restructured as a full
CommandRunner-based CLI (same architecture as the Dart SDK CLI). - Feature: Angular CLI-style
generatecommand withgshortcut. - Feature: 7 sub-generators —
module,component,model,repo,controller,binding,page. - Feature: Short aliases —
m,c,r,ctrl,b,p. - Feature:
ag init— scaffolds the full GetX project structure with all standard files. - Feature:
ag list/ag ls— shows all available generators with shortcuts. - Feature: Interactive arrow-key prompts powered by
mason_loggerwhen arguments are omitted. - Feature:
--version/-vflag. - Feature:
--dry-run/-d— preview files without writing them. - Feature:
--force— overwrite existing files. - Feature:
--moduleflag for individual generators to target a specific module. - Feature: Auto-detection of package name from
pubspec.yamland module name from CWD. - Feature: Overwrite protection — existing files are skipped by default with a warning.
- Feature: Model generator creates both
_model.dartand_response_model.dart. - Feature: Color-coded terminal output — ✔ green, ⚠ yellow, ✖ red, ℹ cyan.
1.0.0 #
- Initial release.
ag module <name> --full— full GetX module with search, history panel, smart refresh, and filter chips.ag module <name> --minimal— minimal module with no search.ag module <name> --search— search module without filter chips.- Auto-detects Flutter package name from
pubspec.yaml. --packageflag to override package name.--outputflag to override output directory.