|
| 1 | +--- |
| 2 | +sidebar_position: 0 |
| 3 | +--- |
| 4 | + |
| 5 | +# Create 🚀 |
| 6 | + |
| 7 | +Create a new Very Good project from a template with `very_good create`. Each |
| 8 | +template type has a corresponding subcommand. |
| 9 | + |
| 10 | +## Usage |
| 11 | + |
| 12 | +```sh |
| 13 | +Creates a new Very Good project in the specified directory. |
| 14 | + |
| 15 | +Usage: very_good create <subcommand> <project-name> [arguments] |
| 16 | +-h, --help Print this usage information. |
| 17 | + |
| 18 | +Available subcommands: |
| 19 | + app_ui_package Generate a Very Good App UI package. |
| 20 | + dart_cli Generate a Very Good Dart CLI application. |
| 21 | + dart_package Generate a Very Good Dart package. |
| 22 | + docs_site Generate a Very Good documentation site. |
| 23 | + flame_game Generate a Very Good Flame game. |
| 24 | + flutter_app Generate a Very Good Flutter application. |
| 25 | + flutter_package Generate a Very Good Flutter package. |
| 26 | + flutter_plugin Generate a Very Good Flutter plugin. |
| 27 | + |
| 28 | +Run "very_good help" to see global options. |
| 29 | +``` |
| 30 | + |
| 31 | +:::tip |
| 32 | +Use `-o` or `--output-directory` to specify a custom output directory for the |
| 33 | +generated project. |
| 34 | +::: |
| 35 | + |
| 36 | +## Creating in the current directory |
| 37 | + |
| 38 | +Instead of specifying a project name, you can pass `.` to create the project |
| 39 | +in your current directory. Very Good CLI derives the project name from your |
| 40 | +current directory's basename. This works with every template subcommand. |
| 41 | + |
| 42 | +For example, if your working directory is `/home/user/my_flutter_app`, the |
| 43 | +following command creates a Flutter app named `my_flutter_app` in place: |
| 44 | + |
| 45 | +```sh |
| 46 | +# Create a Flutter app named after the current directory |
| 47 | +very_good create flutter_app . |
| 48 | +``` |
| 49 | + |
| 50 | +You can combine `.` with any other supported flags for that template: |
| 51 | + |
| 52 | +```sh |
| 53 | +# Create a Flutter app with a custom org name |
| 54 | +very_good create flutter_app . --org "com.company" |
| 55 | + |
| 56 | +# Create a Flutter app with a description |
| 57 | +very_good create flutter_app . --desc "My production Flutter app" |
| 58 | + |
| 59 | +# Create a publishable Dart package |
| 60 | +very_good create dart_package . --desc "My Dart package" --publishable |
| 61 | + |
| 62 | +# Create a Flutter plugin that supports specific platforms |
| 63 | +very_good create flutter_plugin . --desc "My plugin" --platforms android,ios,web |
| 64 | +``` |
| 65 | + |
| 66 | +:::note |
| 67 | +You cannot combine `.` with `--output-directory`. Very Good CLI will exit with |
| 68 | +an error if you specify both. |
| 69 | +::: |
| 70 | + |
| 71 | +## Available templates |
| 72 | + |
| 73 | +Each subcommand maps to a specific project template. For detailed usage options |
| 74 | +and examples, see the individual template pages: |
| 75 | + |
| 76 | +- [Flutter Starter App](../templates/core.md) — `flutter_app` |
| 77 | +- [Dart CLI](../templates/dart_cli.md) — `dart_cli` |
| 78 | +- [Dart Package](../templates/dart_pkg.md) — `dart_package` |
| 79 | +- [Flutter Package](../templates/flutter_pkg.md) — `flutter_package` |
| 80 | +- [Flutter Federated Plugin](../templates/federated_plugin.md) — `flutter_plugin` |
| 81 | +- [Flame Game](../templates/flame_game.md) — `flame_game` |
| 82 | +- [App UI Package](../templates/app_ui_package.md) — `app_ui_package` |
| 83 | +- [Docs Site](../templates/docs_site.md) — `docs_site` |
0 commit comments