myaidev-method 0.2.12 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/.claude/CLAUDE.md +46 -0
  2. package/.claude/agents/content-production-coordinator.md +111 -0
  3. package/.claude/agents/proprietary-content-verifier.md +96 -0
  4. package/.claude/agents/visual-content-generator.md +520 -0
  5. package/.claude/commands/myai-coordinate-content.md +136 -0
  6. package/.claude/settings.local.json +3 -2
  7. package/.env.example +33 -0
  8. package/CHANGELOG.md +64 -0
  9. package/CONTENT_CREATION_GUIDE.md +3399 -0
  10. package/DEVELOPER_USE_CASES.md +2085 -0
  11. package/README.md +209 -2
  12. package/VISUAL_GENERATION_FILE_ORGANIZATION.md +105 -0
  13. package/bin/cli.js +46 -0
  14. package/package.json +17 -2
  15. package/src/lib/asset-management.js +532 -0
  16. package/src/lib/visual-config-utils.js +424 -0
  17. package/src/lib/visual-generation-utils.js +668 -0
  18. package/src/scripts/configure-visual-apis.js +413 -0
  19. package/src/scripts/generate-visual-cli.js +279 -0
  20. package/src/templates/claude/agents/content-production-coordinator.md +111 -0
  21. package/src/templates/claude/agents/content-writer.md +209 -4
  22. package/src/templates/claude/agents/proprietary-content-verifier.md +96 -0
  23. package/src/templates/claude/agents/visual-content-generator.md +520 -0
  24. package/src/templates/claude/commands/myai-content-writer.md +33 -8
  25. package/src/templates/claude/commands/myai-coordinate-content.md +136 -0
  26. package/src/templates/claude/commands/myai-generate-visual.md +318 -0
  27. package/src/templates/codex/commands/myai-generate-visual.md +307 -0
  28. package/src/templates/gemini/commands/myai-generate-visual.md +200 -0
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: myai-generate-visual
3
+ description: Generate images or videos for content using AI
4
+ platforms: gemini-cli
5
+ ---
6
+
7
+ # Generate Visual Content (Gemini CLI)
8
+
9
+ Generate images or videos using AI generation APIs via Node.js script execution.
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ myai-generate-visual "prompt" [--type=TYPE] [--service=SERVICE] [--size=SIZE] [--quality=QUALITY]
15
+ ```
16
+
17
+ ## Execute via Node.js
18
+
19
+ Since Gemini CLI works with Node.js scripts, run the generation script directly:
20
+
21
+ ```bash
22
+ node node_modules/myaidev-method/src/scripts/generate-visual-cli.js "Modern developer workspace" --type=hero --service=gemini
23
+ ```
24
+
25
+ Or add to your `package.json` scripts:
26
+
27
+ ```json
28
+ {
29
+ "scripts": {
30
+ "generate-visual": "node node_modules/myaidev-method/src/scripts/generate-visual-cli.js"
31
+ }
32
+ }
33
+ ```
34
+
35
+ Then use:
36
+
37
+ ```bash
38
+ npm run generate-visual "Your prompt here" -- --type=hero --service=gemini
39
+ ```
40
+
41
+ ## Options
42
+
43
+ - `--type=<type>` - Content type: hero, illustration, diagram, screenshot, video (default: hero)
44
+ - `--service=<service>` - Service: gemini, imagen, dalle, veo (default: auto-select)
45
+ - `--size=<size>` - Image size: 1024x1024, 1792x1024, 1024x1792 (default: 1024x1024)
46
+ - `--quality=<quality>` - Quality: standard, hd (default: standard)
47
+ - `--description=<desc>` - Filename description (default: derived from prompt)
48
+
49
+ ## Prerequisites
50
+
51
+ 1. **Install MyAIDev Method**:
52
+ ```bash
53
+ npm install myaidev-method
54
+ ```
55
+
56
+ 2. **Configure API Keys**:
57
+
58
+ Option A: Use configuration script
59
+ ```bash
60
+ node node_modules/myaidev-method/src/scripts/configure-visual-apis.js
61
+ ```
62
+
63
+ Option B: Manual `.env` setup
64
+ ```bash
65
+ # Create/edit .env file
66
+ GOOGLE_API_KEY=your_google_api_key_here
67
+ OPENAI_API_KEY=your_openai_api_key_here
68
+ ```
69
+
70
+ 3. **Get API Keys**:
71
+ - **Google AI**: https://ai.google.dev/
72
+ - **OpenAI**: https://platform.openai.com/api-keys
73
+
74
+ ## Examples
75
+
76
+ ### Generate Hero Image
77
+ ```bash
78
+ npm run generate-visual "Modern AI development workspace" -- --type=hero
79
+ ```
80
+
81
+ ### Generate Diagram with Gemini
82
+ ```bash
83
+ npm run generate-visual "Microservices architecture diagram" -- --type=diagram --service=gemini
84
+ ```
85
+
86
+ ### Generate High-Quality Illustration
87
+ ```bash
88
+ npm run generate-visual "AI brain network visualization" -- --type=illustration --service=dalle --quality=hd
89
+ ```
90
+
91
+ ### Generate Video
92
+ ```bash
93
+ npm run generate-visual "Product demo: user authentication flow" -- --type=video --service=veo
94
+ ```
95
+
96
+ ## Available Services
97
+
98
+ | Service | Speed | Cost | Quality | Best For |
99
+ |---------|-------|------|---------|----------|
100
+ | Gemini Flash | ⚡⚡⚡ | $0.02 | Good | Quick images, high volume |
101
+ | Imagen 3 | ⚡⚡ | $0.03 | Excellent | Premium quality, photorealistic |
102
+ | DALL-E 3 | ⚡⚡ | $0.04-0.12 | Excellent | Creative illustrations |
103
+ | Veo 2 | ⚡ | $0.10 (est.) | Good | Video generation |
104
+
105
+ ## Output
106
+
107
+ The script outputs generated files to:
108
+
109
+ ```
110
+ content-assets/
111
+ ├── images/
112
+ │ └── 2025-11-19/
113
+ │ └── hero-developer-workspace-123456.png
114
+ └── videos/
115
+ └── 2025-11-19/
116
+ └── video-product-demo-456789.mp4
117
+ ```
118
+
119
+ And provides markdown reference:
120
+
121
+ ```markdown
122
+ ![Modern developer workspace](./content-assets/images/2025-11-19/hero-developer-workspace-123456.png)
123
+ ```
124
+
125
+ ## Budget Management
126
+
127
+ Configure budget limits in `.env`:
128
+
129
+ ```bash
130
+ VISUAL_DAILY_BUDGET=5.00
131
+ VISUAL_MONTHLY_BUDGET=50.00
132
+ VISUAL_WARN_THRESHOLD=0.80
133
+ ```
134
+
135
+ The script will:
136
+ - Show cost estimate before generating
137
+ - Warn when approaching budget limits
138
+ - Prevent exceeding configured budgets
139
+
140
+ ## Error Handling
141
+
142
+ ### No API Keys
143
+ ```
144
+ ⚠️ Visual content generation not configured
145
+
146
+ Add to .env file:
147
+ GOOGLE_API_KEY=your_key_here
148
+ OPENAI_API_KEY=your_key_here
149
+ ```
150
+
151
+ ### Budget Exceeded
152
+ ```
153
+ ⚠️ Daily budget limit reached ($5.00)
154
+ Options:
155
+ 1. Increase VISUAL_DAILY_BUDGET in .env
156
+ 2. Wait until tomorrow
157
+ ```
158
+
159
+ ## Integration with Gemini CLI
160
+
161
+ The visual generation works seamlessly with Gemini CLI by:
162
+
163
+ 1. Using Node.js scripts for generation
164
+ 2. Storing outputs in standard locations
165
+ 3. Providing markdown references for easy embedding
166
+ 4. Managing budgets and costs automatically
167
+
168
+ ## Programmatic Usage
169
+
170
+ You can also use the utilities directly in your own scripts:
171
+
172
+ ```javascript
173
+ import { generateImage } from 'myaidev-method/src/lib/visual-generation-utils.js';
174
+ import { saveImage, generateMarkdownReference } from 'myaidev-method/src/lib/asset-management.js';
175
+
176
+ // Generate image
177
+ const result = await generateImage("Modern workspace", {
178
+ preferredService: 'gemini',
179
+ type: 'hero'
180
+ });
181
+
182
+ // Save to assets
183
+ const saved = await saveImage(result.buffer, {
184
+ type: 'hero',
185
+ description: 'workspace',
186
+ service: result.service,
187
+ cost: result.cost,
188
+ prompt: result.prompt
189
+ });
190
+
191
+ // Get markdown
192
+ const markdown = generateMarkdownReference(saved.relativePath, 'Modern workspace');
193
+ console.log(markdown);
194
+ ```
195
+
196
+ ## See Also
197
+
198
+ - [VISUAL_CONTENT_GENERATION_GUIDE.md](../../../VISUAL_CONTENT_GENERATION_GUIDE.md) - Complete guide
199
+ - [CONTENT_CREATION_GUIDE.md](../../../CONTENT_CREATION_GUIDE.md) - Content workflow
200
+ - [package.json scripts](../../../package.json) - npm script examples