Getting Started
From zero to a running AI chat app in 60 seconds. Three commands, zero boilerplate.
Prerequisites
- Flutter 3.7+ and Dart 3.7+
- A Flutter project (
flutter create my_app)
Quick Start
1. Install the CLI
2. Initialize and configure
Interactive prompts set your app name, assistant name, and theme preset.
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, orpremium
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.
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
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:
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:
- Auth flow with email, Apple, and Google sign-in
- Configurable onboarding with splash and reveal animations
- Chat with markdown rendering, code blocks with copy, and thinking panels
- Sidebar with conversation history, grouping, search, and settings
- Share conversation via system share sheet
- Animated send button (mic/arrow morph)
- Attachment menu (camera, photos, files)
- Voice input (speech-to-text)
- Model selector (switch AI models per-conversation)
- Session persistence (stay logged in across restarts)
- Scroll-to-bottom FAB and regenerate response
What's Next?
- Installation — Detailed CLI options and manual setup
- Theming — Customize colors, typography, and spacing
- App Scaffold — Full architecture reference
- Providers — Connect to OpenAI or Anthropic