boltforge 0.1.0
boltforge: ^0.1.0 copied to clipboard
A CLI that scaffolds production-ready Flutter projects (Cubit + Repository + GetIt architecture) and generates fully-wired features on demand.
Changelog #
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-09-09 #
Initial release.
Added #
boltforge create <name>— scaffolds a new Flutter project:- Runs
flutter create, then addsflutter_bloc,bloc,dio,get_it, andshared_preferencesviaflutter pub add. - Applies a base architecture under
lib/core/: aGetItservice locator, aDioclient with a Token → Retry → ErrorMapper interceptor chain, anApiResult<T>/ApiErrorcontract, a lightweightNavigator-based router, shared loading/error/empty widgets, and reusable form widgets. --auth=password: generates a login / register / forgot-password flow.--auth=otp: generates an email-or-phone verification flow that only asks for a name when the identifier is new.- Runs
flutter pub get,flutter analyze, andflutter test, and reports the first real failure instead of claiming success.
- Runs
boltforge generate <name>— generates a feature (cubit,repository,model,presentation/{screen,widgets}) underlib/features/<name>/inside an existing project, following the same Cubit + Repository conventions as the rest of the app.- Automatically registers the new repository into
lib/core/di/service_locator.dart(import +registerLazySingleton), with no duplicate imports or registrations on repeated runs. - Prompts to cancel, overwrite, or merge when the feature already exists.
- Validates the result after generation: missing files, leaked
.tmplfiles, unresolved template placeholders, and missing or duplicated DI registrations are reported, with a non-zero exit code on real errors.
- Automatically registers the new repository into
boltforge doctor— checks that Dart and Flutter are available.- Backend-agnostic networking:
ApiConstants.baseUrland endpoint paths are left for the user to fill in; nothing assumes a specific backend. - Package resource resolution (
lib/src/core/package_paths.dart) viaIsolate.resolvePackageUri, correct whether boltforge is run from source, via a cacheddart pub global activatesnapshot, or once installed from pub.flutter-io.cn. - Full documentation site under
docs/(in Arabic; code, commands, and file names stay in English), and an interactive,localStorage-backedproject-dashboard.html. - A test suite covering the template engine, name casing/validation, file generation with conflict handling, DI registration, post-generation validation, process execution, and the CLI commands themselves.