glance-cli 0.10.6 → 0.10.8

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 (3) hide show
  1. package/README.md +129 -308
  2. package/dist/cli.js +351 -354
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # glance-cli
2
2
 
3
- **AI-powered web reader for your terminal** – Fetch any webpage, extract clean content, and get instant AI summaries.
3
+ **AI-powered web reader for your terminal** – Fetch any webpage, extract clean content, get instant AI summaries, and listen with natural voice synthesis.
4
4
 
5
5
  - **100% FREE by default** – Uses local Ollama (no API keys needed!)
6
- - **Privacy-first** – Your data stays on your machine
6
+ - **Auto language detection** – Detects English, French, Spanish, Haitian Creole
7
+ - **Privacy-first** – Your data stays on your machine
8
+ - **Voice-enabled** – Read articles aloud with multilingual support
9
+ - **File output** – Save summaries as markdown, JSON, or plain text
7
10
  - **Lightning fast** – Built with Bun and TypeScript
8
- - **AI-powered formatting** – Intelligent content structure for `--full` mode
9
- - **Production-ready** – Error handling, and retry logic
10
11
 
11
- Turn any webpage into beautifully formatted, terminal-friendly insights — no browser needed.
12
+ Turn any webpage into terminal-friendly insights with AI summaries or full content read it, listen to it, or export it.
12
13
 
