Add LICENSE (MIT), README, and CHANGELOG for the package root. Import models.dart in the CLI for OverrideSnapshot. Wrap tests in main() and add containsNot() helper for analyzer. Co-authored-by: Cursor <cursoragent@cursor.com>
1.5 KiB
cursor_gen
CLI that generates project-specific Cursor AI configuration for Flutter projects from a project-brief.yaml file (stack, architecture, routing, backends, testing, and more).
Requirements
- Dart SDK
>=3.3.0 <4.0.0
Install
From path (local checkout):
dart pub global activate --source path .
Run from the flutter-cursor-templates/generator directory (where this README lives).
From Git: use dart pub global activate --source git <repo-url> and set the path option if your pubspec.yaml is not at the repository root (see pub dependencies).
From a private Pub registry: configure dart pub token add and install with dart pub add cursor_gen --hosted-url=<your-registry-url>.
Usage
cursor_gen --help
cursor_gen --validate --brief project-brief.yaml
cursor_gen --brief project-brief.yaml --output .cursor
cursor_gen --refresh # regenerate while preserving custom/ and CURSOR:CUSTOM blocks
cursor_gen --wizard # interactive project-brief.yaml creator
Minimal project-brief.yaml
project:
name: MyApp
package: com.example.myapp
scale: medium
stack:
state_management: bloc
architecture: clean
routing: gorouter
platforms: [ios, android]
backend: firebase
auth: firebase_auth
Use brief-schema.json in this package for IDE validation and autocomplete of the full schema.
Repository
For full monorepo layout, template library, and architecture notes, see the parent repository README.