megabuff 0.7.0 → 0.9.2

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
+ <h1 align="center">
2
+ 🤖 MegaBuff
3
+ </h1>
4
+ <div align="center">
2
5
 
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.
6
+ **Transform your AI prompts from good to great!**
4
7
 
5
- ## Installation
8
+ AI-powered prompt optimizer with multi-provider support (OpenAI, Anthropic, Gemini, DeepSeek, xAI & more)
6
9
 
7
- Install MegaBuff globally:
10
+ 🔑 BYOK (Bring Your Own Key) • 🎨 16 Beautiful Themes • ⚡ Lightning Fast
11
+
12
+ [![npm version](https://img.shields.io/npm/v/megabuff.svg?style=flat-square)](https://www.npmjs.com/package/megabuff)
13
+ [![npm downloads](https://img.shields.io/npm/dm/megabuff.svg?style=flat-square)](https://www.npmjs.com/package/megabuff)
14
+ [![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)
15
+ [![GitHub stars](https://img.shields.io/github/stars/thesupermegabuff/megabuff-cli.svg?style=flat-square)](https://github.com/thesupermegabuff/megabuff-cli/stargazers)
16
+ [![GitHub issues](https://img.shields.io/github/issues/thesupermegabuff/megabuff-cli.svg?style=flat-square)](https://github.com/thesupermegabuff/megabuff-cli/issues)
17
+ [![Node.js Version](https://img.shields.io/node/v/megabuff.svg?style=flat-square)](https://nodejs.org)
18
+
19
+ <img width="690" src="media/github-media-banner.png" alt="MegaBuff Banner" width="100%">
20
+
21
+ <br/>
22
+ <br/>
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
+ ---
64
92
 
65
- ### Getting Your OpenAI API Key (BYOK)
93
+ ## 🔐 Setup
66
94
 
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
95
+ ### 🤖 Getting Your OpenAI API Key (BYOK)
72
96
 
73
- **Steps to get your OpenAI API Key:**
97
+ MegaBuff uses a **BYOK (Bring Your Own Key)** model. Why is this awesome?
98
+
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
103
+
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)
@@ -171,6 +198,8 @@ This saves your key for future use. You only need to do this once!
171
198
  export OPENAI_API_KEY="sk-your-api-key-here"
172
199
  export ANTHROPIC_API_KEY="sk-ant-your-api-key-here"
173
200
  export GOOGLE_API_KEY="your-google-api-key-here"
201
+ export XAI_API_KEY="xai-your-api-key-here"
202
+ export DEEPSEEK_API_KEY="sk-your-deepseek-key-here"
174
203
  ```
175
204
 
176
205
  Add to your shell profile (`.bashrc`, `.zshrc`, etc.) to persist across sessions.
@@ -187,15 +216,17 @@ megabuff optimize --provider google "your prompt" --api-key your-google-key-here
187
216
 
188
217
  The CLI checks for your token in this order (per provider):
189
218
  1. `--api-key` flag (highest priority)
190
- 2. Provider env var (e.g. `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`)
219
+ 2. Provider env var (e.g. `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `XAI_API_KEY`, `DEEPSEEK_API_KEY`)
191
220
  3. System keychain (if configured)
192
221
  4. Config file at `~/.megabuff/config.json`
193
222
 
194
- ## Configuration Commands
223
+ ---
195
224
 
196
- ### Interactive Config Menu
225
+ ## ⚙️ Configuration Commands
197
226
 
198
- Run `megabuff config` for an interactive configuration menu:
227
+ ### 🎮 Interactive Config Menu
228
+
229
+ The easiest way to configure everything:
199
230
 
200
231
  ```bash
201
232
  megabuff config
@@ -214,31 +245,38 @@ megabuff config
214
245
  # 5) Exit
215
246
  ```
216
247
 
217
- ### Direct Commands
248
+ ### 🔧 Direct Commands
218
249
 
250
+ **Token Management:**
219
251
  ```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
252
+ # 🔑 Set your API token
253
+ megabuff config token sk-your-api-key --provider openai
254
+ megabuff config token sk-ant-... --provider anthropic --keychain # More secure!
223
255
 
224
- # Set default provider
256
+ # 🗑️ Remove a token
257
+ megabuff config remove --provider anthropic
258
+ ```
259
+
260
+ **Provider & Model Selection:**
261
+ ```bash
262
+ # 🤖 Set default provider
225
263
  megabuff config provider anthropic
226
- megabuff config provider # show current provider
264
+ megabuff config provider # Show current
227
265
 
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
266
+ # 🎯 Set model (auto-selects provider!)
267
+ megabuff config model claude-sonnet-4-5 # Anthropic
268
+ megabuff config model gpt-4o # OpenAI
269
+ megabuff config model gemini-1.5-pro # Google
270
+ megabuff config model # Show current
271
+ ```
233
272
 
234
- # Show all configuration
273
+ **View Everything:**
274
+ ```bash
275
+ # 📊 Show complete configuration
235
276
  megabuff config show
236
-
237
- # Remove a saved token
238
- megabuff config remove --provider anthropic
239
277
  ```
240
278
 
241
- ### Available Models
279
+ ### 🤖 Available Models
242
280
 
243
281
  **OpenAI:**
244
282
  - `gpt-4o`
@@ -262,186 +300,196 @@ megabuff config remove --provider anthropic
262
300
  - `gemini-1.5-flash` (default for Google)
263
301
  - `gemini-1.0-pro`
264
302
 
265
- ## Development
303
+ ---
266
304
 
267
- Test your CLI during development:
305
+ ## 🎨 Theme Commands
268
306
 
269
- ```bash
270
- npm install
307
+ **Make your CLI experience uniquely yours!** Choose from 16 stunning color themes. ✨
271
308
 
272
- # Using the dev script (recommended)
273
- npm run dev optimize "Write a function to sort arrays"
309
+ ### 👀 View Current Theme
274
310
 
275
- # Or using npx tsx directly
276
- npx tsx src/index.ts optimize "Your prompt here"
277
-
278
- # Or install locally as a global command
279
- npm link
280
- megabuff optimize "Your prompt here"
311
+ ```bash
312
+ megabuff theme
281
313
  ```
282
314
 
283
- ## Build
315
+ Shows your active theme with a beautiful preview! 🌈
284
316
 
285
- Compile TypeScript to JavaScript:
317
+ ### 📋 List All Themes
286
318
 
287
319
  ```bash
288
- npm run build
320
+ megabuff theme list
289
321
  ```
290
322
 
291
- This will create compiled files in the `dist/` folder.
323
+ Browse all 16 themes with:
324
+ - ⭐ Your active theme highlighted
325
+ - Live color previews
326
+ - Theme descriptions
292
327
 
293
- ## Install Globally
294
-
295
- Install the CLI globally on your machine for testing:
328
+ ### 🎭 Change Theme
296
329
 
297
330
  ```bash
298
- npm link
331
+ megabuff theme set dracula # 🧛‍♂️ Dark & mysterious
332
+ megabuff theme set cyberpunk # 🌆 Neon future vibes
333
+ megabuff theme set pastel-rainbow # 🌈 Soft & dreamy
299
334
  ```
300
335
 
301
- ## Usage
336
+ Your choice is saved and applied to all commands instantly!
302
337
 
303
- The CLI supports multiple input methods:
338
+ ### 🔍 Preview Theme
304
339
 
305
- ### 1. Inline Argument (Quick & Simple)
340
+ Try before you apply:
306
341
 
307
342
  ```bash
308
- megabuff optimize "Write a function that validates email addresses"
343
+ megabuff theme preview monokai
309
344
  ```
310
345
 
311
- ### 2. File Input
312
-
313
- ```bash
314
- megabuff optimize --file prompt.txt
315
- ```
346
+ See the full color palette in action before committing! 🎨
316
347
 
317
- ### 3. Stdin Pipe
348
+ ### 🌟 Available Themes
318
349
 
319
- ```bash
320
- echo "Explain quantum computing" | megabuff optimize
321
- cat prompt.txt | megabuff optimize
322
- ```
350
+ | Theme | Vibe | Description |
351
+ |-------|------|-------------|
352
+ | 🎯 **default** | Clean & Pro | Cyan and green palette |
353
+ | 🎨 **material** | Modern | Google Material Design |
354
+ | 🧛‍♂️ **dracula** | Dark & Gothic | Purple and pink accents |
355
+ | ❄️ **nord** | Arctic | Cool bluish tones |
356
+ | ☀️ **solarized** | Precision | Perfect balance |
357
+ | 🎸 **monokai** | Vibrant | Monokai Pro inspired |
358
+ | 🌆 **cyberpunk** | Futuristic | Neon city lights |
359
+ | 🌅 **sunset** | Warm | Oranges & purples |
360
+ | 🌈 **pastel-rainbow** | Dreamy | Soft rainbow hues |
361
+ | 🍬 **bubblegum** | Sweet | All the pink vibes |
362
+ | 🍭 **cotton-candy** | Fluffy | Pink meets blue |
363
+ | 🦄 **unicorn** | Magical | Pastel paradise |
364
+ | 🌊 **ocean** | Aquatic | Deep blue serenity |
365
+ | 🌲 **forest** | Natural | Earthy greens |
366
+ | 📺 **retro** | Nostalgic | 80s terminal style |
367
+ | ⚡ **neon-dreams** | Electric | Vibrant neons |
323
368
 
324
- ### 4. Interactive Mode
369
+ **Every theme is optimized for readability and style!** 🎨✨
325
370
 
326
- ```bash
327
- megabuff optimize
328
- # Then paste/type your prompt and press Ctrl+D when done
329
- ```
371
+ ---
330
372
 
331
- ## Output Options
373
+ ## 💡 Usage
332
374
 
333
- ### Default: Print to stdout AND copy to clipboard
375
+ **MegaBuff is flexible!** Use whichever input method works best for you:
334
376
 
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)
377
+ ### 1️⃣ Inline (Fastest!)
338
378
 
339
379
  ```bash
340
- megabuff optimize "your prompt"
341
- # Result is both printed AND copied to clipboard
380
+ megabuff optimize "Write a function that validates emails"
342
381
  ```
343
382
 
344
- ### Disable clipboard copy
345
-
346
- If you don't want automatic clipboard copy:
383
+ ### 2️⃣ From a File
347
384
 
348
385
  ```bash
349
- megabuff optimize "your prompt" --no-copy
386
+ megabuff optimize --file my-prompt.txt
350
387
  ```
351
388
 
352
- ### Save to file
389
+ ### 3️⃣ Pipe It In
353
390
 
354
391
  ```bash
355
- megabuff optimize "your prompt" --output result.txt
356
- # Still copies to clipboard by default
392
+ echo "Explain quantum computing" | megabuff optimize
393
+ cat prompt.txt | megabuff optimize
357
394
  ```
358
395
 
359
- ### Interactive comparison view
396
+ ### 4️⃣ Interactive Mode
360
397
 
361
398
  ```bash
362
- megabuff optimize "your prompt" --interactive
363
- # Shows before/after comparison AND copies to clipboard
399
+ megabuff optimize
400
+ # Type/paste your prompt, then Ctrl+D
364
401
  ```
365
402
 
366
- ### Combine options
403
+ ### 📤 Output Options
404
+
405
+ **By default, MegaBuff does BOTH:**
406
+ - ✅ Prints to stdout (for piping)
407
+ - ✅ Copies to clipboard (instant paste!)
408
+
409
+ **Customize the output:**
367
410
 
368
411
  ```bash
369
- # Save to file without clipboard
370
- megabuff optimize "your prompt" --output result.txt --no-copy
412
+ # Don't copy to clipboard
413
+ megabuff optimize "prompt" --no-copy
371
414
 
372
- # Interactive view without clipboard
373
- megabuff optimize "your prompt" --interactive --no-copy
415
+ # Save to file (still copies by default)
416
+ megabuff optimize "prompt" --output result.txt
374
417
 
375
- # Pipe to another command (clipboard still works)
376
- megabuff optimize "your prompt" | grep "specific"
418
+ # Interactive before/after view
419
+ megabuff optimize "prompt" --interactive
420
+
421
+ # Save without clipboard
422
+ megabuff optimize "prompt" -o result.txt --no-copy
377
423
  ```
378
424
 
379
- ## Examples
425
+ ---
426
+
427
+ ## 🎯 Examples
428
+
429
+ **Real-world use cases to get you started:**
380
430
 
381
431
  ```bash
382
- # Quick inline optimization with OpenAI (auto-copies to clipboard)
432
+ # 🚀 Quick optimization
383
433
  megabuff optimize "Write code for user auth"
384
434
 
385
- # Use Anthropic (Claude) instead
386
- megabuff optimize --provider anthropic "Write code for user auth"
435
+ # 🧠 Use Claude for better reasoning
436
+ megabuff optimize --provider anthropic "Explain recursion"
387
437
 
388
- # Use Google Gemini
389
- megabuff optimize --provider google "Write code for user auth"
438
+ # Try Gemini
439
+ megabuff optimize --provider google "Design a database schema"
390
440
 
391
- # From file with interactive view (auto-copies)
392
- megabuff optimize --file my-prompt.txt --interactive
441
+ # 📁 From a file with before/after comparison
442
+ megabuff optimize --file prompt.txt --interactive
393
443
 
394
- # Pipe and save (auto-copies)
444
+ # 🔄 Pipe and save
395
445
  cat input.txt | megabuff optimize --output optimized.txt
396
446
 
397
- # Disable clipboard copy
398
- megabuff optimize "Your prompt" --no-copy
447
+ # 🎯 Use a specific model
448
+ megabuff config model claude-sonnet-4-5
449
+ megabuff optimize "Explain quantum computing"
399
450
 
400
- # Save to file without clipboard
401
- megabuff optimize --file prompt.txt --output result.txt --no-copy
451
+ # 🎨 Make it pretty!
452
+ megabuff theme set cyberpunk # Set theme
453
+ megabuff theme preview dracula # Preview first
454
+ megabuff theme list # See all options
402
455
 
403
- # Use specific API key (overrides config)
404
- megabuff optimize "Your prompt" --api-key sk-your-key-here
456
+ # 🔧 Power user combos
457
+ megabuff optimize --file long-prompt.txt --provider anthropic -o result.txt --interactive
458
+ ```
405
459
 
406
- # Set default provider to Anthropic, then optimize
407
- megabuff config provider anthropic
408
- megabuff optimize "Rewrite this prompt to be clearer"
460
+ ---
409
461
 
410
- # Set a specific model (auto-sets provider)
411
- megabuff config model claude-sonnet-4-5
412
- megabuff optimize "Explain quantum computing"
462
+ ## 🔧 How It Works
413
463
 
414
- # Or use Gemini model
415
- megabuff config model gemini-1.5-pro
416
- megabuff optimize "Explain quantum computing"
417
- ```
464
+ **The Magic Behind MegaBuff**
418
465
 
419
- ## How It Works
466
+ MegaBuff uses state-of-the-art AI to transform your prompts:
420
467
 
421
- MegaBuff supports multiple AI providers to optimize your prompts:
468
+ ### 🎯 What Gets Optimized?
422
469
 
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
470
+ 1. **Clarity** - Removes ambiguity and vague instructions
471
+ 2. **Context** - Adds missing details that improve results
472
+ 3. **Structure** - Organizes information logically
473
+ 4. **Format** - Specifies expected output clearly
474
+ 5. **Specificity** - Makes requests actionable and precise
427
475
 
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
476
+ ### 🤖 Choose Your AI
434
477
 
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
478
+ | Provider | Best For | Default Model |
479
+ |----------|----------|---------------|
480
+ | 🤖 **OpenAI** | Fast & economical | GPT-4o-mini |
481
+ | 🧠 **Anthropic** | Deep reasoning | Claude Sonnet 4.5 |
482
+ | ✨ **Google** | Efficient & quality | Gemini 1.5 Flash |
439
483
 
440
- ## VS Code Integration
484
+ **Switch providers anytime** with `--provider` or set your favorite as default!
441
485
 
442
- MegaBuff integrates seamlessly with VS Code in multiple ways:
486
+ ---
443
487
 
444
- ### Option 1: VS Code Extension (Full Experience)
488
+ ## 🆚 VS Code Integration
489
+
490
+ **Use MegaBuff right inside VS Code!** 🎉
491
+
492
+ ### ⭐ Option 1: VS Code Extension (Full Experience)
445
493
 
446
494
  Install and develop the MegaBuff VS Code extension:
447
495
 
@@ -463,131 +511,174 @@ Then press `F5` to launch the extension in debug mode.
463
511
 
464
512
  See [megabuff-vscode/README.md](../megabuff-vscode/README.md) for more details.
465
513
 
466
- ### Option 2: VS Code Tasks (Quick Setup)
514
+ ### 🚀 Option 2: VS Code Tasks (Quick Setup)
467
515
 
468
- Use the pre-configured tasks in `.vscode/tasks.json`:
516
+ Pre-configured tasks for instant productivity:
469
517
 
470
- 1. Select text in VS Code
471
- 2. Press `Ctrl+Shift+P` → "Tasks: Run Task"
472
- 3. Choose "MegaBuff: Optimize Selected Text"
518
+ 1. Select text
519
+ 2. `Ctrl+Shift+P` → "Tasks: Run Task"
520
+ 3. Pick a MegaBuff task
473
521
 
474
- Available tasks:
475
- - `MegaBuff: Optimize Selected Text`
476
- - `MegaBuff: Optimize Current File`
477
- - `MegaBuff: Optimize Selected (Interactive)`
478
- - `MegaBuff: Configure API Key`
522
+ **Available Tasks:**
523
+ - Optimize Selected Text
524
+ - 📄 Optimize Current File
525
+ - 🔍 Optimize (Interactive View)
526
+ - ⚙️ Configure API Key
479
527
 
480
- ### Option 3: Terminal Integration
528
+ ### 💻 Option 3: Terminal Integration
481
529
 
482
- Simply use the CLI in VS Code's integrated terminal:
530
+ Just use the integrated terminal:
483
531
 
484
532
  ```bash
485
- # Select text, then in terminal:
486
533
  pbpaste | megabuff optimize # macOS
487
534
  xclip -o | megabuff optimize # Linux
488
535
  ```
489
536
 
490
- ## Feature requests or contributing
537
+ ---
491
538
 
492
- Want a feature or want to contribute one? Please open an issue here:
539
+ ## 🤝 Contributing
493
540
 
494
- - [GitHub Issues](https://github.com/thesupermegabuff/megabuff-cli/issues)
541
+ **We'd love your help making MegaBuff better!**
495
542
 
496
- ## Publishing to npm
543
+ Found a bug? Have an idea? Open an issue:
497
544
 
498
- ### First-time Setup
545
+ 👉 [GitHub Issues](https://github.com/thesupermegabuff/megabuff-cli/issues)
499
546
 
500
- 1. **Create an npm account** at [npmjs.com/signup](https://www.npmjs.com/signup) if you don't have one
547
+ ---
501
548
 
502
- 2. **Login to npm** from your terminal:
503
- ```bash
504
- npm login
505
- ```
549
+ ## 📄 License
506
550
 
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
551
+ **MegaBuff is open source!** Licensed under **AGPL-3.0**
511
552
 
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)
553
+ **What this means:**
554
+ - ✅ **Free to use** - For any purpose
555
+ - **Free to modify** - Make it your own
556
+ - ✅ **Free to share** - Spread the love
557
+ - 🔓 **Open source required** - Derivative works must stay open
558
+ - 🌐 **Service transparency** - If you run it as a service, share the code
517
559
 
518
- ### Publishing Steps
560
+ [Read the full license](LICENSE)
519
561
 
520
- 1. **Make sure everything is committed**:
521
- ```bash
522
- git status
523
- git add .
524
- git commit -m "Prepare for publish"
525
- ```
562
+ ---
526
563
 
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
564
+ ## 👨‍💻 Development
533
565
 
534
- 3. **Test the package locally** (optional but recommended):
535
- ```bash
536
- npm pack
537
- # This creates a .tgz file you can inspect
538
- ```
566
+ **Want to contribute or build from source?**
539
567
 
540
- 4. **Publish to npm**:
541
- ```bash
542
- npm publish
543
- ```
568
+ ### 🔧 Local Development
544
569
 
545
- The `prepublishOnly` script will automatically run `npm run build` before publishing.
570
+ ```bash
571
+ # Clone the repo
572
+ git clone https://github.com/thesupermegabuff/megabuff-cli.git
573
+ cd megabuff-cli
546
574
 
547
- ### Publishing Updates
575
+ # Install dependencies
576
+ npm install
548
577
 
549
- When you make changes and want to publish a new version:
578
+ # Run in dev mode
579
+ npm run dev optimize "Your prompt"
550
580
 
551
- 1. **Update the version** using semantic versioning:
552
- ```bash
553
- # For bug fixes (0.1.0 -> 0.1.1)
554
- npm version patch
581
+ # Or use tsx directly
582
+ npx tsx src/index.ts optimize "Your prompt"
583
+ ```
555
584
 
556
- # For new features (0.1.0 -> 0.2.0)
557
- npm version minor
585
+ ### 📦 Build & Publish
586
+
587
+ **Building the project:**
588
+
589
+ ```bash
590
+ npm run build # Compiles TypeScript to dist/
591
+ ```
558
592
 
559
- # For breaking changes (0.1.0 -> 1.0.0)
560
- npm version major
561
- ```
593
+ **Version and build:**
562
594
 
563
- 2. **Publish the update**:
564
- ```bash
565
- npm publish
566
- ```
595
+ ```bash
596
+ npm version minor # Bump version (patch/minor/major)
597
+ npm run build # Compile TypeScript
598
+ ```
567
599
 
568
- 3. **Push the version tag to GitHub**:
569
- ```bash
570
- git push && git push --tags
571
- ```
600
+ This compiles TypeScript to JavaScript in the `dist/` folder.
572
601
 
573
- ### What Gets Published
602
+ **Test the package locally** (optional but recommended):
574
603
 
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)
604
+ ```bash
605
+ npm pack
606
+ # This creates a .tgz file you can inspect
607
+ ```
583
608
 
584
- ### After Publishing
609
+ **Test locally with npm link:**
585
610
 
586
- Users can install your CLI globally with:
611
+ ```bash
612
+ npm link # Install as global command
613
+ megabuff optimize "Test it out!"
614
+ ```
615
+
616
+ **Publish to npm:**
617
+
618
+ ```bash
619
+ npm publish
620
+ ```
621
+
622
+ The `prepublishOnly` script will automatically run `npm run build` before publishing.
623
+
624
+ ---
625
+
626
+ ## 📚 Publishing to npm
627
+
628
+ <details>
629
+ <summary><b>📦 Publishing Guide (For Maintainers)</b></summary>
630
+
631
+ ### 🎯 First-time Setup
632
+
633
+ 1. Create an [npm account](https://www.npmjs.com/signup)
634
+ 2. Login: `npm login`
635
+ 3. Update `package.json` with your details
636
+ 4. Check name availability: `npm search megabuff`
637
+
638
+ ### 🚀 Publishing Process
639
+
640
+ ```bash
641
+ # 1. Commit changes
642
+ git add .
643
+ git commit -m "Release preparation"
644
+
645
+ # 2. Bump version (patch/minor/major)
646
+ npm version minor
647
+
648
+ # 3. Publish!
649
+ npm publish
650
+
651
+ # 4. Push tags
652
+ git push && git push --tags
653
+ ```
654
+
655
+ ### 📦 What Gets Published
656
+
657
+ - ✅ Compiled JavaScript (`dist/`)
658
+ - ✅ Documentation
659
+ - ✅ Package metadata
660
+ - ❌ TypeScript source
661
+ - ❌ Dev dependencies
662
+
663
+ ### 🎉 After Publishing
664
+
665
+ Users install with:
587
666
  ```bash
588
667
  npm install -g megabuff
589
668
  ```
590
669
 
591
- Your package will be available at:
592
- - npm: `https://www.npmjs.com/package/megabuff`
593
- - Docs: `https://github.com/thesupermegabuff/megabuff-cli`
670
+ Available at: [npmjs.com/package/megabuff](https://www.npmjs.com/package/megabuff)
671
+
672
+ </details>
673
+
674
+ ---
675
+
676
+ <div align="center">
677
+
678
+ **Made with ❤️ by the MegaBuff Team**
679
+
680
+ ⭐ **Star us on [GitHub](https://github.com/thesupermegabuff/megabuff-cli)!**
681
+
682
+ 🐛 [Report Issues](https://github.com/thesupermegabuff/megabuff-cli/issues) • 💡 [Request Features](https://github.com/thesupermegabuff/megabuff-cli/issues)
683
+
684
+ </div>