First off, thank you for considering contributing to FKIT CLI! 🎉
Whether you are fixing a bug, adding support for a new state manager or architecture, improving native platform configurations, or enhancing documentation — your help is greatly appreciated.
- Code of Conduct
- Development Setup
- Project Architecture
- Adding New Templates & Options
- Coding Guidelines & Style
- Testing & Quality Verification
- Commit Conventions
- Submitting a Pull Request
We are committed to providing a friendly, welcoming, and harassment-free environment for everyone. Please be respectful and constructive in all issues, pull requests, and discussions.
- Dart SDK
^3.12.2 - Flutter SDK (latest stable recommended)
- Git
-
Fork and clone the repository:
git clone https://github.com/<your-username>/fkit-cli.git cd fkit-cli
-
Install dependencies:
dart pub get
-
Activate your local build globally:
dart pub global activate --source path .Now running
fkitin any terminal will use your local modifications! -
Run the CLI directly during development:
dart run bin/fkit.dart
lib/
├── fkit_cli.dart # Public package exports & version metadata
└── src/
├── command_runner.dart # Top-level CLI command dispatcher & error handling
├── commands/ # Subcommand implementations (create, list)
├── models/ # Data models (ProjectConfig, enums, catalog items)
├── prompts/ # Interactive terminal UI, themes, & directory picker
├── generator/ # Project builder, file orchestrator, & native permission patchers
└── templates/ # Code generation templates (screens, routers, DI, themes, pubspec)
When adding a new architecture, state management library, or utility package:
-
Define the Option in Models:
- Add the enum or entry to
lib/src/models/project_config.dart. - Update
ChoiceCataloginlib/src/prompts/choice_catalog.dart.
- Add the enum or entry to
-
Add CLI Flags:
- Register corresponding flags in
lib/src/commands/create_command.dart.
- Register corresponding flags in
-
Create/Update Generator Templates:
- Place templates in
lib/src/templates/(e.g.state_templates.dart,routing_templates.dart, orscreen_templates.dart). - Hook the generation into
TemplateEngineinlib/src/generator/template_engine.dart.
- Place templates in
-
Configure Platform Permissions (If Native Hardware/Services):
- If the package requires iOS
Info.plist, Android permissions, or macOS entitlements, add the rules tolib/src/generator/platform_permission_configurator.dart.
- If the package requires iOS
-
Write Unit and Generation Tests:
- Add test cases in
test/models_test.dartortest/e2e_generation_test.dart.
- Add test cases in
- Follow Effective Dart: Follow standard Dart conventions and clean architectural principles.
- Strict Analysis: All code must conform to the linting rules defined in
analysis_options.yaml. - Formatting: Always format your code before committing:
dart format .
Before opening a pull request, ensure all tests and lints pass cleanly:
# 1. Format check
dart format --output=none --set-exit-if-changed .
# 2. Static analysis
dart analyze
# 3. Unit & End-to-End Tests
dart testWe follow Conventional Commits to keep the commit history clean and facilitate automated releases:
feat:A new feature or template optionfix:A bug fix or UI correctiondocs:Documentation updates (README, CHANGELOG, etc.)style:Formatting or whitespace changes (no production code change)refactor:Code restructuring without modifying behaviortest:Adding or updating unit/e2e testschore:Maintenance, dependency bumps, or tooling updates
Example: feat(generator): add support for supabase template
- Create a descriptive branch:
git checkout -b feat/my-cool-feature
- Make your changes and commit them cleanly.
- Push your branch:
git push origin feat/my-cool-feature
- Open a Pull Request against the
mainbranch. - Provide a clear summary of what your PR introduces and include any relevant test commands or screenshots.
Thank you for helping make FKIT CLI the go-to tool for Flutter developers worldwide! 💙