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
Copy file name to clipboardExpand all lines: README.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
Help Gemini CLI create, build, test, and run Flutter apps.
4
4
5
-
***Status: Experimental** - This is an experimental project. Features and commands may change drastically. We welcome your feedback!
5
+
-**Status: Experimental** - This is an experimental project. Features and commands may change drastically. We welcome your feedback!
6
6
7
7
## ✨ Features
8
8
9
-
-**🚀 Project Bootstrapping**: Create new Flutter projects from scratch with built-in best practices, including linters, documentation, and design planning.
10
-
-**🔧 Guided Refactoring**: Execute complex refactoring tasks with automated planning, git branch management, and step-by-step implementation guides for your approval.
11
-
-**✅ Automated Pre-Commit Checks**: Automatically format, analyze, and test your code before committing to maintain codebase quality.
12
-
-**✍️ Smart Commit Messaging**: Generate descriptive, conventional commit messages based on your staged changes.
13
-
-**🧠 Context Priming**: Initializes Gemini with specific rules and context for Dart and Flutter, ensuring high-quality, idiomatic code generation.
9
+
-**🚀 Project Bootstrapping**: Create new Flutter projects from scratch with built-in best practices, including linters, documentation, and design planning.
10
+
-**🔧 Guided Refactoring**: Execute complex refactoring tasks with automated planning, git branch management, and step-by-step implementation guides for your approval.
11
+
-**✅ Automated Pre-Commit Checks**: Automatically format, analyze, and test your code before committing to maintain codebase quality.
12
+
-**✍️ Smart Commit Messaging**: Generate descriptive, conventional commit messages based on your staged changes.
13
+
-**🧠 Context Priming**: Initializes Gemini with specific rules and context for Dart and Flutter, ensuring high-quality, idiomatic code generation.
14
14
15
15
## 📋 Prerequisites
16
16
@@ -25,9 +25,11 @@ Help Gemini CLI create, build, test, and run Flutter apps.
25
25
Use the `gemini extensions install` command to install directly from the source repository:
The new commands will be available in new Gemini CLI sessions. The following commands will be available (with or without the `flutter:` prefix):
44
46
45
-
-`/create-app` - Guides you through bootstrapping a new Flutter project with best practices.
46
-
-`/refactor` - Manages a structured refactoring session with automated planning.
47
-
-`/commit` - Automates pre-commit checks and generates a descriptive commit message.
47
+
-`/create-app` - Guides you through bootstrapping a new Flutter project with best practices.
48
+
-`/create-package` - Guides you through bootstrapping a new Dart package with best practices.
49
+
-`/refactor` - Manages a structured refactoring session with automated planning.
50
+
-`/commit` - Automates pre-commit checks and generates a descriptive commit message.
48
51
49
52
## 💡 Usage
50
53
@@ -55,6 +58,7 @@ This extension provides powerful commands to automate key phases of the developm
55
58
Initiates a guided process to bootstrap a new Flutter application, ensuring your project starts with a solid foundation.
56
59
57
60
**Process:**
61
+
58
62
1. Asks for the package's purpose, details, and desired location on your filesystem.
59
63
2. Creates a new Flutter project with recommended settings and linter rules.
60
64
3. Generates starter `pubspec.yaml`, `README.md`, and `CHANGELOG.md` files.
@@ -69,6 +73,7 @@ Initiates a guided process to bootstrap a new Flutter application, ensuring your
69
73
Starts a structured session to refactor existing code. It helps you plan and execute changes safely and efficiently.
70
74
71
75
**Process:**
76
+
72
77
1. Asks for your high-level refactoring goals and what you want to accomplish.
73
78
2. Offers to create a new `git` branch for the refactoring work, isolating changes.
74
79
3. Generates a `REFACTOR.md` design document detailing the proposed changes.
@@ -83,6 +88,7 @@ Starts a structured session to refactor existing code. It helps you plan and exe
83
88
Prepares your staged `git` changes for a clean, high-quality commit. It acts as an automated pre-commit hook and message generator.
84
89
85
90
**Process:**
91
+
86
92
1. Runs `dart fix` and `dart format` to clean and format your code.
87
93
2. Executes the Dart analyzer to check for static analysis issues.
88
94
3. Runs your project's test suite to ensure all tests are passing.
@@ -96,8 +102,8 @@ Prepares your staged `git` changes for a clean, high-quality commit. It acts as
96
102
97
103
This extension enforces a specific set of coding standards to ensure consistency and quality. These rules are defined in the extension's repository:
98
104
99
-
-**`flutter.md`**: Contains rules and best practices for writing Dart and Flutter code. These rules are opinionated, and we encourage you to review them to ensure they align with your style.
100
-
-**`override`**: Contains important, high-priority rules that are appended to the end of all prompts to ensure they have the most weight.
105
+
-**`flutter.md`**: Contains rules and best practices for writing Dart and Flutter code. These rules are opinionated, and we encourage you to review them to ensure they align with your style.
106
+
-**`override`**: Contains important, high-priority rules that are appended to the end of all prompts to ensure they have the most weight.
Copy file name to clipboardExpand all lines: commands/create-app.toml
+27-14Lines changed: 27 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -22,41 +22,54 @@ Next, collect remaining information from the user, one question at a time.
22
22
The information you need to collect includes, but might not be limited to:
23
23
24
24
- If there are ambiguous elements to the design, ask the user questions to clarify. When the goal is clear, or the user says to, then move on.
25
-
- If the user didn't already give one, select a short descriptive name for the project.
26
-
- Whether to do the work on the current git branch, or a new feature branch. Suggest a branch name.
25
+
- If the user didn't already give one, select a short descriptive name for the package.
26
+
- Whether to do the work on the current git branch, or a new feature branch.
27
+
- Suggest a branch name, making sure it is a valid git branch name.
28
+
- Which directory to use as the package directory. Suggest a location.
29
+
30
+
If the user wants the work done on a new branch, create the branch now.
31
+
Then create the package directory, if it doesn't already exist.
32
+
33
+
**VERY IMPORTANT**: Change directories to the package directory now so that future operations are relative to that directory.
27
34
28
35
## Design document
29
36
30
-
Develop a **DETAILED** Markdown-formatted design document that follows all of the guidance you have about Dart and Flutter design patterns, rules, best practices, and core principles. Save the design document in DESIGN.md in the top directory of the new package. Feel free to use your available tools to research any aspects of the design that need clarification.
37
+
Develop a **DETAILED** Markdown-formatted design document that follows all of the guidance you have about Dart and Flutter design patterns, rules, best practices, and core principles. Save the design document in DESIGN.md in the package directory. Feel free to use your available tools to research any aspects of the design that need clarification.
31
38
32
39
The design doc should (at least) include sections for:
33
40
34
41
- An overview
35
42
- A detailed analysis of the goal or problem
36
43
- Alternatives considered
37
44
- A detailed design for the new package
38
-
- Any diagrams needed to explain the design (in Mermaid format)
45
+
- Any diagrams needed to explain the design, in Mermaid format.
46
+
- Be sure to put quotes around labels that include special characters (e.g. parenthesis).
39
47
- A summary of the design
40
48
- References to research URLs used to arrive at the design.
41
49
42
50
You must ask the user to review this design document and they must approve it before you continue on to create the implementation plan. They must review and approve it first because if they ask for any changes, it may affect the implementation plan.
43
51
44
52
## Implementation plan
45
53
46
-
After getting explicit approval from the user for the DESIGN.md document, Develop a **DETAILED** Markdown-formatted phased implementation plan of checkboxed tasks that need to be performed in order to finish developing the package. Save the implementation plan in IMPLEMENTATION.md in the top directory of the new package.
54
+
After getting explicit approval from the user for the DESIGN.md document, Develop a **DETAILED** Markdown-formatted phased implementation plan of checkboxed tasks that need to be performed in order to finish developing the package. Save the implementation plan in IMPLEMENTATION.md in the package directory.
47
55
48
-
The implementation plan should include a section for the "Journal" which will be updated after each phase.
56
+
The implementation plan should include a section for a "Journal" which will be updated after each phase and contain a log of the actions taken, things learned, surprises, and deviations from the plan. It should be in chronological order.
49
57
50
58
The plan should include instructions similar to: "After completing a task, if you added any TODOs to the code or didn't fully implement anything, make sure to add new tasks so that you can come back and complete them later." to prevent leaving tasks unfinished.
51
59
52
60
In the first phase of the implementation plan, include:
53
61
54
-
- [ ] Create a Dart or Flutter project (as appropriate for the purpose) in the desired location using the name. Unless the user specifies otherwise, the project should support all of the default platforms. Use the create_project tool to create it. For Flutter projects, create an empty project using the `empty` flag for the tool.
55
-
- [ ] Remove the boilerplate in the new project by removing the test dir, if any, and the README.md file.
62
+
- [ ] Create a Dart or Flutter package (as appropriate for the purpose) in the package directory.
63
+
- Unless the user specifies otherwise, the package should support all of the default platforms.
64
+
- Use the create_project tool to create the package.
65
+
- If the current directory is the package directory, use "." as the target for the create_project tool.
66
+
- The name of the package directory (even if it is the current directory) must be a valid Dart package name. If it isn't, then inform the user and suggest an alternative (valid) directory name.
67
+
- For Flutter packages, create an empty package using the `empty` flag for the tool.
68
+
- [ ] Remove any boilerplate in the new package that will be replaced, including the test dir, if any.
56
69
- [ ] Update the description of the package in the `pubspec.yaml` and set the version number to 0.1.0.
57
-
- [ ] Update the README.md to include a short placeholder description of the project.
58
-
- [ ] Update the CHANGELOG.md to have the initial version as 0.1.0.
59
-
- [ ] Commit this empty version of the project to either a new branch or the current branch based on the user's preference.
70
+
- [ ] Update the README.md to include a short placeholder description of the package.
71
+
- [ ] Create the CHANGELOG.md to have the initial version of 0.1.0.
72
+
- [ ] Commit this empty version of the package to either a new branch or the current branch based on the user's preference.
60
73
61
74
The implementation plan should specify after each phase that you should:
62
75
@@ -66,13 +79,13 @@ The implementation plan should specify after each phase that you should:
66
79
- [ ] Run any tests to make sure they all pass.
67
80
- [ ] Run dart_format one more time to make sure that the formatting is still correct if you made any changes during the analysis and testing steps.
68
81
- [ ] Re-read the IMPLEMENTATION.md file to see what, if anything, has changed in the implementation plan, and if it has changed, take care of anything the changes imply.
69
-
- [ ] Update the IMPLEMENTATION.md file with the current state, including any learnings, surprises, or deviations in the Journal section.
82
+
- [ ] Update the IMPLEMENTATION.md file with the current state, including any learnings, surprises, or deviations in the Journal section. Check off any checkboxes of items that have been completed.
70
83
- [ ] Use `git diff` to verify the changes that have been made, and create a suitable commit message for any changes, following any guidelines you have about commit messages. Be sure to properly escape dollar signs and backticks, and present the change message to the user for approval.
71
84
- [ ] Wait for approval. Don't commit the changes or move on to the next phase of implementation until the user approves the commit.
72
85
73
-
In the last phase of the plan, you should include a step to create a comprehensive README.md file for the package.
86
+
In the last phase of the plan, include a step to create a comprehensive README.md file for the package.
74
87
75
-
You must ask the user to review this implementation plan and they must approve it before starting implementation. They must review and approve it before you begin because if they ask for any changes, they may affect the implementation.
88
+
You must ask the user to review this implementation plan and they must approve it before starting implementation. They must review and approve it before you begin because if they ask for any changes, the changes may affect the implementation.
0 commit comments