Flutter DevOps Kit (FKIT)

Pub Version Pub Likes Pub Points License: MIT

FKIT is a command-line toolkit for Flutter project setup, feature scaffolding, module installation, localization, flavors, builds, signing, Firebase App Distribution, and day-to-day maintenance.

The current production-ready architecture template is bloc_clean. Riverpod, MVVM, Provider, and GetX templates are planned.

Installation

Install FKIT globally:

dart pub global activate flutter_devops_kit

Make sure Dart global executables are on your PATH.

macOS/Linux:

export PATH="$PATH:$HOME/.pub-cache/bin"

Windows:

%LOCALAPPDATA%\Pub\Cache\bin

Verify:

fkit help
fkit doctor

Update:

dart pub global activate flutter_devops_kit

Uninstall:

dart pub global deactivate flutter_devops_kit

Requirements

  • Flutter SDK
  • Dart SDK
  • Git
  • Firebase CLI, only for Firebase App Distribution workflows
  • Java/Android tooling, only for Android builds/signing
  • Xcode/CocoaPods, only for iOS builds

Run fkit doctor to check the local environment.

Quick Start

Run these commands inside a Flutter project root:

fkit init
fkit setup --yes
fkit feat profile --no-build-runner
fkit make screen profile Profile --no-build-runner
fkit generate
fkit run development

fkit init creates fkit.yaml. fkit setup applies the selected template, adds declared dependencies, installs setup modules, generates bootstrap files, generates localization files when enabled, and runs required generation steps.

Configuration

Minimal fkit.yaml:

fkit:
  version: 0.1.1

project_name: my_app

tooling:
  use_fvm: false

platforms:
  android: true
  ios: true
  web: false

generator:
  feature_dir: lib/features
  default_template: bloc_clean

entry:
  main: lib/main.dart

flavoring:
  enabled: false
  default: main

flavors:
  - main

environment:
  enabled: false
  configurations: {}

firebase:
  enabled: false
  tester_group: internal-testers
  configurations: {}

localization:
  enabled: false
  arb_dir: lib/l10n
  template: app_en.arb
  output_dir: lib/gen/l10n
  output_file: app_localizations.dart
  default_locale: en
  locales:
    - en

A larger documented sample is available in example/fkit.yaml. A minimal Flutter fixture for setup testing is available in example/flutter_app.

Core Commands

Command Purpose
fkit help [command] Show command help
fkit doctor Check local tooling
fkit init Create fkit.yaml interactively
fkit setup [--yes|--force] Apply the selected template setup
fkit config [section] Print the loaded FKIT configuration
fkit validate Validate project configuration
fkit get Run flutter pub get
fkit generate Run build runner
fkit watch Run build runner in watch mode
fkit analyze Run Dart analysis
fkit format Format Dart files
fkit fix Apply Dart fixes
fkit feat <feature> [--yes|--force] [--no-build-runner] Generate a feature
fkit make <component> <feature> [name] [--yes|--force] [--no-build-runner] Generate a component
fkit install <module> [--yes|--force] Install a template module
fkit l10n <setup|generate|doctor> [--yes|--force] Manage localization
fkit run [flavor] [-p] [-r] [-t android|ios|web] Run the app
fkit build <apk|aab|ipa|web> [flavor] Build the app
fkit firebase [target] [-p android|ios] [-n "notes"] [-g group] Build and upload to Firebase App Distribution
fkit signing <setup|doctor> Manage Android signing
fkit icon <generate|configure|doctor> Manage launcher icons
fkit extension generate Generate common Flutter extensions

For detailed usage and examples, see doc/commands.md.

Generation Flags

  • --yes and --force overwrite generated files without interactive prompts.
  • --no-build-runner skips build runner for feature and component generation.
  • Setup and localization services can be tested without external Flutter commands through their service-level APIs.

Generated feature files require the selected template's declared dependencies. For bloc_clean, setup adds the required BLoC, Freezed, JSON serialization, and build runner packages.

Available Template and Modules

Template:

  • bloc_clean: feature-first Clean Architecture using flutter_bloc

Setup modules:

  • theme: Material 3 theme, theme cubit, colors, typography
  • router: GoRouter configuration and route markers
  • network: Dio API service, response models, failures, interceptors, optional Talker logging

Fallbacks and Error Handling

FKIT provides explicit fallbacks for common incorrect invocations:

  • Unknown top-level commands print help and suggest close command names.
  • fkit help <unknown> suggests close command names.
  • Commands that require a Flutter project fail early when pubspec.yaml is missing or does not look like a Flutter project.
  • Commands that require FKIT configuration fail early when fkit.yaml is missing and tell you to run fkit init.
  • Subcommands such as fkit l10n, fkit signing, fkit icon, and fkit extension print supported actions when an action is missing or invalid.

Examples:

fkit hepl
fkit help install
fkit l10n unknown

Common Workflows

Fresh BLoC project setup:

flutter create my_app
cd my_app
fkit init
fkit setup --yes

Generate a feature without running build runner immediately:

fkit feat auth --no-build-runner
fkit generate

