API References
Flutty CLI
CLI command reference for Flutty.
Reference for the flutty command.
Once installed, use:
flutty <command> [arguments]Global options
| Option | Type | Description |
|---|---|---|
--help, -h | bool | Show CLI help |
--version, -v | bool | Show CLI version |
Commands
init
Create a new Flutty project scaffold.
flutty init <project_name> [options]Options
| Option | Type | Default | Notes |
|---|---|---|---|
--template, -t | string | provider | Allowed values: provider, getx, riverpod |
--description, -d | string | A FluttyUI project. | Written to generated files |
--force, -f | bool | false | Allows non-empty target directory |
Behavior:
- Validates project name with
^[a-z][a-z0-9_]*$. - Creates:
pubspec.yaml,README.md,.gitignore,lib/main.dart,.flutty/template.json. - Fails on non-empty target directory unless
--forceis set. - Writes template metadata with codeload source URL into
.flutty/template.json.
Template names:
provider->provider-startergetx->getx-starterriverpod->riverpod-starter
Example
flutty init my_app --template riverpod --description "My app"doctor
Check whether the current directory is a valid Flutty project.
flutty doctorChecks:
pubspec.yamlexists (error if missing).pubspec.yamlcontainsflutter:(warning if missing).lib/main.dartexists (warning if missing).
upgrade
Run schema migrations for the current Flutty project.
flutty upgrade [--dry-run]Behavior:
- Requires
pubspec.yamlin the current directory. - Applies pending migrations and updates
.flutty/version. --dry-runlists pending migrations without writing files.