Air CLI
___ ____ ____ ______ __ ____
/ | / _/ / __ \ / ____/ / / / _/
/ /| | / / / /_/ / / / / / / /
/ ___ |_/ / / _, _/ / /___ / /___ _/ /
/_/ |_/___/ /_/ |_| \____/ /_____//___/
The official Command Line Interface for the Air Framework.
Build scalable, testable, and modular Flutter applications with ease. The Air CLI automates the tedious parts of development, letting you focus on building features that matter.
๐ Features
- Modular Architecture: Generate independent, reusable modules with a single command.
- State Management: Scaffolds the powerful
AirStatepattern (State + Pulses + Flows). - Dependency Injection: Automatic setup of services and bindings.
- Templates: Start with a
blankcanvas or a fullstarterapp with authentication. - 100% Test Coverage: The CLI itself is rigorously tested to ensure rock-solid reliability.
๐ฆ Installation
Activate the CLI globally using Dart:
dart pub global activate air_cli
๐ Usage
air <command> [arguments]
๐ Create Project
Initialize a new Air Framework project with best practices built-in.
air create <project_name> --org=com.example --template=starter
| Option | Description |
|---|---|
--template |
blank (default) or starter (includes Auth module) |
--org |
Organization identifier (e.g., com.company) |
โจ Generate Code
Rapidly scaffold components. Run this command from the root of your project.
air generate <type> <name> [options]
# Alias: air g
Generators
| Type | Command | Description |
|---|---|---|
| Module | air g module <name> |
Creates a new feature module with routing and DI. Add --all for full structure. |
| Screen | air g screen <name> |
Generates a Page widget. Requires --module. |
| State | air g state <name> |
Generates AirState, Pulses, and Flows. Requires --module. |
| Service | air g service <name> |
Generates a Service class. Requires --module. |
| Model | air g model <name> |
Generates a Data Model. Use --core or --module. |
| Widget | air g widget <name> |
Generates a reusable UI Widget. Requires --module. |
Examples:
air g module products --all
air g screen product_detail --module=products
air g state cart --module=products
๐งฉ Module Management
Easily add Modules to your project.
# Add from a Git repository
air module add https://github.com/user/air_module_auth.git
# Add from a local path
air module add /path/to/local/module
๐ฉบ Doctor
Diagnose your environment and project configuration.
air doctor
๐ Architecture
Air Framework promotes a clear separation of concerns:
- Modules: Self-contained units of functionality (e.g., Auth, Home, Settings).
- UI (Views): Flutter widgets that react to state changes.
- State (AirState): Business logic using Flows (Data) and Pulses (Events).
- Services: Pure Dart classes for API calls, Database, etc.
๐งช Reliability
We take quality seriously. The Air CLI is maintained with 100% Unit Test Coverage, ensuring that every command and generator works exactly as expected.
๐ License
MIT ยฉ 2026 Air Framework
Libraries
- air_cli
- Support for the Air CLI.