Bootstrap production-grade Flutter architectures in seconds, generate modular components and clean feature slices, configure multi-environment flavors, manage type-safe assets, and diagnose setup health.
Run fkit with no arguments to launch the interactive dashboard:
$ fkit
β¦ Welcome to FKIT CLI (v1.2.0)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
? What would you like to do?
β― Create New Project β Scaffold a production-ready Flutter app
Make Component β Generate screen, controller, model, or service
Add Feature Slice β Add clean architecture feature module
Manage Assets β Generate type-safe asset code or clean unused
Configure Flavors β Automate Android, iOS & VS Code flavors
Doctor β Diagnose Flutter, CocoaPods, and project health
List Catalog β Browse supported architectures, state & packages
Exit
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- π― Interactive Terminal UX β Arrow-key navigation, step counters, ASCII wordmarks, and built-in interactive directory picker.
- ποΈ 5 Battle-Tested Architectures β Feature-First Clean Architecture, Modular, Layer-First Clean Architecture, MVVM, or lightweight MVC.
- β‘ 5 State Management Options β Flutter BLoC, Riverpod, Provider, GetX, or Vanilla Flutter.
- π‘οΈ Zero-Config Native Permissions β Automatically patches Android
AndroidManifest.xml, iOSInfo.plist, iOSPodfile, and macOSEntitlements. - β‘ Rapid Component Generators (
fkit make) β Generate screens, controllers, models, and services that automatically conform to your project's architectural pattern. - π§© Clean Feature Slices (
fkit feature) β Scaffold complete domain slices (data/,domain/,presentation/) in one command. - π·οΈ Automated Flavor System (
fkit flavor) β Configure Android productFlavors, iOS Xcode build schemes, and VS Code.vscode/launch.jsondebug configurations. - π¨ Type-Safe Asset Automation (
fkit assets) β Generate compile-safeAppAssetsconstants from your asset directories, and detect unreferenced/dead assets. - π©Ί Environment & Project Diagnostics (
fkit doctor) β Validate Flutter SDK, Dart SDK, CocoaPods, Android toolchain, and inspect project health. - π€ 100% CI/CD & Headless Automation β Full non-interactive flag support (
--no-interactive) for automated pipeline generation.
- Why FKIT CLI?
- Installation
- Commands Cheatsheet
- Quick Start
- Command Reference
- Architectures Breakdown
- Tech Stack & Features Matrix
- Automated Native Permissions
- Popular Recipe Examples
- CI/CD & Headless Usage
- Programmatic API
- Contributing
- License
Setting up a production Flutter application usually requires hours of repetitive work: assembling directory hierarchies, wiring router boilerplate, setting up HTTP interceptors, configuring local databases, editing Android manifests, iOS plists, and Podfiles, and generating boilerplate for every new screen or service.
FKIT CLI provides an end-to-end development toolkit from initial project scaffolding through active day-to-day feature development:
| Standard Flutter Workflow | With FKIT CLI |
|---|---|
| β³ 1β2 hours manual folder & package setup | β‘ < 10 seconds interactive or headless generation |
| β Inconsistent architecture across teams | β Standardized, battle-tested architectural blueprints |
| β Manual editing of AndroidManifest, Info.plist, Podfiles | β Automated native permission configuration |
| β Repetitive boilerplate for new screens & services | β
fkit make & fkit feature one-command generators |
| β Fragile manual flavor setups across Android & iOS | β
fkit flavor multi-environment automation |
β String-based asset typos ("assets/images/logo.png") |
β
fkit assets gen type-safe AppAssets constants |
| β Unused asset bloat inflating app bundle size | β
fkit assets clean dead asset detector |
| β Hard to diagnose missing dependencies & SDK tools | β
fkit doctor instant environment health checks |
dart pub global activate fkit_cliMake sure your pub global bin directory is in your system's PATH:
- macOS / Linux:
~/.pub-cache/bin - Windows:
%LOCALAPPDATA%\Pub\Cache\bin
dart pub global activate --source git https://github.com/hamzaali265/fkit-cli.gitgit clone https://github.com/hamzaali265/fkit-cli.git
cd fkit-cli
dart pub get
dart pub global activate --source path .Requirements: Dart SDK
^3.12.2and Flutter SDK3.xon yourPATH.
| Command | Description |
|---|---|
fkit |
Launch the interactive console with quick-action dashboard. |
fkit create <name> |
Scaffold a production-ready Flutter app with guided wizard or flags. |
fkit make screen <name> |
Generate a new screen/view conforming to the project architecture. |
fkit make controller <name> |
Generate a BLoC, Cubit, GetxController, or ChangeNotifier. |
fkit make model <name> |
Generate a data model with fromJson, toJson, and copyWith. |
fkit make service <name> |
Generate an API/data service with error handling & singleton. |
fkit feature add <name> |
Scaffold a complete Clean Architecture feature slice (data/, domain/, presentation/). |
fkit flavor add <name> |
Configure multi-flavor support across Android, iOS, and VS Code. |
fkit flavor list |
Display all configured project flavors. |
fkit assets gen |
Scan assets/ and generate type-safe AppAssets constants. |
fkit assets clean |
Scan codebase for unreferenced assets and report or remove them. |
fkit doctor |
Validate Flutter SDK, Dart SDK, CocoaPods, and project health. |
fkit list |
Display catalog of supported architectures, state, and packages. |
Run fkit with no arguments to enter the interactive console:
fkitRun the guided step-by-step creation wizard:
fkit create my_awesome_appNavigate into your Flutter project and generate components:
cd my_awesome_app
# Generate a screen
fkit make screen profile
# Generate a data model
fkit make model user
# Add a complete feature slice
fkit feature add authenticationScaffold everything non-interactively with explicit flags:
fkit create my_enterprise_app \
--architecture feature-first \
--state bloc \
--routing go_router \
--networking dio \
--storage hive \
--get-it \
--image-picker \
--permission-handler \
--org com.mycompany \
--no-interactiveLaunches the interactive terminal menu where you can navigate between project creation, component generation, flavor configuration, asset management, and diagnostics using arrow keys:
fkitScaffolds a new Flutter application. When run without options, it guides you through an interactive 6-step configurator.
fkit create <project_name> [options]| Flag | Shorthand | Type / Options | Default | Description |
|---|---|---|---|---|
--architecture |
-a |
feature-first | modular | layer-first | mvvm | simple-mvc |
Interactive | Folder architecture pattern. |
--state |
-s |
bloc | riverpod | provider | getx | none |
Interactive | State management solution. |
--routing |
-r |
go_router | auto_route | standard |
Interactive | Declarative routing strategy. |
--networking |
-n |
dio | http | none |
Interactive | HTTP networking client. |
--storage |
hive | shared_preferences | sqflite | none |
Interactive | Local persistence backend. | |
--org |
-o |
string |
com.example |
Organization reverse domain. |
--output |
-d |
path |
./ |
Output destination directory. |
--description |
string |
"A new Flutter project..." |
Description in pubspec.yaml. |
|
--[no-]interactive |
-i |
boolean |
true |
Enable or disable the interactive wizard. |
--[no-]offline |
boolean |
false |
Skip flutter pub get and online fetches. |
|
--[no-]strict-lints |
boolean |
true |
Include very_good_analysis rules. |
|
--[no-]l10n |
boolean |
true |
Include internationalization & starter ARB. | |
--[no-]flavors |
boolean |
true |
Include AppConfig environment flavors. | |
--[no-]assets |
boolean |
true |
Create structured assets/ folders. |
|
--[no-]svg |
boolean |
true |
Include flutter_svg package. |
|
--[no-]cached-image |
boolean |
true |
Include cached_network_image package. |
|
--[no-]gap |
boolean |
true |
Include gap layout package. |
|
--[no-]screenutil |
boolean |
false |
Include flutter_screenutil responsive library. |
|
--[no-]get-it |
boolean |
false |
Include get_it service locator. |
|
--[no-]permission-handler |
boolean |
false |
Include permission_handler + native config. |
|
--[no-]image-picker |
boolean |
false |
Include image_picker + native permissions. |
|
--[no-]file-picker |
boolean |
false |
Include file_picker + native entitlements. |
|
--[no-]secure-storage |
boolean |
false |
Include flutter_secure_storage vault. |
|
--[no-]geolocator |
boolean |
false |
Include geolocator + native location permissions. |
|
--[no-]url-launcher |
boolean |
false |
Include url_launcher + platform queries. |
|
--[no-]webview |
boolean |
false |
Include webview_flutter component. |
|
--[no-]uuid |
boolean |
false |
Include uuid package. |
|
--[no-]intl |
boolean |
true |
Include intl + AppFormatters helpers. |
|
--[no-]equatable |
boolean |
false |
Include equatable value equality helper. |
|
--[no-]crypto |
boolean |
false |
Include crypto SHA256/MD5 hashing helper. |
Quickly scaffold individual components inside an existing Flutter project. The generated files automatically match your project's architecture (feature-first, modular, layer-first, mvvm, or simple-mvc).
fkit make screen <screen_name>Generates screen widget with app bar, responsive body, and routing hook.
fkit make controller <name> [type]Generates state controller based on project stack (BLoC + Event + State, Cubit, GetxController, or ChangeNotifier).
fkit make model <model_name>Generates typed Dart data model with fromJson, toJson, copyWith, and toString methods.
fkit make service <service_name>Generates service layer class with pre-wired error handling, logging, and singleton access.
Scaffolds a complete modular feature slice adhering to Clean Architecture principles:
fkit feature add <feature_name>For example, fkit feature add auth generates:
lib/features/auth/
βββ data/
β βββ datasources/auth_remote_datasource.dart
β βββ models/auth_model.dart
β βββ repositories/auth_repository_impl.dart
βββ domain/
β βββ entities/auth_entity.dart
β βββ repositories/auth_repository.dart
β βββ usecases/login_usecase.dart
βββ presentation/
βββ controllers/auth_controller.dart
βββ views/auth_view.dart
βββ widgets/auth_form_widget.dart
Automates multi-flavor configuration without tedious manual editing:
# Add a new environment flavor
fkit flavor add <flavor_name> [options]
# List configured project flavors
fkit flavor listWhat it automates:
- π€ Android: Adds
productFlavorsandflavorDimensionstoandroid/app/build.gradle. - π iOS: Creates Xcode scheme configurations and build configurations in
ios/Runner.xcodeproj. - π― Dart Entrypoints: Generates
lib/main_<flavor>.dartwith environment-specificAppConfig. - π» VS Code: Generates
.vscode/launch.jsondebug profiles with--flavorand target entrypoints.
Manages static assets with type safety and size optimization:
fkit assets genScans assets/images/, assets/icons/, assets/svgs/, and assets/fonts/ and writes lib/core/constants/app_assets.dart:
// Generated by FKIT CLI β Type-Safe Asset Access
class AppAssets {
AppAssets._();
static const String imagesLogo = 'assets/images/logo.png';
static const String iconsUser = 'assets/icons/user.svg';
static const String svgsBackground = 'assets/svgs/background.svg';
}fkit assets clean [--delete]Scans all .dart files in your project, checks for referenced asset strings, and flags unreferenced files. Pass --delete to safely prune unused assets from disk.
Checks your machine's development environment and validates the health of your local Flutter project:
fkit doctorπ©Ί Running FKIT Doctor...
[β] Flutter SDK installed: Flutter 3.24.0 β’ channel stable
[β] Dart SDK installed: Dart SDK version: 3.12.2
[β] CocoaPods installed: pod 1.15.2
[β] Project root: Valid Flutter project structure detected
[β] Dependencies: pubspec.lock is synchronized
[β] FKIT Configuration: .fkit.json configuration is valid
β Doctor found 0 issues. Environment and project are ready!
Displays a terminal catalog of all supported architectures, state managers, routing engines, network clients, storage backends, and utility packages:
fkit listFKIT CLI offers 4 distinct architectural patterns to fit any team size and application scale:
Best for: Medium-to-large enterprise apps with modular, cross-functional domain boundaries.
lib/
βββ app/ # App widget, global routing, environment setup
βββ core/ # Common services, network clients, base models
β βββ config/ # AppConfig, environment constants
β βββ network/ # ApiClient, interceptors, error handling
β βββ di/ # Service locator / dependency injection
βββ features/ # Modular domain slices
β βββ auth/
β β βββ data/ # Models, datasources, repository implementations
β β βββ domain/ # Entities, repository interfaces, usecases
β β βββ presentation/ # BLoCs / controllers, screens, widgets
β βββ home/
β βββ data/
β βββ domain/
β βββ presentation/
βββ shared/ # Design system, themes, shared widgets, extensions
Best for: Apps following classical domain-driven or layer-separated clean design.
lib/
βββ app/ # Application entry, router configuration
βββ core/ # Constants, errors, utilities, network client
βββ data/ # Data sources, DTO models, repository implementations
βββ domain/ # Business models, repository contracts, usecases
βββ presentation/ # Screens, view logic, state controllers, widgets
βββ shared/ # Global styles, themes, extensions
Best for: Clean separation of UI from business logic and data without strict usecase overhead.
lib/
βββ app/ # Main app setup and routing
βββ core/ # Helpers, theme, network, constants
βββ models/ # Data structures and entities
βββ services/ # API, Storage, and Device services
βββ viewmodels/ # Reactive view models & state handlers
βββ views/ # Screen widgets and user interfaces
βββ widgets/ # Reusable UI components
Best for: Lightweight applications, MVPs, prototypes, and small utilities.
lib/
βββ controllers/ # App controllers and state coordinators
βββ models/ # Simple data models
βββ screens/ # Application screens
βββ services/ # Direct service and network layers
βββ widgets/ # Shared components and styles
Best for: Highly decoupled domain modules grouped by logic, providers, repositories, screens, and models.
lib/
βββ core/ # Common services, theme, network, routes
βββ modules/ # Self-contained domain modules
β βββ auth/
β β βββ logic/ # Controllers / Cubits / Notifiers
β β βββ providers/ # State and DI providers
β β βββ repositories/ # Data sources & repository implementations
β β βββ screens/ # UI screens
β β βββ models/ # Data models & entities
β βββ profile/
β βββ logic/
β βββ providers/
β βββ repositories/
β βββ screens/
β βββ models/
βββ shared/ # Reusable widgets, utils, extensions
| Category | Options & Packages | Description |
|---|---|---|
| Architecture | feature-first, modular, layer-first, mvvm, simple-mvc |
Clean folder structures tailored for scale |
| State Management | flutter_bloc, flutter_riverpod, provider, get, none |
Pre-wired with starter state, events, or providers |
| Routing | go_router, auto_route, standard |
Declarative routing with typed route configs |
| Networking | dio, http, none |
Configured with base options, JSON parsing, error handlers |
| Local Storage | hive_flutter, shared_preferences, sqflite, none |
Fast NoSQL storage, key-value persistence, or SQLite relational database |
| Dependency Injection | get_it |
Pre-wired initDependencies() service locator |
| Hardware & Devices | image_picker, file_picker, permission_handler, geolocator |
Camera/gallery, file picking, runtime permissions, and GPS location tracking |
| Secure Storage | flutter_secure_storage |
Keychain & Keystore encrypted storage |
| UI & Layout | gap, flutter_screenutil, flutter_svg, cached_network_image, webview_flutter |
Modern spacing, responsive sizing, vector/cached media, and in-app web views |
| Utilities & Cryptography | equatable, crypto, intl, url_launcher, uuid |
Value equality, SHA256/MD5 hashing, formatters, external links, and UUIDs |
| Quality & Lints | very_good_analysis |
Pre-configured strict linting rules |
| Internationalization | flutter_localizations, intl |
l10n.yaml with starter ARB dictionaries |
| Environment Flavors | Development / Staging / Production | AppConfig supporting --dart-define=ENVIRONMENT |
When hardware and device features are selected, FKIT CLI automatically patches your platform configuration files without manual copy-pasting:
Platform Configuration Breakdown:
βββ π€ Android (android/app/src/main/AndroidManifest.xml)
β βββ Internet & Network State permissions
β βββ Camera & Gallery storage permissions (READ_MEDIA_IMAGES / VIDEO)
β βββ Location permissions (ACCESS_FINE_LOCATION / ACCESS_COARSE_LOCATION)
β βββ Intent <queries> for url_launcher
β
βββ π iOS (ios/Runner/Info.plist & ios/Podfile)
β βββ NSCameraUsageDescription & NSPhotoLibraryUsageDescription
β βββ NSMicrophoneUsageDescription
β βββ NSLocationWhenInUseUsageDescription & NSLocationAlwaysAndWhenInUseUsageDescription
β βββ LSApplicationQueriesSchemes (https, http, mailto, tel)
β βββ Podfile macro flags (PERMISSION_CAMERA=1, PERMISSION_PHOTOS=1, PERMISSION_LOCATION=1)
β
βββ π» macOS (macos/Runner/*.entitlements)
βββ Network client entitlements (com.apple.security.network.client)
βββ File access entitlements (user-selected read-write)
βββ Location entitlements (com.apple.security.personal-information.location)
βββ Camera device permissions
fkit create enterprise_app \
--architecture feature-first \
--state bloc \
--routing go_router \
--networking dio \
--storage hive \
--get-it \
--permission-handler \
--image-picker \
--file-picker \
--no-interactivefkit create reactive_app \
--architecture mvvm \
--state riverpod \
--routing go_router \
--networking dio \
--storage shared_preferences \
--secure-storage \
--screenutil \
--no-interactivefkit create quick_prototype \
--architecture simple-mvc \
--state getx \
--routing standard \
--networking http \
--storage shared_preferences \
--no-interactiveFKIT CLI is designed to run headlessly in CI/CD pipelines (GitHub Actions, GitLab CI, Docker):
# .github/workflows/scaffold_test.yml
name: Scaffold & Verify Project
on: [push, pull_request]
jobs:
scaffold:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
channel: 'stable'
- name: Install FKIT CLI
run: dart pub global activate fkit_cli
- name: Scaffold App
run: |
fkit create test_app \
--architecture feature-first \
--state bloc \
--routing go_router \
--networking dio \
--storage hive \
--no-interactive
- name: Verify Generated App
run: |
cd test_app
flutter analyze
flutter testYou can also use package:fkit_cli as a Dart library in your custom automation scripts:
import 'dart:io';
import 'package:fkit_cli/fkit_cli.dart';
void main() async {
final runner = FkitCommandRunner();
// Run doctor diagnostics programmatically
await runner.run(['doctor']);
// Or inspect supported architecture patterns
for (final pattern in ArchitecturePattern.values) {
print('${pattern.label}: ${pattern.description}');
}
}See the example/ directory for complete runnable demonstrations.
Contributions, feature requests, and bug reports are warmly welcome!
- Check out the Contributing Guidelines.
- Fork the repository and create your feature branch:
git checkout -b feature/my-new-feature
- Run tests and static analysis:
dart analyze dart test - Commit your changes following Conventional Commits:
git commit -m "feat: add support for supabase template" - Push to your branch and submit a Pull Request!
This project is licensed under the MIT License β see the LICENSE file for details.
Crafted with β€οΈ by hamzaali265
If FKIT CLI helps accelerate your Flutter development, please give it a β on GitHub and π on pub.dev!