FKIT — Flutter DevOps Kit

FKIT is a command-line toolkit for Flutter project automation, code generation, builds, Firebase distribution, flavors, and Clean Architecture.

A scalable, template-driven Flutter CLI toolkit for project automation, code generation, reusable architecture workflows, builds, Firebase distribution, signing, localization, and developer tooling.

FKIT is designed to reduce repetitive Flutter setup and development tasks while remaining flexible enough to support different project architectures and engineering workflows.


Overview

FKIT (Flutter DevOps Kit) is a reusable command-line toolkit built for Flutter developers and teams.

Instead of repeatedly configuring project structure, architecture, modules, builds, signing, localization, Firebase distribution, launcher icons, and code generation manually, FKIT provides a unified CLI workflow.

FKIT is installed globally once and configured per Flutter project using:

fkit.yaml

The toolkit is designed around three major ideas:

  • Project automation
  • Template-driven code generation
  • Reusable development workflows

FKIT can be used for both existing Flutter projects and newly initialized projects.


Installation

FKIT can be installed globally using the Dart package manager.

Prerequisites

Before installing FKIT, make sure the following are available:

  • Flutter SDK
  • Dart SDK
  • Git

Verify your Flutter and Dart installations:

flutter --version
dart --version

macOS / Linux

Install FKIT globally:

dart pub global activate flutter_devops_kit

Add the Dart global executable directory to your PATH.

Zsh

echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.zshrc
source ~/.zshrc

Bash

echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc
source ~/.bashrc

Verify the installation:

fkit help

Windows

Install FKIT globally using PowerShell or Command Prompt:

dart pub global activate flutter_devops_kit

The Dart global executable directory is typically:

%LOCALAPPDATA%\Pub\Cache\bin

Add this directory to the Windows PATH environment variable.

Using Windows Settings

  1. Open System Properties.
  2. Select Advanced.
  3. Select Environment Variables.
  4. Under User variables, select the Path variable.
  5. Select Edit.
  6. Select New.
  7. Add:
%LOCALAPPDATA%\Pub\Cache\bin
  1. Save the changes and restart your terminal.

Verify the installation:

fkit help

Update FKIT

To update to the latest published version:

dart pub global activate flutter_devops_kit

Uninstall FKIT

To remove FKIT:

dart pub global deactivate flutter_devops_kit

Verify Installation

After installation, run:

fkit help

You can also verify your development environment with:

fkit doctor

Once installed, FKIT is available globally and can be used inside any Flutter project.

Why FKIT?

Flutter projects often require repetitive setup and maintenance tasks such as:

  • Creating architecture-specific feature folders
  • Generating DTOs, entities, repositories, use cases, BLoCs, and screens
  • Maintaining dependency injection registrations
  • Maintaining application routes
  • Installing reusable project modules
  • Configuring launcher icons
  • Running code generation
  • Managing Flutter and FVM commands
  • Building APK, AAB, IPA, and Web applications
  • Managing flavors
  • Uploading builds to Firebase App Distribution
  • Configuring Android signing
  • Managing localization workflows
  • Running formatting, analysis, and automated fixes

FKIT provides a single CLI interface for these workflows.

fkit <command>

Version

Current release:

0.1.1

FKIT is under active development.

The current release focuses on building the foundation for a scalable Flutter CLI ecosystem, including template-driven generation, reusable modules, project automation, and architecture-aware maintenance.


Features

Available Features

Project Setup & Configuration

  • Global CLI installation
  • Interactive project initialization
  • YAML-based project configuration
  • Template-driven project setup
  • Automated project bootstrap generation
  • Environment diagnostics and validation
  • FVM support
  • Multi-platform project configuration

Code Generation

  • Feature-first architecture scaffolding
  • Feature generation with fkit feat
  • Component generation with fkit make
  • Resource generation workflows
  • Template-driven generators
  • Automatic barrel file maintenance
  • Automatic dependency injection maintenance
  • Build Runner integration

Reusable Modules

  • Module installation with fkit install
  • Template-defined module configuration
  • Interactive module options
  • Conditional file generation
  • Conditional package dependencies
  • Automated dependency management
  • Generic and DI-specific module integrations

Currently available modules:

  • Theme
  • Router
  • Network

Routing

  • GoRouter module generation
  • Automatic route discovery
  • Automatic route synchronization
  • Existing route detection
  • Duplicate route prevention
  • Preservation of manually customized routes
  • Automatic route import maintenance

Network Layer

  • Dio-based API service
  • Typed API responses
  • Generic response mappers
  • Object and list response mapping
  • Pagination support
  • API response extensions
  • Centralized failure handling
  • Dio exception mapping
  • Network connectivity monitoring
  • Network interceptor
  • Authentication interceptor
  • Optional Talker application and network logging

Localization

  • Localization setup
  • ARB file generation
  • l10n.yaml generation
  • Localization validation
  • Localization diagnostics
  • Automatic Flutter localization dependency configuration

Build & Distribution

  • APK builds
  • Android App Bundle builds
  • IPA builds
  • Flutter Web builds
  • Flavor-aware workflows
  • Firebase App Distribution
  • Android signing setup
  • Dart code obfuscation support

In Development

  • Additional reusable modules
  • Additional architecture templates
  • Improved project setup customization
  • Expanded automated test coverage
  • Additional module integration strategies

Planned Features

  • Fastlane integration
  • Play Store deployment
  • App Store deployment
  • Web deployment automation
  • Release pipelines
  • Git tagging
  • Changelog generation
  • CI/CD templates
  • Slack and Discord notifications

Quick Start

1. Initialize FKIT

Run inside your Flutter project:

fkit init

