chore: update README and CLI usage for cursor_gen, version bump to 1.0.1
- Changed CLI usage instructions from `dart run cursor_gen` to `cursor_gen` for global activation. - Updated project-brief.yaml example and README to reflect new command usage. - Added app_context section in project-brief.yaml for theme variants and RBAC roles. - Fixed bundled template resolution for local and global installs to prevent 'Template not found' errors. - Version bump to 1.0.1 with corresponding updates in CHANGELOG and pubspec.yaml.
This commit is contained in:
@@ -8,17 +8,62 @@ CLI that generates project-specific [Cursor](https://cursor.com) AI configuratio
|
||||
|
||||
## Install
|
||||
|
||||
**From path (local checkout):**
|
||||
Install the CLI globally so you can run `cursor_gen` from any Flutter project.
|
||||
|
||||
**From pub.dev:**
|
||||
|
||||
```bash
|
||||
dart pub global activate cursor_gen
|
||||
```
|
||||
|
||||
**From Git:**
|
||||
|
||||
```bash
|
||||
dart pub global activate --source git https://github.com/company/flutter-cursor-templates --git-path generator
|
||||
```
|
||||
|
||||
**From a local checkout:**
|
||||
|
||||
```bash
|
||||
cd flutter-cursor-templates/generator
|
||||
dart pub global activate --source path .
|
||||
```
|
||||
|
||||
Run from the `flutter-cursor-templates/generator` directory (where this `README` lives).
|
||||
If your shell cannot find `cursor_gen`, add Dart's global bin directory to your `PATH`:
|
||||
|
||||
**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](https://dart.dev/tools/pub/dependencies#git-packages)).
|
||||
```bash
|
||||
export PATH="$PATH":"$HOME/.pub-cache/bin"
|
||||
```
|
||||
|
||||
**From a private Pub registry:** configure `dart pub token add` and install with `dart pub add cursor_gen --hosted-url=<your-registry-url>`.
|
||||
For zsh, add that line to `~/.zshrc` and restart your terminal.
|
||||
|
||||
**From a private Pub registry:** configure access first, then activate from that registry:
|
||||
|
||||
```bash
|
||||
dart pub token add https://your-registry.example.com
|
||||
dart pub global activate cursor_gen --hosted-url=https://your-registry.example.com
|
||||
```
|
||||
|
||||
## Setup In Your Flutter Project
|
||||
|
||||
Create a `project-brief.yaml`:
|
||||
|
||||
```bash
|
||||
cursor_gen --wizard
|
||||
```
|
||||
|
||||
Or copy the example brief and edit it:
|
||||
|
||||
```bash
|
||||
cp path/to/flutter-cursor-templates/example-project/project-brief.yaml .
|
||||
```
|
||||
|
||||
Validate the brief, then generate `.cursor/`:
|
||||
|
||||
```bash
|
||||
cursor_gen --validate
|
||||
cursor_gen
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user