Flo CLI
A production-grade Flutter developer CLI toolkit designed to streamline your Flutter development workflow. Flo CLI automates project creation, component generation, dependency management, and AI agent configuration.
Features
- Project Initialization: Create new Flutter projects with a predefined structure and organization.
- Component Generation: Easily generate Blocs, Entities, Models, Repositories, Screens, and entire Feature modules.
- Dependency Management: Add or remove packages interactively or via command line.
- AI Agent Integration: Automatically generate AI coding instructions for supported agents based on your project's architecture and state management.
- Health Checks: Diagnose your CLI and project environment.
Usage
flo_cli <command> [arguments]
Global Options
-h, --help: Print usage information.-v, --verbose: Enable verbose logging.-q, --quiet: Disable all logging except errors.--json: Output results in JSON format.
Available Commands
create
Creates a new Flutter project.
flo_cli create [arguments] <project_name>
Options:
-o, --org: The organization for the new project (e.g.,com.example).-c, --config: Path to aproject.yamlconfiguration file for advanced setup.
add
Adds a new component or package to the project.
flo_cli add <subcommand> [arguments]
Subcommands:
bloc: Generates a new Bloc (Bloc, Event, State).entity: Generates a new domain entity.feature: Generates a new feature module structure.model: Generates a new data model.package: Adds a package dependency topubspec.yaml.repository: Generates a repository interface and implementation.screen: Generates a new UI screen widget.
remove
Removes a package from the project.
flo_cli remove [arguments] <package_name>
Options:
-d, --dev: Remove a dev dependency.
configure
Configures project dependencies interactively.
flo_cli configure
agents
Manage AI agent configurations.
flo_cli agents <subcommand>
Subcommands:
setup: Generates AI coding instructions (e.g., in.promptsor.agents/rules.md) automatically for supported agents, tailored to your project's state management and architectural patterns.
doctor
Checks the health of the CLI toolkit and environment.
flo_cli doctor
Example Workflow
-
Create a new project:
flo_cli create my_app --org com.mycompany -
Navigate to the project:
cd my_app -
Generate a new feature:
flo_cli add feature authentication -
Add a state management Bloc:
flo_cli add bloc login -
Setup AI coding agents:
flo_cli agents setup(This analyzes your project setup and creates dynamic agent rules to ensure AI-generated code follows your project's specific conventions.)
Contributing
Feel free to open issues or submit pull requests to improve the CLI.
Libraries
- commands/add_command
- commands/agents_command
- commands/agents_setup_command
- commands/configure_command
- commands/create_command
- commands/doctor_command
- commands/remove_command
- commands/update_command
- core/command/base_command
- core/command/flo_command_runner
- core/config/config_service
- core/di/service_locator
- core/exceptions/cli_exception
- core/filesystem/file_system_service
- core/logger/logger_service
- core/models/project_config
- core/templates/template_engine
- core/version
- features/agents/models/agent_provider
- features/agents/providers/antigravity_agent
- features/agents/providers/claude_agent
- features/agents/providers/cursor_agent
- features/agents/providers/gemini_agent
- features/agents/providers/github_agent
- features/agents/services/agents_setup_service
- services/component_generator
- services/console_logger
- services/dependency_engine
- services/json_config_service
- services/local_file_system
- services/package_registry
- services/project_generator
- services/project_wizard
- services/string_template_engine
- services/update_service
- services/yaml_config_service
- templates/template_bundle