Skip to content

Installation

To get started with Air Framework, the recommended path is to install the CLI first. It automates package management, project scaffolding, and code generation.

The Air CLI is the core tool for building with Air Framework. Activate it globally using Dart:

Terminal window
dart pub global activate air_cli

Run the following command to ensure the CLI is ready:

Terminal window
air doctor

The easiest way to initialize a project with all dependencies correctly configured is using the CLI:

Terminal window
air create my_app
cd my_app

This command automatically adds air_framework, air_generator, and necessary dev dependencies to your project.

If you prefer to add Air Framework to an existing project manually:

Add air_framework to your pubspec.yaml:

dependencies:
air_framework: any # latest version

For reactive state management and code generation, add these to your dev_dependencies:

dev_dependencies:
air_generator: any # latest version
build_runner: any # latest version