glance-cli 0.10.6 → 0.10.7

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 +115 -309
  2. package/dist/cli.js +359 -366
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,14 @@
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
6
  - **Privacy-first** – Your data stays on your machine
7
+ - **Voice-enabled** – Read articles aloud with multilingual support
7
8
  - **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
9
+ - **Production-ready** – Smart caching, error handling, retry logic
10
10
 
11
- Turn any webpage into beautifully formatted, terminal-friendly insights — no browser needed.
11
+ Turn any webpage into terminal-friendly insights with AI summaries or full content read it, listen to it, or export it.
12
12
 
13
13
  [![npm version](https://badge.fury.io/js/glance-cli.svg)](https://www.npmjs.com/package/glance-cli)
14
14
  [![Downloads](https://img.shields.io/npm/dm/glance-cli.svg)](https://www.npmjs.com/package/glance-cli)
@@ -19,310 +19,144 @@ Turn any webpage into beautifully formatted, terminal-friendly insights — no b
19
19
  ## ⚡ Quick Start
20
20
 
21
21
  ```bash
22
- # Install with Bun (preferred - faster!)
23
- bun install -g glance-cli
22
+ # Install
23
+ bun install -g glance-cli # Or: npm install -g glance-cli
24
24
 
25
- # Or with npm
26
- npm install -g glance-cli
27
-
28
- # Use immediately (works without setup!)
29
- glance https://example.com
25
+ # Use immediately
26
+ glance https://www.ayiti.ai
27
+ glance https://www.ayiti.ai --read # Listen to it
28
+ glance https://www.ayiti.ai --tldr # Quick summary
30
29
  ```
31
30
 
32
31
  **For 100% free local AI:**
33
32
  ```bash
34
- # One-time setup (~4GB download)
33
+ # One-time setup (~4GB)
35
34
  curl -fsSL https://ollama.com/install.sh | sh
36
35
  ollama pull llama3
37
36
 
38
37
  # Now completely free forever
39
- glance https://nextjs.org/docs --tldr
38
+ glance https://techcrunch.com --tldr --read
40
39
  ```
41
40
 
42
41
  ---
43
42
 
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
58
-
59
- ### Summary Modes
60
- ```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
43
+ ## 🎯 Core Features
86
44
 
87
- **Free Local AI (Recommended):**
45
+ ### 📝 **Content Modes**
88
46
  ```bash
89
- glance https://example.com --model llama3
90
- # Popular models: llama3, mistral, phi3, gemma2
91
- # List available: glance --list-models
47
+ glance <url> # AI summary (default)
48
+ glance <url> --tldr # One sentence
49
+ glance <url> --key-points # Bullet points
50
+ glance <url> --eli5 # Simple explanation
51
+ glance <url> --full # Full content (no summary)
52
+ glance <url> --ask "..." # Ask specific question
92
53
  ```
93
54
 
94
- **Optional Cloud AI:**
55
+ ### 🎤 **Voice & Audio**
95
56
  ```bash
96
- # OpenAI (requires API key)
97
- export OPENAI_API_KEY=sk-...
98
- glance https://example.com --model gpt-4o-mini
57
+ glance <url> --read # Read aloud
58
+ glance <url> --audio-output article.mp3 # Save as MP3
59
+ glance <url> --voice nova --read # Choose voice
60
+ glance <url> -l fr --voice antoine --read # French voice
99
61
 
100
- # Google Gemini (requires API key)
101
- export GEMINI_API_KEY=...
102
- glance https://example.com --model gemini-2.0-flash-exp
62
+ glance --list-voices # See all voices
103
63
  ```
104
64
 
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
- ```
65
+ **Voice Options:**
66
+ - **Free**: System TTS (macOS Say, Windows SAPI, Linux espeak)
67
+ - **Premium**: ElevenLabs (natural voices, requires `ELEVENLABS_API_KEY`)
116
68
 
117
- ### Output Options
69
+ ### 🌍 **Multi-Language Support**
118
70
  ```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
133
-
134
- # French content with French voice
135
- glance https://lemonde.fr --voice antoine -l fr --read
71
+ glance <url> --full -l fr # Translate to French
72
+ glance <url> --full -l es --voice isabella --read # Spanish + voice
136
73
 
137
- # Spanish content with Spanish voice
138
- glance https://elpais.com --voice isabella -l es --read
74
+ # Supported: en, fr, es, ht (Haitian Creole)
139
75
  ```
140
76
 
141
- ### Advanced Features
77
+ ### 🤖 **AI Models**
142
78
  ```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
79
+ # Free local AI (recommended)
80
+ glance <url> --model llama3
148
81
 
149
- # Multiple languages
150
- glance https://lemonde.fr --tldr -l fr # French
151
- glance https://elpais.com -k -l es # Spanish
82
+ # Premium cloud AI (optional, requires API keys)
83
+ glance <url> --model gpt-4o-mini # OpenAI
84
+ glance <url> --model gemini-2.0-flash-exp # Google Gemini
152
85
 
153
- # Streaming output
154
- glance https://long-article.com --stream
86
+ # Model management
87
+ glance --list-models # Show available local models
88
+ glance --check-services # Show AI/voice service status
89
+ glance <url> --free-only # Never use paid APIs
155
90
  ```
156
91
 
157
92
  ---
158
93
 
159
- ## 🎨 Output Formats
94
+ ## 📖 Common Use Cases
160
95
 
161
96
  ```bash
162
- # Terminal (default) - colorful, emoji-rich
163
- glance https://example.com
97
+ # Morning news with audio
98
+ glance https://news.ycombinator.com --tldr --read
164
99
 
165
- # Markdown
166
- glance https://example.com -o article.md
100
+ # Documentation lookup
101
+ glance https://nextjs.org/docs --ask "What's the App Router?"
167
102
 
168
- # JSON (for scripting)
169
- glance https://example.com -o data.json
103
+ # Study while coding
104
+ glance https://tutorial.com --full --read
170
105
 
171
- # HTML (embeddable)
172
- glance https://example.com --format html -o page.html
106
+ # Multilingual learning
107
+ glance https://lemonde.fr --full -l en --read
173
108
 
174
- # Plain text (pipeable)
175
- glance https://example.com --format plain | grep "keyword"
109
+ # Batch processing
110
+ for url in $(cat urls.txt); do
111
+ glance "$url" --tldr >> digest.md
112
+ done
176
113
  ```
177
114
 
178
115
  ---
179
116
 
180
- ## 🚀 Performance
181
- - Fast content extraction with Cheerio
182
- - Optimized AI model selection
183
- - Efficient text processing pipeline
184
- - Lightweight 8MB bundle
185
-
186
- ---
187
-
188
- ## 🛠️ Common Use Cases
189
-
190
- ### 1. Quick Documentation Lookup
191
- ```bash
192
- glance https://nextjs.org/docs --ask "How do I use Server Actions?"
193
- ```
194
-
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
209
- done
210
- ```
117
+ ## 📚 All Options
211
118
 
212
- ### 5. API Documentation
119
+ ### **Content**
213
120
  ```bash
214
- glance https://api-docs.com --ask "How do I authenticate?" --format plain
121
+ --tldr # One sentence summary
122
+ --key-points, -k # Bullet points
123
+ --eli5 # Simple explanation
124
+ --full # Full content (no summary)
125
+ --ask "question" # Custom Q&A
215
126
  ```
216
127
 
217
- ### 6. Listen to Full Articles
128
+ ### **Voice & Audio**
218
129
  ```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
224
-
225
- # Export full content to markdown
226
- glance https://documentation.com/guide --full --export guide.md
130
+ --read, --speak # Read aloud
131
+ --audio-output <file> # Save as MP3
132
+ --voice <name> # Choose voice (nova, onyx, antoine, isabella)
133
+ --list-voices # Show available voices
134
+ -l, --language <code> # Output language (en, fr, es, ht)
227
135
  ```
228
136
 
229
- ### 7. Multilingual Full Content
137
+ ### **AI Models**
230
138
  ```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
139
+ --model <name> # AI model (llama3, gpt-4o-mini, gemini-2.0-flash-exp)
140
+ --list-models # Show local models
141
+ --check-services # Show service status
142
+ --free-only # Never use paid APIs
143
+ --prefer-quality # Use premium if available
238
144
  ```
239
145
 
240
- ### 8. Smart Content Formatting
146
+ ### **Output & Export**
241
147
  ```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
248
- ```
249
-
250
- ---
251
-
252
- ## 🎤 Voice & Language Support
253
-
254
- Glance supports **multi-language voice synthesis** with ElevenLabs integration:
255
-
256
- ```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
148
+ -o, --export <file> # Save to file
149
+ --stream # Live streaming output
150
+ --markdown, --json # Format shortcuts
272
151
  ```
273
152
 
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
-
153
+ ### **Advanced**
284
154
  ```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
306
- --stream # Live streaming output
307
-
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
316
155
  --screenshot <file> # Capture screenshot
317
156
  --full-render # Render JavaScript (for SPAs)
318
157
  --metadata # Show page metadata
319
158
  --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
159
+ -v, --verbose # Detailed logs
326
160
  -h, --help # Show help
327
161
  -V, --version # Show version
328
162
  ```
@@ -331,92 +165,57 @@ glance <url> --full -l fr # Full content translated to French
331
165
 
332
166
  ## 🔧 Configuration
333
167
 
334
- ### Environment Variables
335
-
336
168
  ```bash
337
169
  # AI Providers (optional)
338
170
  export OPENAI_API_KEY=sk-...
339
171
  export GEMINI_API_KEY=...
340
172
 
341
- # Voice (optional)
173
+ # Voice (optional, for premium)
342
174
  export ELEVENLABS_API_KEY=...
343
175
 
344
176
  # Ollama (optional, auto-detected)
345
177
  export OLLAMA_ENDPOINT=http://localhost:11434
346
-
347
178
  ```
348
179
 
349
180
  ---
350
181
 
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
- ```
182
+ ## 🎓 Pro Tips
364
183
 
365
- ### Daily Workflow
366
184
  ```bash
367
- # Morning news
368
- glance https://news.ycombinator.com --tldr --read
185
+ # 1. Translate + voice + save
186
+ glance https://www.ayiti.ai --full -l fr --audio-output french.mp3
369
187
 
370
- # Documentation lookup
371
- glance https://nextjs.org/docs/app/api-reference/functions/fetch --ask "How do I revalidate?"
188
+ # 2. Use local AI for privacy
189
+ glance https://www.ayiti.ai --model llama3 --free-only
372
190
 
373
- # Code examples
374
- glance https://tutorial.com --format plain | grep -A 10 "example"
375
- ```
376
-
377
- ### Content Creation
378
- ```bash
379
- # Extract for blog post
380
- glance https://source-article.com --key-points --export research.md
191
+ # 3. Match voice to language
192
+ glance https://lemonde.fr --voice antoine -l fr --read
381
193
 
382
- # Multilingual content
383
- glance https://lemonde.fr --tldr -l fr --export french-news.md
194
+ # 4. Streaming for long content
195
+ glance https://long-article.com --stream
384
196
  ```
385
197
 
386
198
  ---
387
199
 
388
- ## 🎓 Pro Tips
200
+ ## 🚀 Performance
389
201
 
390
- **1. Use local AI for daily tasks:**
391
- ```bash
392
- glance https://example.com --model llama3 # Free, fast, private
393
- ```
202
+ - **Fast**: 2-3 seconds with local AI (Ollama)
203
+ - **Efficient**: Cheerio-based content extraction
204
+ - **Smart caching**: Reduces redundant API calls
205
+ - **Lightweight**: ~8MB bundle size
394
206
 
395
- **2. Pipe output for scripting:**
396
- ```bash
397
- glance https://example.com --format plain | grep "keyword" | wc -l
398
- ```
399
-
400
- **3. Save audio for commute:**
401
- ```bash
402
- glance https://article.com --tldr --audio-output commute.mp3
403
- ```
207
+ ---
404
208
 
405
- **4. Use streaming for long content:**
406
- ```bash
407
- glance https://long-article.com --stream
408
- ```
209
+ ## 📊 Why Glance?
409
210
 
410
- **5. Read full articles without summarization:**
411
- ```bash
412
- glance https://blog-post.com --full --read
413
- ```
414
-
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
- ```
211
+ | Feature | Glance + Ollama | Traditional Tools |
212
+ |---------|-----------------|-------------------|
213
+ | **Cost** | $0 forever | $20-100/month |
214
+ | **Privacy** | 100% local | Cloud-based |
215
+ | **Voice** | Built-in | Often separate |
216
+ | **Speed** | 2-3 seconds | 10-30 seconds |
217
+ | **Multilingual** | Full support | Limited |
218
+ | **Offline** | Works offline | Requires internet |
420
219
 
421
220
  ---
422
221
 
@@ -428,11 +227,19 @@ Contributions welcome! Check out our [Contributing Guide](CONTRIBUTING.md).
428
227
  git clone https://github.com/jkenley/glance-cli.git
429
228
  cd glance-cli
430
229
  bun install
431
- bun dev https://example.com
230
+ bun dev https://www.ayiti.ai
432
231
  ```
433
232
 
434
233
  ---
435
234
 
235
+ ## ☕ Support
236
+
237
+ 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.
238
+
239
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/jkenley)
240
+
241
+ ---
242
+
436
243
  ## 📄 License
437
244
 
438
245
  MIT License - see [LICENSE](LICENSE) for details.
@@ -444,7 +251,6 @@ MIT License - see [LICENSE](LICENSE) for details.
444
251
  - **GitHub**: [github.com/jkenley/glance-cli](https://github.com/jkenley/glance-cli)
445
252
  - **NPM**: [npmjs.com/package/glance-cli](https://www.npmjs.com/package/glance-cli)
446
253
  - **Issues**: [github.com/jkenley/glance-cli/issues](https://github.com/jkenley/glance-cli/issues)
447
- - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
448
254
 
449
255
  ---
450
256