Install modules manually:

fkit install theme --yes
fkit install router --yes
fkit install network --yes

Localization:

fkit l10n setup --yes
fkit l10n doctor

Flavor-aware build:

fkit build apk production
fkit build web production

Firebase distribution:

fkit firebase staging -p android -g qa -n "QA regression build"

Documentation

Status

FKIT is under active development. The bloc_clean template is the supported production-ready template in this release; other architecture templates are planned and intentionally unavailable until their manifests are implemented.

License

MIT. See LICENSE.

Libraries

analyzer/models/constructor_parameter
analyzer/models/constructor_resolver
commands/analyze_command
commands/build_command
commands/clean_command
commands/config_command
commands/doctor_command
commands/extension_command
commands/feature_command
commands/firebase_command
commands/fix_command
commands/format_command
commands/generate_command
commands/get_command
commands/help_command
commands/icon_command
commands/init_command
commands/install_command
commands/localization_command
commands/make_command
commands/run_command
commands/setup_command
commands/signing_command
commands/validate_command
commands/watch_command
core/base_arg_command
core/command
core/command_args
core/command_category
core/command_registry
core/fkit_version
core/package_version
generators/core/generator_context
generators/core/generator_mixin
generators/core/package_locator
generators/core/template_locator
generators/core/template_renderer
generators/extension/media_query_extension_generator
generators/extension/theme_extension_generator
generators/feature/component_generator
generators/feature/feature_generator
generators/feature/registration_resolver
generators/feature/resolved_registration
generators/fkit_yaml/sections/build_section
generators/fkit_yaml/sections/entry_section
generators/fkit_yaml/sections/environment_section
generators/fkit_yaml/sections/firebase_section
generators/fkit_yaml/sections/fkit_section
generators/fkit_yaml/sections/flavor_section
generators/fkit_yaml/sections/generator_config_section
generators/fkit_yaml/sections/generator_section
generators/fkit_yaml/sections/localization_section
generators/fkit_yaml/sections/platform_section
generators/fkit_yaml/sections/project_section
generators/fkit_yaml/sections/tooling_section
generators/fkit_yaml/yaml_generator
generators/localization/arb_generator
generators/localization/l10n_yaml_generator
generators/localization/localization_extension_generator
generators/maintainers/app_maintainer
generators/maintainers/barrel_maintainer
generators/maintainers/di_maintainer
generators/maintainers/import_resolver
generators/maintainers/maintainer
generators/maintainers/route_maintainer
generators/maintainers/section_maintainer
generators/module/integration/get_it_network_integrator
generators/module/integration/module_integrator
generators/module/integration/module_integrator_registry
generators/module/integration/router_module_integrator
generators/module/module_context
generators/module/module_generator
generators/module/module_option_resolver
generators/module/module_variable_resolver
generators/route/existing_route_resolver
generators/route/existing_route_status
generators/route/renderer/go_router_renderer
generators/route/renderer/route_renderer
generators/route/resolved_route
generators/route/route_import_resolver
generators/route/route_resolver
mappers/config_mapper
models/build_mode
models/build_platform
models/build_result
models/config/config_reconciliation_result
models/config/config_section
models/environment/environment_config
models/environment/environment_details
models/firebase/firebase_config
models/firebase/firebase_details
models/firebase/firebase_platform
models/init_config
models/launcher_icon_config
models/localization/localization_config
models/module/module_definition
models/module/module_file
models/module/module_installation_result
models/module/module_integration
models/module/module_option
models/module/module_option_type
models/module/module_package
models/module/module_requirements
models/platform_config
models/template/registration_lifecycle
models/template/template_barrel
models/template/template_bootstrap
models/template/template_bootstrap_file
models/template/template_component
models/template/template_definition
models/template/template_di
models/template/template_feature
models/template/template_file
models/template/template_group
models/template/template_module
models/template/template_registration
models/template/template_requirements
models/template/template_router
models/template/template_setup
services/artifact_service
services/build_service
services/config/config_display_service
services/config/config_reconciliation_service
services/config/config_section_writer
services/config/config_service
services/config/config_update_service
services/extension_service
services/feature_generation_service
services/firebase_service
services/flutter_service
services/launcher_icon_service
services/localization_service
services/logger_service
services/maintenance_service
services/module_installation_service
services/module_integration_service
services/module_service
services/naming_service
services/placeholder_service
services/project_bootstrap_service
services/project_setup_service
services/prompt_service
services/pubspec_service
services/signing_service
services/template_service
utils/app_platform
utils/command_executor
utils/path_utils
utils/platform_utils
utils/process_utils
validators/file_validator
validators/flavor_validator
validators/init_validator
validators/localization_validator
wizard/init_wizard
wizard/models/flavor_setup
wizard/models/generator_setup
wizard/models/platform_setup
wizard/steps/environment_step
wizard/steps/feature_step
wizard/steps/firebase_step
wizard/steps/flavor_step
wizard/steps/generator_step
wizard/steps/localization_step
wizard/steps/platform_step
wizard/steps/project_step
wizard/steps/tooling_step
wizard/wizard_step