13
14
  [![npm version](https://badge.fury.io/js/glance-cli.svg)](https://www.npmjs.com/package/glance-cli)
14
15
  [![Downloads](https://img.shields.io/npm/dm/glance-cli.svg)](https://www.npmjs.com/package/glance-cli)
@@ -19,310 +20,155 @@ Turn any webpage into beautifully formatted, terminal-friendly insights — no b
19
20
  ## ⚡ Quick Start
20
21
 
21
22
  ```bash
22
- # Install with Bun (preferred - faster!)
23
- bun install -g glance-cli
23
+ # Install
24
+ bun install -g glance-cli # Or: npm install -g glance-cli
24
25
 
25
- # Or with npm
26
- npm install -g glance-cli
27
-
28
- # Use immediately (works without setup!)
29
- glance https://example.com
26
+ # Use immediately
27
+ glance https://www.ayiti.ai # AI summary
28
+ glance https://www.ayiti.ai/fr --read # Auto-detects French + voice
29
+ glance https://news.com --output summary.md # Save as markdown
30
30
  ```
31
31
 
32
32
  **For 100% free local AI:**
33
33
  ```bash
34
- # One-time setup (~4GB download)
34
+ # One-time setup (~4GB)
35
35
  curl -fsSL https://ollama.com/install.sh | sh
36
36
  ollama pull llama3
37
37
 
38
38
  # Now completely free forever
39
- glance https://nextjs.org/docs --tldr
39
+ glance https://techcrunch.com --tldr --read
40
40
  ```
41
41
 
42
42
  ---
43
43
 
44
- ## 🎯 Why Glance?
45
-
46
- | Feature | Glance + Ollama | Traditional AI Tools |
47
- |---------|-----------------|---------------------|
48
- | **Cost** | $0 forever | $20-100/month |
49
- | **Privacy** | 100% local | Cloud-based |
50
- | **Speed** | 2-3 seconds | 10-30 seconds |
51
- | **Setup** | 2 minutes | Instant (with $$) |
52
-
53
- Perfect for developers who want fast, private, and free AI summarization in their terminal.
54
-
55
- ---
56
-
57
- ## 📖 Basic Usage
44
+ ## 🎯 Core Features
58
45
 
59
- ### Summary Modes
46
+ ### 📝 **Content Modes**
60
47
  ```bash
61
- # Quick summary
62
- glance https://nextjs.org/docs
63
-
64
- # One-sentence TL;DR
65
- glance https://techcrunch.com/article --tldr
66
-
67
- # Bullet point key insights
68
- glance https://blog.example.com --key-points
69
-
70
- # Simple explanation
71
- glance https://complex-topic.com --eli5
72
-
73
- # Ask specific questions
74
- glance https://nextjs.org/docs --ask "What's the App Router?"
75
-
76
- # Read FULL content (no summarization)
77
- glance https://blog.samaltman.com/article --full
78
- glance https://important-article.com --full --read # Listen to entire article
79
-
80
- # Read FULL content in different languages
81
- glance https://blog.samaltman.com/article --full -l fr # Translate to French
82
- glance https://lemonde.fr/article --full -l en --read # French article in English with voice
83
- ```
84
-
85
- ### AI Models
86
-
87
- **Free Local AI (Recommended):**
88
- ```bash
89
- glance https://example.com --model llama3
90
- # Popular models: llama3, mistral, phi3, gemma2
91
- # List available: glance --list-models
48
+ glance <url> # AI summary (default)
49
+ glance <url> --tldr # One sentence
50
+ glance <url> --key-points # Bullet points
51
+ glance <url> --eli5 # Simple explanation
52
+ glance <url> --full # Full content (no summary)
53
+ glance <url> --ask "..." # Ask specific question
92
54
  ```
93
55
 
94
- **Optional Cloud AI:**
56
+ ### 🎤 **Voice & Audio**
95
57
  ```bash
96
- # OpenAI (requires API key)
97
- export OPENAI_API_KEY=sk-...
98
- glance https://example.com --model gpt-4o-mini
58
+ glance <url> --read # Read aloud
59
+ glance <url> --audio-output article.mp3 # Save as MP3
60
+ glance <url> --voice nova --read # Choose voice
61
+ glance <url> -l fr --voice antoine --read # French voice
99
62
 
100
- # Google Gemini (requires API key)
101
- export GEMINI_API_KEY=...
102
- glance https://example.com --model gemini-2.0-flash-exp
63
+ glance --list-voices # See all voices
103
64
  ```
104
65
 
105
- **Smart Detection:**
106
- ```bash
107
- # See what services you have
108
- glance --check-services
109
-
110
- # Force free-only
111
- glance https://example.com --free-only
112
-
113
- # Prefer quality (use paid if available)
114
- glance https://example.com --prefer-quality
115
- ```
66
+ **Voice Options:**
67
+ - **Free**: System TTS (macOS Say, Windows SAPI, Linux espeak)
68
+ - **Premium**: ElevenLabs (natural voices, requires `ELEVENLABS_API_KEY`)
116
69
 
117
- ### Output Options
70
+ ### 🌍 **Multi-Language Support**
118
71
  ```bash
119
- # Export to Markdown
120
- glance https://nextjs.org/docs --export notes.md
121
-
122
- # Export to JSON
123
- glance https://api-docs.com --json -o data.json
124
-
125
- # Save as audio (text-to-speech)
126
- glance https://article.com --audio-output summary.mp3
127
-
128
- # Read aloud immediately
129
- glance https://blog.com --read
130
-
131
- # Use specific voice
132
- glance https://news.com --voice nova --read
72
+ glance https://lemonde.fr --tldr # Auto-detects French from URL
73
+ glance https://www.ayiti.ai/fr --read # Auto-detects French + voice
74
+ glance <url> --full -l es --voice isabella --read # Override to Spanish + voice
133
75
 
134
- # French content with French voice
135
- glance https://lemonde.fr --voice antoine -l fr --read
136
-
137
- # Spanish content with Spanish voice
138
- glance https://elpais.com --voice isabella -l es --read
76
+ # Auto-detection: Detects language from URL patterns and content
77
+ # Supported: en, fr, es, ht (Haitian Creole)
78
+ # Override: Use --language flag to force specific language
139
79
  ```
140
80
 
141
- ### Advanced Features
81
+ ### 🤖 **AI Models**
142
82
  ```bash
143
- # Screenshot + summary
144
- glance https://example.com --screenshot page.png --tldr
145
-
146
- # JavaScript-heavy sites (SPAs)
147
- glance https://react-app.com --full-render
83
+ # Free local AI (recommended)
84
+ glance <url> --model llama3
148
85
 
149
- # Multiple languages
150
- glance https://lemonde.fr --tldr -l fr # French
151
- glance https://elpais.com -k -l es # Spanish
86
+ # Premium cloud AI (optional, requires API keys)
87
+ glance <url> --model gpt-4o-mini # OpenAI
88
+ glance <url> --model gemini-2.0-flash-exp # Google Gemini
152
89
 
153
- # Streaming output
154
- glance https://long-article.com --stream
90
+ # Model management
91
+ glance --list-models # Show available local models
92
+ glance --check-services # Show AI/voice service status
93
+ glance <url> --free-only # Never use paid APIs
155
94
  ```
156
95
 
157
96
  ---
158
97
 
159
- ## 🎨 Output Formats
98
+ ## 📖 Common Use Cases
160
99
 
161
100
  ```bash
162
- # Terminal (default) - colorful, emoji-rich
163
- glance https://example.com
164
-
165
- # Markdown
166
- glance https://example.com -o article.md
167
-
168
- # JSON (for scripting)
169
- glance https://example.com -o data.json
170
-
171
- # HTML (embeddable)
172
- glance https://example.com --format html -o page.html
173
-
174
- # Plain text (pipeable)
175
- glance https://example.com --format plain | grep "keyword"
176
- ```
101
+ # Morning news with audio
102
+ glance https://news.ycombinator.com --tldr --read
177
103
 
178
- ---
104
+ # Documentation lookup
105
+ glance https://nextjs.org/docs --ask "What's the App Router?"
179
106
 
180
- ## 🚀 Performance
181
- - Fast content extraction with Cheerio
182
- - Optimized AI model selection
183
- - Efficient text processing pipeline
184
- - Lightweight 8MB bundle
107
+ # Study while coding
108
+ glance https://tutorial.com --full --read
185
109
 
186
- ---
110
+ # Auto language detection
111
+ glance https://www.ayiti.ai/fr --tldr # Automatically detects French
187
112
 
188
- ## 🛠️ Common Use Cases
113
+ # Multilingual learning
114
+ glance https://lemonde.fr --full -l en --read # French → English + voice
189
115
 
190
- ### 1. Quick Documentation Lookup
191
- ```bash
192
- glance https://nextjs.org/docs --ask "How do I use Server Actions?"
193
- ```
116
+ # Save in different formats
117
+ glance https://news.com --output summary.md # Markdown format
118
+ glance https://api-docs.com --output data.json # JSON format
119
+ glance https://article.com --format plain --output content.txt # Plain text
194
120
 
195
- ### 2. Morning News Briefing
196
- ```bash
197
- glance https://news.ycombinator.com --tldr --read
198
- ```
199
-
200
- ### 3. Research & Note-Taking
201
- ```bash
202
- glance https://research-paper.com --key-points --export notes.md
203
- ```
204
-
205
- ### 4. Batch Processing
206
- ```bash
207
- cat urls.txt | while read url; do
208
- glance "$url" --tldr >> daily-summary.md
121
+ # Batch processing
122
+ for url in $(cat urls.txt); do
123
+ glance "$url" --tldr --output "$(basename $url).md"
209
124
  done
210
125
  ```
211
126
 
212
- ### 5. API Documentation
213
- ```bash
214
- glance https://api-docs.com --ask "How do I authenticate?" --format plain
215
- ```
216
-
217
- ### 6. Listen to Full Articles
218
- ```bash
219
- # Read entire blog posts or articles
220
- glance https://blog.example.com/long-post --full --read
221
-
222
- # Save full content as audio
223
- glance https://important-article.com --full --audio-output article.mp3
127
+ ---
224
128
 
225
- # Export full content to markdown
226
- glance https://documentation.com/guide --full --export guide.md
227
- ```
129
+ ## 📚 All Options
228
130
 
229
- ### 7. Multilingual Full Content
131
+ ### **Content**
230
132
  ```bash
231
- # Translate entire articles to other languages
232
- glance https://blog.samaltman.com/post --full -l fr --read # English to French
233
- glance https://lemonde.fr/article --full -l en --read # French to English
234
- glance https://elpais.com/news --full -l en --voice nova --read # Spanish to English
235
-
236
- # Perfect for language learning or accessibility
237
- glance https://technical-docs.com --full -l es --audio-output spanish-docs.mp3
133
+ --tldr # One sentence summary
134
+ --key-points, -k # Bullet points
135
+ --eli5 # Simple explanation
136
+ --full # Full content (no summary)
137
+ --ask "question" # Custom Q&A
238
138
  ```
239
139
 
240
- ### 8. Smart Content Formatting
140
+ ### **Voice & Audio**
241
141
  ```bash
242
- # AI automatically formats messy websites for better readability
243
- glance https://personal-blog.com --full # Cleans up layout
244
- glance https://complex-site.com --full --read # Perfect for voice
245
-
246
- # Works great for sites with poor formatting
247
- glance https://old-website.com --full --export clean-article.md
142
+ --read, --speak # Read aloud
143
+ --audio-output <file> # Save as MP3
144
+ --voice <name> # Choose voice (nova, onyx, antoine, isabella)
145
+ --list-voices # Show available voices
146
+ -l, --language <code> # Output language (en, fr, es, ht)
248
147
  ```
249
148
 
250
- ---
251
-
252
- ## 🎤 Voice & Language Support
253
-
254
- Glance supports **multi-language voice synthesis** with ElevenLabs integration:
255
-
149
+ ### **AI Models**
256
150
  ```bash
257
- # List available voices by language
258
- glance --list-voices
259
-
260
- # English voices (default)
261
- glance https://news.com --voice nova --read # Energetic
262
- glance https://docs.com --voice onyx --read # Deep, authoritative
263
-
264
- # French voices
265
- glance https://lemonde.fr --voice antoine -l fr --read
266
-
267
- # Spanish voices
268
- glance https://elpais.com --voice isabella -l es --read
269
-
270
- # Haitian Creole support
271
- glance https://example.ht --voice nova -l ht --read
151
+ --model <name> # AI model (llama3, gpt-4o-mini, gemini-2.0-flash-exp)
152
+ --list-models # Show local models
153
+ --check-services # Show service status
154
+ --free-only # Never use paid APIs
155
+ --prefer-quality # Use premium if available
272
156
  ```
273
157
 
274
- **Voice Quality Levels:**
275
- - **Free**: System TTS (macOS Say, Windows SAPI, Linux espeak)
276
- - **Premium**: ElevenLabs voices with natural pronunciation (requires API key)
277
-
278
- Set `ELEVENLABS_API_KEY` environment variable for premium voices.
279
-
280
- ---
281
-
282
- ## 📚 All Options
283
-
158
+ ### **Output & File Saving**
284
159
  ```bash
285
- # Summary modes
286
- glance <url> # Standard summary
287
- glance <url> --tldr # One sentence
288
- glance <url> --key-points # Bullet points
289
- glance <url> --eli5 # Simple explanation
290
- glance <url> --ask "question" # Custom Q&A
291
- glance <url> --full # Full content (no summary)
292
- glance <url> --full -l fr # Full content translated to French
293
-
294
- # AI models
295
- --model <name> # llama3, gpt-4o-mini, gemini-2.0-flash-exp
296
- --list-models # Show available Ollama models
297
- --check-services # Show available AI/voice services
298
- --free-only # Never use paid APIs
299
- --prefer-quality # Use premium services when available
300
-
301
- # Output
302
- -o, --export <file> # Save to file (auto-detects format)
303
- --markdown # Markdown format
304
- --json # JSON format
305
- --format <type> # terminal, markdown, json, html, plain
160
+ --format <type> # Output format: md, json, plain (default: terminal)
161
+ --output, -o <file> # Save to file (auto-detects format from extension)
306
162
  --stream # Live streaming output
163
+ ```
307
164
 
308
- # Voice/Audio
309
- --read, --speak # Read aloud (text-to-speech)
310
- --audio-output <file> # Save as MP3
311
- --voice <name> # Choose voice (nova, onyx, antoine, etc.)
312
- --list-voices # Show available voices by language
313
- -l, --language <code> # Language for voice selection (en, fr, es, ht)
314
-
315
- # Advanced
165
+ ### **Advanced**
166
+ ```bash
316
167
  --screenshot <file> # Capture screenshot
317
168
  --full-render # Render JavaScript (for SPAs)
318
169
  --metadata # Show page metadata
319
170
  --links # Extract all links
320
- --tables # Extract tables
321
- -l, --language <code> # Output language (en, fr, es, ht)
322
- -e, --emoji # Add emojis
323
-
324
- # Other
325
- -v, --verbose # Show detailed logs
171
+ -v, --verbose # Detailed logs
326
172
  -h, --help # Show help
327
173
  -V, --version # Show version
328
174
  ```
@@ -331,92 +177,60 @@ glance <url> --full -l fr # Full content translated to French
331
177
 
332
178
  ## 🔧 Configuration
333
179
 
334
- ### Environment Variables
335
-
336
180
  ```bash
337
181
  # AI Providers (optional)
338
182
  export OPENAI_API_KEY=sk-...
339
183
  export GEMINI_API_KEY=...
340
184
 
341
- # Voice (optional)
185
+ # Voice (optional, for premium)
342
186
  export ELEVENLABS_API_KEY=...
343
187
 
344
188
  # Ollama (optional, auto-detected)
345
189
  export OLLAMA_ENDPOINT=http://localhost:11434
346
-
347
190
  ```
348
191
 
349
192
  ---
350
193
 
351
- ## 🚀 Examples
352
-
353
- ### Learning & Research
354
- ```bash
355
- # Understand a new framework
356
- glance https://nextjs.org/docs --eli5
357
-
358
- # Quick reference
359
- glance https://nextjs.org/docs --key-points --export nextjs-notes.md
360
-
361
- # Specific questions
362
- glance https://nextjs.org/docs --ask "What's the difference between pages and app router?"
363
- ```
194
+ ## 🎓 Pro Tips
364
195
 
365
- ### Daily Workflow
366
196
  ```bash
367
- # Morning news
368
- glance https://news.ycombinator.com --tldr --read
197
+ # 1. Auto language detection + file saving
198
+ glance https://lemonde.fr --output french-article.md # Auto-detects French format
369
199
 
370
- # Documentation lookup
371
- glance https://nextjs.org/docs/app/api-reference/functions/fetch --ask "How do I revalidate?"
200
+ # 2. Format override for different use cases
201
+ glance https://news.com --format json --output backup.md # JSON content in .md file
372
202
 
373
- # Code examples
374
- glance https://tutorial.com --format plain | grep -A 10 "example"
375
- ```
203
+ # 3. Use local AI for privacy
204
+ glance https://www.ayiti.ai --model llama3 --free-only
376
205
 
377
- ### Content Creation
378
- ```bash
379
- # Extract for blog post
380
- glance https://source-article.com --key-points --export research.md
206
+ # 4. Match voice to auto-detected language
207
+ glance https://www.ayiti.ai/fr --voice antoine --read # French detection + voice
381
208
 
382
- # Multilingual content
383
- glance https://lemonde.fr --tldr -l fr --export french-news.md
209
+ # 5. Streaming for long content
210
+ glance https://long-article.com --stream
384
211
  ```
385
212
 
386
213
  ---
387
214
 
388
- ## 🎓 Pro Tips
389
-
390
- **1. Use local AI for daily tasks:**
391
- ```bash
392
- glance https://example.com --model llama3 # Free, fast, private
393
- ```
394
-
395
- **2. Pipe output for scripting:**
396
- ```bash
397
- glance https://example.com --format plain | grep "keyword" | wc -l
398
- ```
215
+ ## 🚀 Performance
399
216
 
400
- **3. Save audio for commute:**
401
- ```bash
402
- glance https://article.com --tldr --audio-output commute.mp3
403
- ```
217
+ - **Fast**: 2-3 seconds with local AI (Ollama)
218
+ - **Efficient**: Cheerio-based content extraction
219
+ - **Smart caching**: Reduces redundant API calls
220
+ - **Lightweight**: ~8MB bundle size
404
221
 
405
- **4. Use streaming for long content:**
406
- ```bash
407
- glance https://long-article.com --stream
408
- ```
222
+ ---
409
223
 
410
- **5. Read full articles without summarization:**
411
- ```bash
412
- glance https://blog-post.com --full --read
413
- ```
224
+ ## 📊 Why Glance?
414
225
 
415
- **6. AI-powered smart formatting:**
416
- ```bash
417
- # Automatically formats messy content for readability
418
- glance https://complex-site.com --full # AI fixes formatting
419
- ```
226
+ | Feature | Glance + Ollama | Traditional Tools |
227
+ |---------|-----------------|-------------------|
228
+ | **Cost** | $0 forever | $20-100/month |
229
+ | **Privacy** | 100% local | Cloud-based |
230
+ | **Voice** | Built-in | Often separate |
231
+ | **Speed** | 2-3 seconds | 10-30 seconds |
232
+ | **Multilingual** | Full support | Limited |
233
+ | **Offline** | Works offline | Requires internet |
420
234
 
421
235
  ---
422
236
 
@@ -428,11 +242,19 @@ Contributions welcome! Check out our [Contributing Guide](CONTRIBUTING.md).
428
242
  git clone https://github.com/jkenley/glance-cli.git
429
243
  cd glance-cli
430
244
  bun install
431
- bun dev https://example.com
245
+ bun dev https://www.ayiti.ai
432
246
  ```
433
247
 
434
248
  ---
435
249
 
250
+ ## ☕ Support
251
+
252
+ I built this in my spare time because I wanted a better way to read web content from my terminal. If you find it useful and want to support continued development, you can [buy me a coffee](https://ko-fi.com/jkenley). It's completely optional—the tool will always be free and open source regardless.
253
+
254
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/jkenley)
255
+
256
+ ---
257
+
436
258
  ## 📄 License
437
259
 
438
260
  MIT License - see [LICENSE](LICENSE) for details.
@@ -444,7 +266,6 @@ MIT License - see [LICENSE](LICENSE) for details.
444
266
  - **GitHub**: [github.com/jkenley/glance-cli](https://github.com/jkenley/glance-cli)
445
267
  - **NPM**: [npmjs.com/package/glance-cli](https://www.npmjs.com/package/glance-cli)
446
268
  - **Issues**: [github.com/jkenley/glance-cli/issues](https://github.com/jkenley/glance-cli/issues)
447
- - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
448
269
 
449
270
  ---
450
271