scaffold_cli 1.0.0
scaffold_cli: ^1.0.0 copied to clipboard
A CLI tool to scaffold Flutter projects with popular folder structures and state management.
π scaffold_cli #
A Dart CLI tool to scaffold Flutter projects with popular architecture patterns and state management solutions.
π Requirements #
- Dart SDK
>=3.0.0 - Flutter installed globally or FVM installed
π Installation #
# Clone / extract the package
cd scaffold_cli
# Install dependencies
dart pub get
# Activate globally
dart pub global activate --source path .
Add pub-cache bin to your PATH (if not already):
# ~/.bashrc or ~/.zshrc
export PATH="$PATH:$HOME/.pub-cache/bin"
π Command Reference #
| Command | Description |
|---|---|
scaffold create <name> |
Create a new Flutter project |
scaffold list |
List all available folder structures |
scaffold info <1-6> |
Show detailed info about a structure |
scaffold doctor |
Check environment compatibility |
scaffold version |
Show CLI version |
scaffold help |
Show general help |
scaffold help <command> |
Show help for a specific command |
π― scaffold create #
scaffold create <project_name> [options]
Options:
--structure, -s <1-6> Skip the menu β pick structure by number
--org <com.example> Set the org/bundle prefix (default: com.example)
--help, -h Show help for this command
Examples:
scaffold create my_app
scaffold create my_app --structure 1
scaffold create my_app -s 5 --org com.mycompany
scaffold create shop_app --structure 6 --org io.mystore
Shorthand (no subcommand needed): #
# These are equivalent:
scaffold my_app
scaffold create my_app
Flutter / FVM integration: #
# Works with global Flutter
flutter pub global run scaffold_cli create my_app
# Works with FVM
fvm flutter pub global run scaffold_cli create my_app
What happens after create:
- Detects Flutter version (FVM or global)
- Prompts for structure (or uses
--structureflag) - Runs
flutter create --org <org> <name> - Generates folders and starter Dart files
- Updates
pubspec.yamlwith curated dependencies - Runs
flutter pub get
π scaffold list #
scaffold list [options]
Options:
--detail, -d Show the full folder tree for every structure
--help, -h Show help
Examples:
scaffold list # Summary view
scaffold list --detail # Full folder trees
scaffold list -d
π scaffold info #
scaffold info <1-6>
Examples:
scaffold info 1 # MVVM + GetX details
scaffold info 5 # Feature-First + GetX details
Shows for each structure:
- Architecture pattern
- State management approach
- Best-for use cases
- Pros and cons
- Included packages
- Full folder tree
π©Ί scaffold doctor #
scaffold doctor
Checks:
- β Dart SDK version
- β Flutter (global) installation
- β FVM installation
- β
~/.pub-cache/binin PATH - β Git installation
π’ scaffold version #
scaffold version
scaffold --version
scaffold -v
β scaffold help #
scaffold help # General help + command list
scaffold help create # Help for the create command
scaffold help list
scaffold help info
scaffold help doctor
scaffold -h
scaffold --help
π Available Folder Structures #
| # | Name | State Management | Best For |
|---|---|---|---|
| 1 | MVVM + GetX | GetX .obs |
Mediumβlarge, reactive, low boilerplate |
| 2 | MVVM + Provider | ChangeNotifier | Flutter-native, testable ViewModels |
| 3 | MVC + GetX | GetX .obs |
Simple apps, quick prototypes |
| 4 | MVC + Provider | ChangeNotifier | Simple apps, Flutter-standard |
| 5 | Feature-First + GetX | GetX .obs |
Large apps, scalable, team-friendly |
| 6 | Feature-First + Provider | ChangeNotifier | Large apps, clean architecture, testable |
π¦ Auto-included Dependencies #
| Package | Version | Used in |
|---|---|---|
| get | ^4.6.6 | GetX structures |
| provider | ^6.1.2 | Provider structures |
| equatable | ^2.0.5 | All |
| dio | ^5.4.3 | All |
| get_it | ^7.6.7 | All |
| go_router | ^14.2.7 | All |
| flutter_svg | ^2.0.10 | All |
| cached_network_image | ^3.3.1 | All |
| shared_preferences | ^2.2.3 | All |
| logger | ^2.4.0 | All |
π License #
MIT