CLI Reference
The Air CLI is your Swiss Army knife for building modular Flutter apps.
Installation
Section titled “Installation”dart pub global activate air_cliCommands
Section titled “Commands”air create
Section titled “air create”Initializes a new Air project.
air create <project_name> --org=com.example --template=starterair generate (alias: g)
Section titled “air generate (alias: g)”Scaffolds various framework components.
| Type | Command | Description |
|---|---|---|
| Module | air g module <name> | Creates a feature module. |
| Screen | air g screen <name> --module=<m> | Creates a UI page. |
| State | air g state <name> --module=<m> | Creates reactive state. |
| Service | air g service <name> --module=<m> | Creates a business service. |
| Model | air g model <name> --module=<m> | Creates a data model. |
| Adapter | air g adapter <name> | Creates a headless adapter. |
air module
Section titled “air module”Manages external modules.
# Add from Gitair module add https://github.com/user/module.git
# Add from Local Pathair module add /path/to/local/moduleair doctor
Section titled “air doctor”Diagnoses your project and environment.
air doctorair skills
Section titled “air skills”Installs the Air Framework AI agent skill so coding agents (Antigravity, Claude Code, OpenCode, Cursor) understand the framework automatically.
# Interactive selectionair skills install
# Specific agentair skills install cursor
# All agentsair skills install allSee the AI Agent Skills guide for details.
air update
Section titled “air update”Updates the Air CLI to the latest published version.
air updateair version
Section titled “air version”Prints the currently installed Air CLI version.
air version# Air CLI v1.0.9air clean
Section titled “air clean”Removes generated code artifacts (*.air.g.dart) from the project. Useful when switching branches or resolving stale code generation conflicts.
air cleanUsage Example: State Generation
Section titled “Usage Example: State Generation”# Generate a state controller inside the 'cart' moduleair g state cart --module=cart
# This creates:# lib/modules/cart/ui/state/cart_state.dart# Run build_runner to generate the reactive plumbing:dart run build_runner build --delete-conflicting-outputsBest Practices
Section titled “Best Practices”Always use the CLI to generate modules, adapters, and state to ensure naming conventions and directory structures are followed.