Abd Alftah Salem
Hire me
←All case studies

Case study · Open source

Thunder CLI

A command-line tool that sets up Flutter projects and features with one command, so the boilerplate is never written by hand.

01Problem

The same folders and files, every time

Every new Flutter project started the same way, and so did every new feature or repository: I already knew which directories and files it needed, but creating and wiring them by hand was slow and tedious. So I built a CLI to do it for me — in 2023, before AI coding tools existed to help.

02My role

Creator and maintainer

I designed Thunder and have maintained it since the first pub.dev release in September 2023. Version 3.0.0 is a full rebuild: new sub-commands, three state-management styles and a separate template repository.

03How it works

One command, a ready project

thunder init runs flutter create, then lays the chosen template on top: networking, DI, routing, theming, localization and a first feature. After that, each generator writes code in the style the project was created with.

How Thunder CLI works

How Thunder CLI worksthunder init--state getx | bloc | cubitThunder-Templatebranch per styleBundled copyoffline fallbackFlutter projectstyle saved in thunder.jsonfeature · modelviews, blocs, modelsc_api · localizationPostman → API code
$ dart pub global activate thunder_cli
$ thunder init shop_app --state bloc
$ cd shop_app
$ thunder feature cart
✅ Create …/cart/bloc/cart_bloc.dart
✅ Create …/cart/cart_view.dart
✅ Register 'cart' in injection.dart
$ thunder c_api --collection api.json
$ thunder localization --from en --to ar,fr

04Key technical decisions

The choices that shaped it

Templates live in their own repo

Each style is a real, compiling Flutter app on its own branch of Thunder-Template (getx, bloc, cubit). Improving a template is a normal pull request, not an edit to strings inside the CLI.

One saved choice drives every generator

The state-management style is written to thunder.json at init. Every later command reads it, so a team never mixes styles by accident.

Sub-commands, old flags still work

v3 moved to init, feature, model, c_api and localization sub-commands, while the 2.x --flags keep working and -y skips prompts in CI.

05Hard parts solved

What made it more than a script

Works offline

If the template download fails — or with --offline — Thunder falls back to a copy of all three templates bundled inside the package, so init never depends on the network.

Windows, macOS and Linux

Earlier versions relied on Windows-only commands and \ paths. v3 builds every path through Dart's path package, so one codebase runs everywhere.

Three styles, one tool

A feature becomes a controller, a bloc with events and state, or a cubit; a Postman folder becomes one bloc event or one cubit method per request.

06Outcome

A big win on real projects

I used Thunder on my own real projects, and starting a project or adding a feature stopped being repetitive manual work. Its CI generates a full app for each of the three styles, then runs flutter analyze and the tests on it.

32releases on pub.dev
3state-management styles
41unit tests
160/160pana score on the release branch

Release history on pub.dev

2.0.6Sep 20232.2.8Jan 20253.0.0Oct 2026

Each dot is a published version (32 in total). Source: pub.dev API.

Commits per month · 196 total

2023202420252026

Source: git history of the main branch (Oct 31, 2026).

07Stack & links

Built with

© 2026 Abd Alftah Salem · Back to portfolio