Getting Started

From zero to a running AI chat app in 60 seconds. Three commands, zero boilerplate.

Prerequisites

Quick Start

1. Install the CLI

$ dart pub global activate flai_cli

2. Initialize and configure

Interactive prompts set your app name, assistant name, and theme preset.

$ flai init

You'll be asked:

  • App name — Your app's display name (default: FlAI Chat)
  • Assistant name — The AI assistant's name (default: Assistant)
  • Theme — Choose from dark, light, ios, or premium

These values are stored in flai.yaml and automatically applied to all generated code.

3. Generate the complete app

One command installs 7 bricks (83 source files) and generates a ready-to-run main.dart.

$ flai add app_scaffold

This installs:

  • auth_flow — Login, register, forgot password, verification, reset (6 screens)
  • onboarding_flow — Splash, naming, multi-select pills, reveal animation
  • chat_experience — Composer with voice, model selector, attachments
  • sidebar_nav — Drawer, conversation list with grouping, settings
  • message_bubble — Markdown rendering, code copy, thinking blocks
  • typing_indicator — Animated loading dots
  • app_scaffold — GoRouter wiring, session persistence, home controller

4. Run

$ flutter pub get && flutter run

Your app is running with mock auth. No main.dart to write — it was generated for you with your chosen theme and branding.

Connect a Backend

When you're ready for production, connect to a real AI backend:

$ flai connect cmmd

This automatically rewrites your main.dart to swap mock providers with real ones — authentication, AI streaming, conversation persistence, and voice. Zero manual wiring.

Non-Interactive Mode

For CI/CD or scripting, skip the prompts:

flai init --no-interactive --app-name "My App" --assistant-name "Nova" --theme ios
flai add app_scaffold

What's in the Box

After flai add app_scaffold, your app includes:

What's Next?