This creates the FKIT project configuration and allows you to configure project settings and select the default architecture template.


2. Prepare Project Prerequisites

Before running the complete project setup, configure any project-specific prerequisites required by your application.

Examples include:

  • Firebase configuration
  • Flutter flavors
  • Environment files
  • Platform-specific configuration

3. Set up the Project

fkit setup

The setup command reads the selected architecture template and automatically performs the configured project setup workflow.

Depending on the selected template, FKIT can:

  • Install reusable modules
  • Add required dependencies
  • Generate configured features
  • Synchronize dependency injection
  • Synchronize application routes
  • Generate project bootstrap files
  • Configure project-level requirements
  • Run dependency synchronization
  • Execute required code generation

For example, a template may define:

setup:
  modules:
    - theme
    - router
    - network

  features:
    - auth

  bootstrap:
    enabled: true

    app:
      template: bootstrap/app.dart.tpl
      output: lib/app/view/app.dart

    main:
      template: bootstrap/main.dart.tpl
      output: lib/main.dart

Running:

fkit setup

can transform a fresh Flutter project into a structured, architecture-ready starting point.


4. Validate the Environment

fkit doctor

5. Generate Additional Features

fkit feat profile

6. Generate Feature Components

fkit make screen auth login

7. Install Additional Modules

fkit install network

8. Build the Application

fkit build apk production

9. Upload to Firebase App Distribution

fkit firebase production

Core Commands

Command Description
fkit help Show available commands
fkit doctor Validate the development environment
fkit init Initialize FKIT configuration
fkit setup Setup the project using the selected architecture template
fkit config Display the currently loaded FKIT configuration
fkit feat auth Generate a complete feature module
fkit make screen auth login Generate a feature component
fkit install theme Install the theme module
fkit install router Install the router module
fkit install network Install the network module
fkit l10n setup Setup Flutter localization
fkit l10n generate Generate localization files
fkit l10n doctor Validate localization configuration
fkit build apk production Build an APK
fkit build aab production Build an Android App Bundle
fkit build ipa production Build an IPA
fkit build web production Build the Flutter Web application
fkit firebase production Upload a build to Firebase App Distribution
fkit signing setup Setup Android signing

Template-Driven Architecture

FKIT uses reusable architecture templates to define how projects, features, components, modules, routing, dependency injection, and project setup workflows are generated.

The currently available template is:

  • bloc_clean — Feature-first Clean Architecture using flutter_bloc

Templates can define:

  • Feature structure
  • Components
  • Component groups
  • Barrel files
  • Dependency injection
  • Routing
  • Reusable modules
  • Project requirements
  • Project setup workflows
  • Application bootstrap files

This architecture allows FKIT to support additional project structures and state-management approaches in future releases without coupling generators directly to a single architecture.


Reusable Modules

FKIT modules provide reusable project-level functionality that can be installed independently.

fkit install <module>

Available modules include:

fkit install theme
fkit install router
fkit install network

Modules can define:

  • Generated files
  • Required dependencies
  • Development dependencies
  • Interactive configuration options
  • Conditional files
  • Conditional dependencies
  • Build Runner requirements
  • Template and DI-specific integrations

This allows modules to remain reusable while adapting their integration behavior to the selected architecture template.

Architecture

FKIT follows a configuration-driven and template-driven architecture.

The CLI is organized around:

Commands
    ↓
Services
    ↓
Templates
    ↓
Generators
    ↓
Resolvers
    ↓
Maintainers
    ↓
Integrators

Major architectural concepts include:

  • Commands for user-facing workflows
  • Services for reusable application logic
  • Templates for architecture-specific behavior
  • Generators for file creation
  • Resolvers for project discovery
  • Maintainers for existing code synchronization
  • Integrators for module and architecture integration

This structure is designed to prevent architecture-specific logic from being hardcoded directly into CLI commands.


Recommended Flutter Project Structure

A configured Flutter project may look like:

my_flutter_project/
├── android/
├── ios/
├── web/
├── lib/
│   ├── app/
│   ├── core/
│   └── features/
├── env/
├── pubspec.yaml
└── fkit.yaml

The exact project structure depends on the selected FKIT architecture template.


Development

Clone the FKIT repository and retrieve dependencies:

dart pub get

Run FKIT locally:

dart run bin/fkit.dart help

Activate the local package globally:

dart pub global activate --source path .

After making CLI changes, reactivate the package:

dart pub global activate --source path .

Run FKIT inside a test Flutter project:

fkit help

Publishing

Before publishing a new FKIT version:

dart format .
dart analyze
dart test

Run a dry publish:

dart pub publish --dry-run

If validation succeeds:

dart pub publish

Project Status

FKIT is under active development.

The 0.1.x releases focus on establishing the core architecture, template system, generators, maintainers, reusable modules, and project automation foundation.

Breaking changes may occur while the architecture evolves toward a stable release.


Contributing

Contributions, bug reports, architecture templates, modules, and automation ideas are welcome.

Areas of contribution include:

  • Build automation
  • Deployment workflows
  • Architecture templates
  • Module development
  • Feature generators
  • Maintainers
  • Integrators
  • CI/CD templates
  • Documentation
  • Testing

License

MIT License


Author

Built with ❤️ for scalable Flutter engineering workflows.

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_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/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/barrel_maintainer
generators/maintainers/di_maintainer
generators/maintainers/import_resolver
generators/maintainers/maintainer
generators/maintainers/route_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/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
models/build_mode
models/build_platform
models/build_result
models/firebase_details
models/firebase_platform
models/flavor_details
models/init_config
models/launcher_icon_config
models/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_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_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/localization_setup
wizard/models/platform_setup
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