Start a Fluvie project
fluvie init gets you started. It writes a starter video in real Flutter widget
code, ready to preview and render. Run it once:
dart pub global activate fluvie_clifluvie initIt is the one interactive command. It asks where to put things and offers a
sensible default, so most of the time you just press Enter. Pass --yes to take
every default with no prompts.
Outside a Flutter project
Section titled “Outside a Flutter project”If you are not in a Flutter project, fluvie init offers to scaffold a minimal
one with flutter create, then adds the starter composition, a live preview, a
render harness, and a widget test:
fluvie init --dir my_reel --yescd my_reelflutter pub getYou now have a project you can run, render, and test.
Inside a Flutter project
Section titled “Inside a Flutter project”Run fluvie init in a project that already has Flutter and it drops the starter
composition into lib/videos/, adds fluvie to your pubspec.yaml if it is
missing, and wires a render harness so fluvie render works:
fluvie init --yes # or: fluvie init --name intro --path lib/videos/intro.dartflutter pub getUseful flags: --name sets the render key and file name, --path chooses the
file location, --no-render skips the harness, and --force overwrites an
existing file.
The starter composition
Section titled “The starter composition”A Fluvie video is real Flutter widget code. Two imports, then a Video of
Scenes. Fluvie’s Animation replaces Flutter’s, so hide the Flutter one:
import 'package:flutter/material.dart' hide Animation;import 'package:fluvie/fluvie.dart';Here is the whole video: one square scene, a gradient background, and a title that fades and pops in. You never type a frame number.
/// Builds the starter composition: a 4 second square clip with a title that/// fades and pops in. You describe what the video is; Fluvie decides when/// everything happens.Video starterVideo() { return Video( size: VideoSize.square, poster: 1.seconds, scenes: [ Scene( duration: 4.seconds, background: Background.gradient(const [Color(0xFF1A2980), Color(0xFF26D0CE)]), children: [ const Text( 'Hello, Fluvie', style: TextStyle(color: Colors.white, fontSize: 72, fontWeight: FontWeight.bold), ).animate([Animation.fadeIn(), Animation.pop()]), ], ), ], );}Preview it
Section titled “Preview it”Run the project like any Flutter app and scrub the slider:
flutter runVideo has no wall clock; the preview drives the frame index for you.
Render it
Section titled “Render it”Render the composition to an MP4 by its key (the --name you chose, starter by
default):
fluvie render starter --out starter.mp4The CLI captures every frame with flutter test, then FFmpeg encodes the file.
The first render downloads a pinned FFmpeg build for you.
Test it
Section titled “Test it”The scaffold includes a widget test that builds the video and pumps a frame:
flutter testWhere to next
Section titled “Where to next”- Your first video: a line-by-line tour of the starter.
- Core concepts: Video, Scene, Time, animate, Defaults.
- AI and MCP: have an assistant write real Fluvie code.