Skip to content

Commit 8eefa56

Browse files
docs: add create command in current directory (#1549)
* docs: add create command in current directory * chore: double check existing docs * chore: apply changes from code review * chore: review docs
1 parent f808c53 commit 8eefa56

6 files changed

Lines changed: 101 additions & 1 deletion

File tree

site/docs/commands/create.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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`

site/docs/commands/mcp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ The MCP server exposes the following tools to AI assistants:
134134

135135
Create new Dart or Flutter projects from any of the available [templates](/docs/category/templates).
136136

137+
See the [create command](./create.md) for more details.
138+
137139
### `test`
138140

139141
Run tests with optional coverage and optimization. Supports both `dart test` and `flutter test` via a `dart` parameter.

site/docs/commands/test.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ very_good test [arguments]
2525
--exclude-coverage One or more space-separated globs which will be used to exclude files that match from the coverage (e.g. '**/*.g.dart **/*.freezed.dart').
2626
-x, --exclude-tags Run only tests that do not have the specified tags.
2727
--min-coverage Whether to enforce a minimum coverage percentage.
28+
--show-uncovered Whether to show uncovered lines when coverage is below 100%.
29+
Implicitly enables coverage collection when used alone.
2830
--test-randomize-ordering-seed The seed to randomize the execution order of test cases within test files.
2931
--update-goldens Whether "matchesGoldenFile()" calls within your test methods should update the golden files.
3032
--force-ansi Whether to force ansi output. If not specified, it will maintain the default behavior based on stdout and stderr.
@@ -38,6 +40,10 @@ very_good test [arguments]
3840
--collect-coverage-from=<imports|all>
3941
Whether to collect coverage from imported files only or all files.
4042
(defaults to "imports")
43+
--report-on=<lib/> Optional file paths to report coverage information to.
44+
This should be paths relative to the current working directory.
45+
Can be passed multiple times.
46+
--run-skipped Run skipped tests instead of skipping them.
4147
--flavor Build a custom app flavor as defined by platform-specific build setup. Supports the use of product flavors in Android Gradle scripts, and the use of custom Xcode schemes.
4248
--fail-fast Stop running tests after the first failure.
4349

site/docs/overview.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ Run "very_good help" to see global options.
6666
```
6767

6868
:::tip
69-
You can use `.` as the project name to create the project in the current directory. The project will be named with the name of the current directory.
69+
Pass `.` as the project name to create the project in the current directory.
70+
Very Good CLI derives the project name from the current directory's basename.
71+
72+
See the [create command docs](./commands/create.md) for more details.
7073
:::
7174

7275
### `very_good mcp`

site/docs/templates/federated_plugin.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Use `-o` or `--output-directory` to specify a custom output directory for the ge
1515
```sh
1616
# Create a new Flutter plugin named my_flutter_plugin (all platforms enabled)
1717
very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin"
18+
19+
# Create a new Flutter plugin named my_flutter_plugin with a custom org
20+
very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin" --org "com.custom.org"
1821
```
1922

2023
## Providing supported platforms

site/docs/templates/flame_game.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Use `-o` or `--output-directory` to specify a custom output directory for the ge
4242
# Create a new Flame game named my_game
4343
very_good create flame_game my_game --desc "My new Flame game"
4444

45+
# Create a new Flame game named my_game with a custom org
46+
very_good create flame_game my_game --desc "My new Flame game" --org "com.custom.org"
47+
4548
# Create a new Flame game named with the name of the current directory
4649
very_good create flame_game . --desc "My new Flame game"
4750

0 commit comments

Comments
 (0)