megabuff 0.7.0 → 0.8.0

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.
package/README.md CHANGED
@@ -1,76 +1,107 @@
1
- # MegaBuff
1
+ # 🤖 MegaBuff
2
2
 
3
- AI-powered prompt optimizer CLI with multi-provider support (OpenAI, Anthropic & Google Gemini). Improve your prompts with BYOK (Bring Your Own Key) and flexible input/output options.
3
+ <div align="center">
4
4
 
5
- ## Installation
5
+ <img src="github-media-banner.png" alt="MegaBuff Banner" width="100%">
6
6
 
7
- Install MegaBuff globally:
7
+ <br/>
8
+ <br/>
9
+
10
+ **Transform your AI prompts from good to great!** ✨
11
+
12
+ AI-powered prompt optimizer with multi-provider support (OpenAI, Anthropic & Google Gemini)
13
+
14
+ 🔑 BYOK (Bring Your Own Key) • 🎨 16 Beautiful Themes • ⚡ Lightning Fast
15
+
16
+ [![npm version](https://img.shields.io/npm/v/megabuff.svg?style=flat-square)](https://www.npmjs.com/package/megabuff)
17
+ [![npm downloads](https://img.shields.io/npm/dm/megabuff.svg?style=flat-square)](https://www.npmjs.com/package/megabuff)
18
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL%203.0-blue.svg?style=flat-square)](https://opensource.org/licenses/AGPL-3.0)
19
+ [![GitHub stars](https://img.shields.io/github/stars/thesupermegabuff/megabuff-cli.svg?style=flat-square)](https://github.com/thesupermegabuff/megabuff-cli/stargazers)
20
+ [![GitHub issues](https://img.shields.io/github/issues/thesupermegabuff/megabuff-cli.svg?style=flat-square)](https://github.com/thesupermegabuff/megabuff-cli/issues)
21
+ [![Node.js Version](https://img.shields.io/node/v/megabuff.svg?style=flat-square)](https://nodejs.org)
22
+
23
+ </div>
24
+
25
+ ---
26
+
27
+ ## 📦 Installation
28
+
29
+ Get started in seconds:
8
30
 
9
31
  ```bash
10
32
  npm install -g megabuff
11
33
  megabuff optimize "Rewrite this prompt to be clearer"
12
34
  ```
13
35
 
14
- ## Table of Contents
15
-
16
- - [Installation](#installation)
17
- - [Setup](#setup)
18
- - [Getting Your OpenAI API Key (BYOK)](#getting-your-openai-api-key-byok)
19
- - [Getting Your Anthropic API Key (BYOK)](#getting-your-anthropic-api-key-byok)
20
- - [Configuring Your API Key](#configuring-your-api-key)
21
- - [Option 1: Save to Config (Recommended)](#option-1-save-to-config-recommended)
22
- - [Option 2: Environment Variable](#option-2-environment-variable)
23
- - [Option 3: Pass as Flag](#option-3-pass-as-flag)
24
- - [API Key Priority](#api-key-priority)
25
- - [Configuration Commands](#configuration-commands)
26
- - [Feature requests or contributing](#feature-requests--contributing)
27
- - [Development](#development)
28
- - [Build](#build)
29
- - [Install Globally](#install-globally)
30
- - [Usage](#usage)
31
- - [1. Inline Argument (Quick & Simple)](#1-inline-argument-quick--simple)
32
- - [2. File Input](#2-file-input)
33
- - [3. Stdin Pipe](#3-stdin-pipe)
34
- - [4. Interactive Mode](#4-interactive-mode)
35
- - [Output Options](#output-options)
36
- - [Default: Print to stdout AND copy to clipboard](#default-print-to-stdout-and-copy-to-clipboard)
37
- - [Disable clipboard copy](#disable-clipboard-copy)
38
- - [Save to file](#save-to-file)
39
- - [Interactive comparison view](#interactive-comparison-view)
40
- - [Combine options](#combine-options)
41
- - [Examples](#examples)
42
- - [How It Works](#how-it-works)
43
- - [VS Code Integration: WIP](#vs-code-integration)
44
- - [Option 1: VS Code Extension (Full Experience)](#option-1-vs-code-extension-full-experience)
45
- - [Option 2: VS Code Tasks (Quick Setup)](#option-2-vs-code-tasks-quick-setup)
46
- - [Option 3: Terminal Integration](#option-3-terminal-integration)
47
- - [Publishing to npm](#publishing-to-npm)
48
- - [First-time Setup](#first-time-setup)
49
- - [Publishing Steps](#publishing-steps)
50
- - [Publishing Updates](#publishing-updates)
51
- - [What Gets Published](#what-gets-published)
52
- - [After Publishing](#after-publishing)
53
-
54
- Local installation:
36
+ **That's it!** 🎉 You're ready to supercharge your prompts.
37
+
38
+ ---
39
+
40
+ ## Features
41
+
42
+ - 🤖 **Multi-Provider Support** - OpenAI, Anthropic Claude, Google Gemini, & more
43
+ - 🔑 **BYOK Model** - Bring your own API key, full control
44
+ - 🎨 **16 Beautiful Themes** - Customize your CLI experience
45
+ - **Lightning Fast** - Optimize prompts in seconds
46
+ - 📋 **Auto-Clipboard** - Results copied automatically
47
+ - 🔄 **Flexible Input** - Inline, file, pipe, or interactive
48
+ - 💾 **Multiple Output Formats** - Stdout, file, or interactive view
49
+ - 🔒 **Secure Storage** - Keychain support for API keys
50
+ - 🎯 **Smart Model Selection** - Auto-detects provider from model name
51
+ - 📊 **Stats Tracking** - See word count changes and improvements
52
+ - 🌈 **Beautiful Output** - Themed, formatted, fun to use!
53
+
54
+ ---
55
+
56
+ ## 📚 Table of Contents
57
+
58
+ - [ Features](#-features)
59
+ - [📦 Installation](#-installation)
60
+ - [ Quick Start](#-quick-start)
61
+ - [🔐 Setup](#-setup)
62
+ - [⚙️ Configuration Commands](#️-configuration-commands)
63
+ - [🎨 Theme Commands](#-theme-commands)
64
+ - [💡 Usage](#-usage)
65
+ - [🎯 Examples](#-examples)
66
+ - [🔧 How It Works](#-how-it-works)
67
+ - [🆚 VS Code Integration](#-vs-code-integration)
68
+ - [🤝 Contributing](#-contributing)
69
+ - [📄 License](#-license)
70
+ - [👨‍💻 Development](#-development)
71
+
72
+ ---
73
+
74
+ ## Quick Start
75
+
76
+ **New to MegaBuff?** Let's get you optimizing in under 60 seconds! ⏱️
55
77
 
56
78
  ```bash
57
- git clone https://github.com/thesupermegabuff/megabuff-cli.git
58
- cd megabuff-cli
59
- nvm use 22
60
- npm install
79
+ # 1. Install globally
80
+ npm install -g megabuff
81
+
82
+ # 2. Set up your API key (choose your favorite provider)
83
+ megabuff config token YOUR_API_KEY --provider openai
84
+
85
+ # 3. Start optimizing!
86
+ megabuff optimize "Write a function to validate emails"
61
87
  ```
62
88
 
63
- ## Setup
89
+ > 💡 **Pro Tip:** Try out different themes with `megabuff theme list`!
90
+
91
+ ---
92
+
93
+ ## 🔐 Setup
94
+
95
+ ### 🤖 Getting Your OpenAI API Key (BYOK)
64
96
 
65
- ### Getting Your OpenAI API Key (BYOK)
97
+ MegaBuff uses a **BYOK (Bring Your Own Key)** model. Why is this awesome?
66
98
 
67
- MegaBuff uses a **BYOK (Bring Your Own Key)** model, meaning you use your own OpenAI API key. This gives you:
68
- - ✅ Direct control over your usage and costs
69
- - ✅ Pay-per-use pricing (typically pennies per optimization)
70
- - ✅ Full privacy - your prompts go directly to OpenAI
71
- - ✅ Ability to set your own usage limits
99
+ - **Full Control** - You manage your usage and costs
100
+ - ✅ **Super Cheap** - Typically just pennies per optimization 💰
101
+ - ✅ **Privacy First** - Your prompts go directly to the provider 🔒
102
+ - ✅ **Your Rules** - Set your own usage limits
72
103
 
73
- **Steps to get your OpenAI API Key:**
104
+ **Get your key in 4 easy steps:**
74
105
 
75
106
  1. **Create an OpenAI Account**
76
107
  - Sign up or log in at [platform.openai.com](https://platform.openai.com/)
@@ -93,11 +124,9 @@ MegaBuff uses a **BYOK (Bring Your Own Key)** model, meaning you use your own Op
93
124
  - Store it securely - you'll need to generate a new one if you lose it
94
125
  - The key starts with `sk-`
95
126
 
96
- ### Getting Your Anthropic API Key (BYOK)
127
+ ### 🧠 Getting Your Anthropic API Key (BYOK)
97
128
 
98
- MegaBuff can also use **Anthropic (Claude)** if you provide your own Anthropic API key.
99
-
100
- **Steps to get your Anthropic API Key:**
129
+ Want to use **Claude**? Follow these simple steps:
101
130
 
102
131
  1. **Create an Anthropic Console account**
103
132
  - Sign up / log in at `https://console.anthropic.com/`
@@ -114,11 +143,9 @@ MegaBuff can also use **Anthropic (Claude)** if you provide your own Anthropic A
114
143
  - Copy and store it somewhere secure
115
144
  - Anthropic keys typically start with `sk-ant-`
116
145
 
117
- ### Getting Your Google Gemini API Key (BYOK)
118
-
119
- MegaBuff also supports **Google Gemini** with your own API key.
146
+ ### Getting Your Google Gemini API Key (BYOK)
120
147
 
121
- **Steps to get your Google Gemini API Key:**
148
+ Ready to try **Gemini**? Here's how:
122
149
 
123
150
  1. **Go to Google AI Studio**
124
151
  - Visit [Google AI Studio](https://aistudio.google.com/app/apikey)
@@ -191,11 +218,13 @@ The CLI checks for your token in this order (per provider):
191
218
  3. System keychain (if configured)
192
219
  4. Config file at `~/.megabuff/config.json`
193
220
 
194
- ## Configuration Commands
221
+ ---
195
222
 
196
- ### Interactive Config Menu
223
+ ## ⚙️ Configuration Commands
197
224
 
198
- Run `megabuff config` for an interactive configuration menu:
225
+ ### 🎮 Interactive Config Menu
226
+
227
+ The easiest way to configure everything:
199
228
 
200
229
  ```bash
201
230
  megabuff config
@@ -214,31 +243,38 @@ megabuff config
214
243
  # 5) Exit
215
244
  ```
216
245
 
217
- ### Direct Commands
246
+ ### 🔧 Direct Commands
218
247
 
248
+ **Token Management:**
219
249
  ```bash
220
- # Set API token for a provider
221
- megabuff config token sk-your-api-key-here --provider openai
222
- megabuff config token sk-ant-... --provider anthropic --keychain
250
+ # 🔑 Set your API token
251
+ megabuff config token sk-your-api-key --provider openai
252
+ megabuff config token sk-ant-... --provider anthropic --keychain # More secure!
253
+
254
+ # 🗑️ Remove a token
255
+ megabuff config remove --provider anthropic
256
+ ```
223
257
 
224
- # Set default provider
258
+ **Provider & Model Selection:**
259
+ ```bash
260
+ # 🤖 Set default provider
225
261
  megabuff config provider anthropic
226
- megabuff config provider # show current provider
262
+ megabuff config provider # Show current
227
263
 
228
- # Set model (automatically sets provider)
229
- megabuff config model claude-sonnet-4-5 # sets provider to anthropic
230
- megabuff config model gpt-4o # sets provider to openai
231
- megabuff config model gemini-1.5-pro # sets provider to google
232
- megabuff config model # show current model
264
+ # 🎯 Set model (auto-selects provider!)
265
+ megabuff config model claude-sonnet-4-5 # Anthropic
266
+ megabuff config model gpt-4o # OpenAI
267
+ megabuff config model gemini-1.5-pro # Google
268
+ megabuff config model # Show current
269
+ ```
233
270
 
234
- # Show all configuration
271
+ **View Everything:**
272
+ ```bash
273
+ # 📊 Show complete configuration
235
274
  megabuff config show
236
-
237
- # Remove a saved token
238
- megabuff config remove --provider anthropic
239
275
  ```
240
276
 
241
- ### Available Models
277
+ ### 🤖 Available Models
242
278
 
243
279
  **OpenAI:**
244
280
  - `gpt-4o`
@@ -262,186 +298,196 @@ megabuff config remove --provider anthropic
262
298
  - `gemini-1.5-flash` (default for Google)
263
299
  - `gemini-1.0-pro`
264
300
 
265
- ## Development
301
+ ---
266
302
 
267
- Test your CLI during development:
303
+ ## 🎨 Theme Commands
268
304
 
269
- ```bash
270
- npm install
271
-
272
- # Using the dev script (recommended)
273
- npm run dev optimize "Write a function to sort arrays"
305
+ **Make your CLI experience uniquely yours!** Choose from 16 stunning color themes. ✨
274
306
 
275
- # Or using npx tsx directly
276
- npx tsx src/index.ts optimize "Your prompt here"
307
+ ### 👀 View Current Theme
277
308
 
278
- # Or install locally as a global command
279
- npm link
280
- megabuff optimize "Your prompt here"
309
+ ```bash
310
+ megabuff theme
281
311
  ```
282
312
 
283
- ## Build
313
+ Shows your active theme with a beautiful preview! 🌈
284
314
 
285
- Compile TypeScript to JavaScript:
315
+ ### 📋 List All Themes
286
316
 
287
317
  ```bash
288
- npm run build
318
+ megabuff theme list
289
319
  ```
290
320
 
291
- This will create compiled files in the `dist/` folder.
321
+ Browse all 16 themes with:
322
+ - ⭐ Your active theme highlighted
323
+ - Live color previews
324
+ - Theme descriptions
292
325
 
293
- ## Install Globally
294
-
295
- Install the CLI globally on your machine for testing:
326
+ ### 🎭 Change Theme
296
327
 
297
328
  ```bash
298
- npm link
329
+ megabuff theme set dracula # 🧛‍♂️ Dark & mysterious
330
+ megabuff theme set cyberpunk # 🌆 Neon future vibes
331
+ megabuff theme set pastel-rainbow # 🌈 Soft & dreamy
299
332
  ```
300
333
 
301
- ## Usage
334
+ Your choice is saved and applied to all commands instantly!
302
335
 
303
- The CLI supports multiple input methods:
336
+ ### 🔍 Preview Theme
304
337
 
305
- ### 1. Inline Argument (Quick & Simple)
338
+ Try before you apply:
306
339
 
307
340
  ```bash
308
- megabuff optimize "Write a function that validates email addresses"
341
+ megabuff theme preview monokai
309
342
  ```
310
343
 
311
- ### 2. File Input
344
+ See the full color palette in action before committing! 🎨
312
345
 
313
- ```bash
314
- megabuff optimize --file prompt.txt
315
- ```
346
+ ### 🌟 Available Themes
316
347
 
317
- ### 3. Stdin Pipe
348
+ | Theme | Vibe | Description |
349
+ |-------|------|-------------|
350
+ | 🎯 **default** | Clean & Pro | Cyan and green palette |
351
+ | 🎨 **material** | Modern | Google Material Design |
352
+ | 🧛‍♂️ **dracula** | Dark & Gothic | Purple and pink accents |
353
+ | ❄️ **nord** | Arctic | Cool bluish tones |
354
+ | ☀️ **solarized** | Precision | Perfect balance |
355
+ | 🎸 **monokai** | Vibrant | Monokai Pro inspired |
356
+ | 🌆 **cyberpunk** | Futuristic | Neon city lights |
357
+ | 🌅 **sunset** | Warm | Oranges & purples |
358
+ | 🌈 **pastel-rainbow** | Dreamy | Soft rainbow hues |
359
+ | 🍬 **bubblegum** | Sweet | All the pink vibes |
360
+ | 🍭 **cotton-candy** | Fluffy | Pink meets blue |
361
+ | 🦄 **unicorn** | Magical | Pastel paradise |
362
+ | 🌊 **ocean** | Aquatic | Deep blue serenity |
363
+ | 🌲 **forest** | Natural | Earthy greens |
364
+ | 📺 **retro** | Nostalgic | 80s terminal style |
365
+ | ⚡ **neon-dreams** | Electric | Vibrant neons |
318
366
 
319
- ```bash
320
- echo "Explain quantum computing" | megabuff optimize
321
- cat prompt.txt | megabuff optimize
322
- ```
367
+ **Every theme is optimized for readability and style!** 🎨✨
323
368
 
324
- ### 4. Interactive Mode
369
+ ---
325
370
 
326
- ```bash
327
- megabuff optimize
328
- # Then paste/type your prompt and press Ctrl+D when done
329
- ```
330
-
331
- ## Output Options
371
+ ## 💡 Usage
332
372
 
333
- ### Default: Print to stdout AND copy to clipboard
373
+ **MegaBuff is flexible!** Use whichever input method works best for you:
334
374
 
335
- By default, the optimized prompt is:
336
- 1. Printed to stdout (so you can pipe it)
337
- 2. Automatically copied to your clipboard (works on macOS, Windows, and Linux)
375
+ ### 1️⃣ Inline (Fastest!)
338
376
 
339
377
  ```bash
340
- megabuff optimize "your prompt"
341
- # Result is both printed AND copied to clipboard
378
+ megabuff optimize "Write a function that validates emails"
342
379
  ```
343
380
 
344
- ### Disable clipboard copy
345
-
346
- If you don't want automatic clipboard copy:
381
+ ### 2️⃣ From a File
347
382
 
348
383
  ```bash
349
- megabuff optimize "your prompt" --no-copy
384
+ megabuff optimize --file my-prompt.txt
350
385
  ```
351
386
 
352
- ### Save to file
387
+ ### 3️⃣ Pipe It In
353
388
 
354
389
  ```bash
355
- megabuff optimize "your prompt" --output result.txt
356
- # Still copies to clipboard by default
390
+ echo "Explain quantum computing" | megabuff optimize
391
+ cat prompt.txt | megabuff optimize
357
392
  ```
358
393
 
359
- ### Interactive comparison view
394
+ ### 4️⃣ Interactive Mode
360
395
 
361
396
  ```bash
362
- megabuff optimize "your prompt" --interactive
363
- # Shows before/after comparison AND copies to clipboard
397
+ megabuff optimize
398
+ # Type/paste your prompt, then Ctrl+D
364
399
  ```
365
400
 
366
- ### Combine options
401
+ ### 📤 Output Options
402
+
403
+ **By default, MegaBuff does BOTH:**
404
+ - ✅ Prints to stdout (for piping)
405
+ - ✅ Copies to clipboard (instant paste!)
406
+
407
+ **Customize the output:**
367
408
 
368
409
  ```bash
369
- # Save to file without clipboard
370
- megabuff optimize "your prompt" --output result.txt --no-copy
410
+ # Don't copy to clipboard
411
+ megabuff optimize "prompt" --no-copy
412
+
413
+ # Save to file (still copies by default)
414
+ megabuff optimize "prompt" --output result.txt
371
415
 
372
- # Interactive view without clipboard
373
- megabuff optimize "your prompt" --interactive --no-copy
416
+ # Interactive before/after view
417
+ megabuff optimize "prompt" --interactive
374
418
 
375
- # Pipe to another command (clipboard still works)
376
- megabuff optimize "your prompt" | grep "specific"
419
+ # Save without clipboard
420
+ megabuff optimize "prompt" -o result.txt --no-copy
377
421
  ```
378
422
 
379
- ## Examples
423
+ ---
424
+
425
+ ## 🎯 Examples
426
+
427
+ **Real-world use cases to get you started:**
380
428
 
381
429
  ```bash
382
- # Quick inline optimization with OpenAI (auto-copies to clipboard)
430
+ # 🚀 Quick optimization
383
431
  megabuff optimize "Write code for user auth"
384
432
 
385
- # Use Anthropic (Claude) instead
386
- megabuff optimize --provider anthropic "Write code for user auth"
433
+ # 🧠 Use Claude for better reasoning
434
+ megabuff optimize --provider anthropic "Explain recursion"
387
435
 
388
- # Use Google Gemini
389
- megabuff optimize --provider google "Write code for user auth"
436
+ # Try Gemini
437
+ megabuff optimize --provider google "Design a database schema"
390
438
 
391
- # From file with interactive view (auto-copies)
392
- megabuff optimize --file my-prompt.txt --interactive
439
+ # 📁 From a file with before/after comparison
440
+ megabuff optimize --file prompt.txt --interactive
393
441
 
394
- # Pipe and save (auto-copies)
442
+ # 🔄 Pipe and save
395
443
  cat input.txt | megabuff optimize --output optimized.txt
396
444
 
397
- # Disable clipboard copy
398
- megabuff optimize "Your prompt" --no-copy
445
+ # 🎯 Use a specific model
446
+ megabuff config model claude-sonnet-4-5
447
+ megabuff optimize "Explain quantum computing"
399
448
 
400
- # Save to file without clipboard
401
- megabuff optimize --file prompt.txt --output result.txt --no-copy
449
+ # 🎨 Make it pretty!
450
+ megabuff theme set cyberpunk # Set theme
451
+ megabuff theme preview dracula # Preview first
452
+ megabuff theme list # See all options
402
453
 
403
- # Use specific API key (overrides config)
404
- megabuff optimize "Your prompt" --api-key sk-your-key-here
454
+ # 🔧 Power user combos
455
+ megabuff optimize --file long-prompt.txt --provider anthropic -o result.txt --interactive
456
+ ```
405
457
 
406
- # Set default provider to Anthropic, then optimize
407
- megabuff config provider anthropic
408
- megabuff optimize "Rewrite this prompt to be clearer"
458
+ ---
409
459
 
410
- # Set a specific model (auto-sets provider)
411
- megabuff config model claude-sonnet-4-5
412
- megabuff optimize "Explain quantum computing"
460
+ ## 🔧 How It Works
413
461
 
414
- # Or use Gemini model
415
- megabuff config model gemini-1.5-pro
416
- megabuff optimize "Explain quantum computing"
417
- ```
462
+ **The Magic Behind MegaBuff**
463
+
464
+ MegaBuff uses state-of-the-art AI to transform your prompts:
465
+
466
+ ### 🎯 What Gets Optimized?
418
467
 
419
- ## How It Works
468
+ 1. **Clarity** - Removes ambiguity and vague instructions
469
+ 2. **Context** - Adds missing details that improve results
470
+ 3. **Structure** - Organizes information logically
471
+ 4. **Format** - Specifies expected output clearly
472
+ 5. **Specificity** - Makes requests actionable and precise
420
473
 
421
- MegaBuff supports multiple AI providers to optimize your prompts:
474
+ ### 🤖 Choose Your AI
422
475
 
423
- **Providers:**
424
- - **OpenAI** (default): Uses GPT-4o-mini for fast, cost-effective optimization
425
- - **Anthropic**: Uses Claude Sonnet 4.5 for advanced reasoning and optimization
426
- - **Google Gemini**: Uses Gemini 1.5 Flash for efficient, high-quality optimization
476
+ | Provider | Best For | Default Model |
477
+ |----------|----------|---------------|
478
+ | 🤖 **OpenAI** | Fast & economical | GPT-4o-mini |
479
+ | 🧠 **Anthropic** | Deep reasoning | Claude Sonnet 4.5 |
480
+ | ✨ **Google** | Efficient & quality | Gemini 1.5 Flash |
427
481
 
428
- The optimization process:
429
- 1. Identifies ambiguities or unclear instructions
430
- 2. Adds relevant context that would improve results
431
- 3. Structures the prompt for clarity
432
- 4. Specifies expected output format if not present
433
- 5. Makes the prompt more specific and actionable
482
+ **Switch providers anytime** with `--provider` or set your favorite as default!
434
483
 
435
- **Model Selection:**
436
- - Set a specific model with `megabuff config model <model-name>`
437
- - Provider is automatically selected based on the model
438
- - Or explicitly choose provider with `--provider` flag
484
+ ---
439
485
 
440
- ## VS Code Integration
486
+ ## 🆚 VS Code Integration
441
487
 
442
- MegaBuff integrates seamlessly with VS Code in multiple ways:
488
+ **Use MegaBuff right inside VS Code!** 🎉
443
489
 
444
- ### Option 1: VS Code Extension (Full Experience)
490
+ ### Option 1: VS Code Extension (Full Experience)
445
491
 
446
492
  Install and develop the MegaBuff VS Code extension:
447
493
 
@@ -463,131 +509,148 @@ Then press `F5` to launch the extension in debug mode.
463
509
 
464
510
  See [megabuff-vscode/README.md](../megabuff-vscode/README.md) for more details.
465
511
 
466
- ### Option 2: VS Code Tasks (Quick Setup)
512
+ ### 🚀 Option 2: VS Code Tasks (Quick Setup)
467
513
 
468
- Use the pre-configured tasks in `.vscode/tasks.json`:
514
+ Pre-configured tasks for instant productivity:
469
515
 
470
- 1. Select text in VS Code
471
- 2. Press `Ctrl+Shift+P` → "Tasks: Run Task"
472
- 3. Choose "MegaBuff: Optimize Selected Text"
516
+ 1. Select text
517
+ 2. `Ctrl+Shift+P` → "Tasks: Run Task"
518
+ 3. Pick a MegaBuff task
473
519
 
474
- Available tasks:
475
- - `MegaBuff: Optimize Selected Text`
476
- - `MegaBuff: Optimize Current File`
477
- - `MegaBuff: Optimize Selected (Interactive)`
478
- - `MegaBuff: Configure API Key`
520
+ **Available Tasks:**
521
+ - Optimize Selected Text
522
+ - 📄 Optimize Current File
523
+ - 🔍 Optimize (Interactive View)
524
+ - ⚙️ Configure API Key
479
525
 
480
- ### Option 3: Terminal Integration
526
+ ### 💻 Option 3: Terminal Integration
481
527
 
482
- Simply use the CLI in VS Code's integrated terminal:
528
+ Just use the integrated terminal:
483
529
 
484
530
  ```bash
485
- # Select text, then in terminal:
486
531
  pbpaste | megabuff optimize # macOS
487
532
  xclip -o | megabuff optimize # Linux
488
533
  ```
489
534
 
490
- ## Feature requests or contributing
535
+ ---
536
+
537
+ ## 🤝 Contributing
538
+
539
+ **We'd love your help making MegaBuff better!**
540
+
541
+ Found a bug? Have an idea? Open an issue:
491
542
 
492
- Want a feature or want to contribute one? Please open an issue here:
543
+ 👉 [GitHub Issues](https://github.com/thesupermegabuff/megabuff-cli/issues)
493
544
 
494
- - [GitHub Issues](https://github.com/thesupermegabuff/megabuff-cli/issues)
545
+ ---
495
546
 
496
- ## Publishing to npm
547
+ ## 📄 License
497
548
 
498
- ### First-time Setup
549
+ **MegaBuff is open source!** Licensed under **AGPL-3.0**
499
550
 
500
- 1. **Create an npm account** at [npmjs.com/signup](https://www.npmjs.com/signup) if you don't have one
551
+ **What this means:**
552
+ - ✅ **Free to use** - For any purpose
553
+ - ✅ **Free to modify** - Make it your own
554
+ - ✅ **Free to share** - Spread the love
555
+ - 🔓 **Open source required** - Derivative works must stay open
556
+ - 🌐 **Service transparency** - If you run it as a service, share the code
501
557
 
502
- 2. **Login to npm** from your terminal:
503
- ```bash
504
- npm login
505
- ```
558
+ [Read the full license](LICENSE)
506
559
 
507
- 3. **Update package.json** with your information:
508
- - Change `author` to your name and email
509
- - Update `repository` URL with your GitHub username
510
- - Update `bugs` and `homepage` URLs
560
+ ---
511
561
 
512
- 4. **Check if the package name is available**:
513
- ```bash
514
- npm search megabuff
515
- ```
516
- The name `megabuff` should be available (or use an alternative if taken)
562
+ ## 👨‍💻 Development
517
563
 
518
- ### Publishing Steps
564
+ **Want to contribute or build from source?**
519
565
 
520
- 1. **Make sure everything is committed**:
521
- ```bash
522
- git status
523
- git add .
524
- git commit -m "Prepare for publish"
525
- ```
566
+ ### 🔧 Local Development
526
567
 
527
- 2. **Build the project**:
528
- ```bash
529
- npm version minor
530
- npm run build
531
- ```
532
- This compiles TypeScript to JavaScript in the `dist/` folder
568
+ ```bash
569
+ # Clone the repo
570
+ git clone https://github.com/thesupermegabuff/megabuff-cli.git
571
+ cd megabuff-cli
533
572
 
534
- 3. **Test the package locally** (optional but recommended):
535
- ```bash
536
- npm pack
537
- # This creates a .tgz file you can inspect
538
- ```
573
+ # Install dependencies
574
+ npm install
539
575
 
540
- 4. **Publish to npm**:
541
- ```bash
542
- npm publish
543
- ```
576
+ # Run in dev mode
577
+ npm run dev optimize "Your prompt"
544
578
 
545
- The `prepublishOnly` script will automatically run `npm run build` before publishing.
579
+ # Or use tsx directly
580
+ npx tsx src/index.ts optimize "Your prompt"
581
+ ```
546
582
 
547
- ### Publishing Updates
583
+ ### 📦 Build
548
584
 
549
- When you make changes and want to publish a new version:
585
+ ```bash
586
+ npm run build # Compiles to dist/
587
+ ```
550
588
 
551
- 1. **Update the version** using semantic versioning:
552
- ```bash
553
- # For bug fixes (0.1.0 -> 0.1.1)
554
- npm version patch
589
+ ### 🔗 Test Locally
555
590
 
556
- # For new features (0.1.0 -> 0.2.0)
557
- npm version minor
591
+ ```bash
592
+ npm link # Install as global command
593
+ megabuff optimize "Test it out!"
594
+ ```
558
595
 
559
- # For breaking changes (0.1.0 -> 1.0.0)
560
- npm version major
561
- ```
596
+ ---
562
597
 
563
- 2. **Publish the update**:
564
- ```bash
565
- npm publish
566
- ```
598
+ ## 📚 Publishing to npm
567
599
 
568
- 3. **Push the version tag to GitHub**:
569
- ```bash
570
- git push && git push --tags
571
- ```
600
+ <details>
601
+ <summary><b>📦 Publishing Guide (For Maintainers)</b></summary>
572
602
 
573
- ### What Gets Published
603
+ ### 🎯 First-time Setup
574
604
 
575
- The npm package includes:
576
- - `dist/` - Compiled JavaScript
577
- - `README.md` - Documentation
578
- - `package.json` - Package metadata
579
- - ✅ `LICENSE` - License file
580
- - ❌ `src/` - TypeScript source (excluded)
581
- - ❌ `node_modules/` - Dependencies (excluded)
582
- - ❌ Development files (excluded via .npmignore)
605
+ 1. Create an [npm account](https://www.npmjs.com/signup)
606
+ 2. Login: `npm login`
607
+ 3. Update `package.json` with your details
608
+ 4. Check name availability: `npm search megabuff`
583
609
 
584
- ### After Publishing
610
+ ### 🚀 Publishing Process
585
611
 
586
- Users can install your CLI globally with:
612
+ ```bash
613
+ # 1. Commit changes
614
+ git add .
615
+ git commit -m "Release preparation"
616
+
617
+ # 2. Bump version (patch/minor/major)
618
+ npm version minor
619
+
620
+ # 3. Publish!
621
+ npm publish
622
+
623
+ # 4. Push tags
624
+ git push && git push --tags
625
+ ```
626
+
627
+ ### 📦 What Gets Published
628
+
629
+ - ✅ Compiled JavaScript (`dist/`)
630
+ - ✅ Documentation
631
+ - ✅ Package metadata
632
+ - ❌ TypeScript source
633
+ - ❌ Dev dependencies
634
+
635
+ ### 🎉 After Publishing
636
+
637
+ Users install with:
587
638
  ```bash
588
639
  npm install -g megabuff
589
640
  ```
590
641
 
591
- Your package will be available at:
592
- - npm: `https://www.npmjs.com/package/megabuff`
593
- - Docs: `https://github.com/thesupermegabuff/megabuff-cli`
642
+ Available at: [npmjs.com/package/megabuff](https://www.npmjs.com/package/megabuff)
643
+
644
+ </details>
645
+
646
+ ---
647
+
648
+ <div align="center">
649
+
650
+ **Made with ❤️ by the MegaBuff Team**
651
+
652
+ ⭐ **Star us on [GitHub](https://github.com/thesupermegabuff/megabuff-cli)!**
653
+
654
+ 🐛 [Report Issues](https://github.com/thesupermegabuff/megabuff-cli/issues) • 💡 [Request Features](https://github.com/thesupermegabuff/megabuff-cli/issues)
655
+
656
+ </div>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "megabuff",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "AI-powered prompt optimizer CLI with BYOK (Bring Your Own Key) support for OpenAI, Anthropic, and Google Gemini",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "command-line"
28
28
  ],
29
29
  "author": "thesupermegabuff <your.email@example.com>",
30
- "license": "MIT",
30
+ "license": "AGPL-3.0",
31
31
  "repository": {
32
32
  "type": "git",
33
33
  "url": "https://github.com/thesupermegabuff/megabuff-cli.git"