flutterflow_cli 0.0.44
flutterflow_cli: ^0.0.44 copied to clipboard
Command-line client for FlutterFlow. Export code from FlutterFlow projects and use FlutterFlow AI to build and edit your apps declaratively from the terminal.
Installation #
dart pub global activate flutterflow_cli
FlutterFlow AI Workspace #
Create a workspace for a new app:
flutterflow ai init my-app --env beta
cd my-app
flutterflow ai validate dsl/create.dart
Create a workspace for an existing project:
flutterflow ai init my-edits --env beta --project ProjectID
cd my-edits
flutterflow ai inspect ProjectID
flutterflow ai validate dsl/edit.dart --project-id ProjectID
See the package README for the full FlutterFlow AI workflow.
Signing in #
Sign this machine in through your browser. Your team's normal sign-in applies, SSO included:
flutterflow login
The CLI receives its own credential tied to this device, not your password
or a permanent token. Your personal projects stay signed in until you run
flutterflow logout, which revokes it; each team's session length decides
how long the device stays signed in to that team's projects, and the device
shows up in that team's device list. On a machine with no browser — an SSH
session or a container — use flutterflow login --device-code and enter the
printed code on another device.
flutterflow whoami shows who you are signed in as, and with which kind of
credential.
Export Code #
Download generated Flutter code:
flutterflow export-code --project ProjectID
Once you have signed in, no token is needed.
In CI #
CI has no browser, so it uses a team service token instead: a team admin creates one in team settings, scoped to what the pipeline needs and expiring within 90 days. Pass it the same way an API token was passed:
flutterflow export-code --project ProjectID --token "$FLUTTERFLOW_TOKEN"
export FLUTTERFLOW_API_TOKEN="..."
Both still accept a personal API token, unless your team has turned static tokens off.
See README for all commands and flags.