@@ -104,60 +104,55 @@ npm install
104104node src/cli.js https://example.com
105105```
106106
107- ### OpenAI API Key Setup (Required for AI Features)
107+ ### API Key Setup (Required for AI Features)
108108
109- ** 🚨 IMPORTANT** : Users must set up their OpenAI API key in their terminal environment before using AI features. The package does NOT include pre-configured API keys.
109+ ** 🚨 IMPORTANT** : Users must set up an API key (Gemini or OpenAI) in their terminal environment before using AI features. The tool defaults to ` gemini-3-flash-preview ` as Google provides free API keys, making it more accessible .
110110
111- #### ** Step 1: Get OpenAI API Key**
111+ #### ** Step 1: Get an API Key**
112112
113- 1 . Visit [ OpenAI Platform] ( https://platform.openai.com/api-keys )
114- 2 . Create account and generate API key
115- 3 . Copy your API key (starts with ` sk- ` )
113+ - ** Gemini (Default)** : Get a free key from [ Google AI Studio] ( https://aistudio.google.com/app/apikey )
114+ - ** OpenAI (Alternative)** : Get a key from [ OpenAI Platform] ( https://platform.openai.com/api-keys )
116115
117116#### ** Step 2: Set Environment Variable (REQUIRED)**
118117
119118** Windows PowerShell:**
120119
121120``` powershell
122121# Temporary (current session only)
123- $env:OPENAI_API_KEY="sk-your-api-key-here"
122+ $env:GEMINI_API_KEY="AIzaSy..."
123+ # Or if using OpenAI:
124+ $env:OPENAI_API_KEY="sk-..."
124125
125126# Permanent (recommended)
126- [System.Environment]::SetEnvironmentVariable('OPENAI_API_KEY', 'sk-your-api-key-here', 'User')
127-
128- # Verify setup
129- echo $env:OPENAI_API_KEY
127+ [System.Environment]::SetEnvironmentVariable('GEMINI_API_KEY', 'AIzaSy...', 'User')
130128```
131129
132130** Windows Command Prompt:**
133131
134132``` cmd
135133# Temporary (current session only)
136- set OPENAI_API_KEY=sk-your-api-key-here
137-
138- # Verify setup
139- echo %OPENAI_API_KEY%
134+ set GEMINI_API_KEY=AIzaSy...
140135```
141136
142137** macOS/Linux (Bash/Zsh):**
143138
144139``` bash
145140# Temporary (current session only)
146- export OPENAI_API_KEY= " sk-your-api-key-here "
141+ export GEMINI_API_KEY= " AIzaSy... "
147142
148143# Permanent (add to ~/.bashrc or ~/.zshrc)
149- echo ' export OPENAI_API_KEY="sk-your-api-key-here "' >> ~ /.bashrc
144+ echo ' export GEMINI_API_KEY="AIzaSy... "' >> ~ /.bashrc
150145source ~ /.bashrc
151-
152- # Verify setup
153- echo $OPENAI_API_KEY
154146```
155147
156148#### ** Alternative: Command Line Parameter**
157149
158150``` bash
159151# Pass API key directly (not recommended for security)
160- mirror-web-cli https://example.com --ai --openai-key " sk-your-key-here"
152+ # If using Gemini (default)
153+ mirror-web-cli https://example.com --ai --openai-key " AIzaSy..."
154+ # If using OpenAI
155+ mirror-web-cli https://example.com --ai --ai-model gpt-4o --openai-key " sk-..."
161156```
162157
163158#### ** Step 3: Verify Setup**
@@ -172,9 +167,9 @@ mirror-web-cli https://example.com --ai --debug
172167
173168** Requirements:**
174169
175- - ✅ ** OpenAI API keys only ** (must start with ` sk- ` )
176- - ✅ ** GPT-4o model ** for intelligent analysis
177- - ✅ ** Active OpenAI account** with billing setup
170+ - ✅ ** Gemini AI API Key ** (` AIzaSy... ` ) or ** OpenAI API Key ** ( ` sk-... ` )
171+ - ✅ ** gemini-3-flash-preview ** (Default model) or ** GPT-4o **
172+ - ✅ ** Active account** with API access
178173- ✅ ** Terminal environment setup** (no pre-configured keys)
179174
180175### Basic Usage (After Installation)
@@ -203,16 +198,17 @@ mirror-web-cli https://complex-site.com --debug
203198
204199``` bash
205200# FIRST: Set up API key (see above section)
206- export OPENAI_API_KEY= " sk-your-api-key-here " # Linux/macOS
201+ export GEMINI_API_KEY= " AIzaSy... " # Linux/macOS
207202# or
208- $env :OPENAI_API_KEY= " sk-your-api-key-here " # Windows PowerShell
203+ $env :GEMINI_API_KEY= " AIzaSy... " # Windows PowerShell
209204
210- # THEN: Use AI features
205+ # THEN: Use AI features (defaults to gemini-3-flash-preview)
211206mirror-web-cli https://example.com --ai
212207# → Creates: ./example.com-ai-enhanced/
213208
214- # AI + Clean mirroring
215- mirror-web-cli https://complex-app.com --ai --clean
209+ # AI + Clean mirroring with OpenAI explicitly:
210+ export OPENAI_API_KEY=" sk-..."
211+ mirror-web-cli https://complex-app.com --ai --ai-model gpt-4o --clean
216212# → Creates: ./complex-app.com-ai-enhanced/
217213```
218214
@@ -223,8 +219,8 @@ mirror-web-cli https://complex-app.com --ai --clean
223219mirror-web-cli https://example.com --ai
224220
225221# You'll see:
226- # ⚠️ AI features requested but no OPENAI_API_KEY found
227- # Add OPENAI_API_KEY to your environment ...
222+ # ⚠️ AI analysis API key not found. AI analysis will be disabled.
223+ # Set GEMINI_API_KEY environment variable to enable AI features ...
228224# Continuing without AI features...
229225```
230226
@@ -376,7 +372,10 @@ Arguments:
376372Options:
377373 -o, --output < dir> Custom output directory (default: domain name)
378374 --clean Remove tracking scripts and analytics
375+ --block-ads Block advertisements using adblocker plugin
376+ --block-cookies Automatically remove and block cookie consent banners
379377 --ai Enable AI-powered analysis (requires OpenAI API key)
378+ --ai-model < model> AI model to use (default: gemini-3-flash-preview)
380379 --openai-key < key> OpenAI API key for AI features (or set OPENAI_API_KEY env var)
381380 --debug Enable detailed debug logging
382381 --timeout < ms> Page load timeout in milliseconds (default: 120000)
@@ -385,14 +384,13 @@ Options:
385384 -V, --version Show version number
386385```
387386
388- ### OpenAI API Key Priority
387+ ### API Key Priority
389388
390- The tool checks for OpenAI API keys in this order:
389+ The tool checks for API keys in this order:
391390
392- 1 . ` --openai-key ` command line parameter
393- 2 . ` OPENAI_API_KEY ` environment variable
391+ 1 . ` --openai-key ` command line parameter (handles both Gemini and OpenAI keys)
392+ 2 . ` GEMINI_API_KEY ` (if default Gemini model is used) or ` OPENAI_API_KEY ` environment variable
3943933 . If neither is found, AI features are disabled with a helpful message
395- 4 . Keys must start with ` sk- ` (validated automatically)
396394
397395## 🏗️ Framework Support
398396
@@ -443,24 +441,24 @@ mirror-web-cli https://shop.example.com --debug --clean
443441# → Creates: ./shop.example.com-standard/ with detailed logging, removes analytics
444442```
445443
446- ### AI-Powered Analysis (OpenAI)
444+ ### AI-Powered Analysis (Gemini/ OpenAI)
447445
448446** Windows PowerShell:**
449447
450448``` powershell
451449# Set environment variable first
452- $env:OPENAI_API_KEY="sk-proj-your-openai-key-here "
450+ $env:GEMINI_API_KEY="AIzaSy... "
453451mirror-web-cli https://complex-app.com --ai --clean
454- # → Creates: ./complex-app.com-ai-enhanced/ with OpenAI GPT-4o framework analysis
452+ # → Creates: ./complex-app.com-ai-enhanced/ with AI framework analysis
455453```
456454
457455** macOS/Linux:**
458456
459457``` bash
460458# Set environment variable first
461- export OPENAI_API_KEY= " sk-proj-your-openai-key-here "
459+ export GEMINI_API_KEY= " AIzaSy... "
462460mirror-web-cli https://complex-app.com --ai --clean
463- # → Creates: ./complex-app.com-ai-enhanced/ with OpenAI GPT-4o framework analysis
461+ # → Creates: ./complex-app.com-ai-enhanced/ with AI framework analysis
464462```
465463
466464** Cross-platform (using CLI parameter):**
0 commit comments