You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a `create` section to `very_good.yaml` so `very_good create` and its
subcommands can read defaults for `description`, `org_name`, `publishable`,
and `template`. CLI arguments continue to take precedence over config values.
Closes#1654
Copy file name to clipboardExpand all lines: site/docs/commands/create.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,23 @@ You cannot combine `.` with `--output-directory`. Very Good CLI will exit with
68
68
an error if you specify both.
69
69
:::
70
70
71
+
## Configuring defaults with `very_good.yaml`
72
+
73
+
To avoid repeating the same flags every time you scaffold a new project, you may create a `very_good.yaml` file at the root of your project. The `create` section accepts the same names as the CLI flags in snake_case (e.g. `--org-name` becomes `org_name`). Values from `very_good.yaml` are used as defaults; anything you pass on the command line takes precedence.
74
+
75
+
```yaml
76
+
# very_good.yaml
77
+
create:
78
+
description: A Very Good project.
79
+
org_name: com.very.good
80
+
publishable: true
81
+
template: core
82
+
```
83
+
84
+
With the file above, running `very_good create flutter_app my_app` behaves the same as running `very_good create flutter_app my_app --desc 'A Very Good project.' --org-name com.very.good --publishable --template core`. You can still override any of these values on the command line, for example `very_good create flutter_app my_app --org-name com.example` to use a different org name for a single run.
85
+
86
+
The `very_good.yaml` file is looked up starting from the directory where the command runs and walking up through its ancestors. The closest file wins; configuration from ancestor directories is not merged. This lets a single `very_good.yaml` at the repository root apply to commands run from any nested package.
87
+
71
88
## Available templates
72
89
73
90
Each subcommand maps to a specific project template. For detailed usage options
0 commit comments