glance-cli 0.14.0 → 0.16.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/CHANGELOG.md +48 -0
- package/README.md +122 -160
- package/dist/cli.js +151 -136
- package/package.json +2 -2
- package/src/cli/commands.ts +679 -74
- package/src/cli/config.ts +1 -1
- package/src/cli/index.ts +29 -2
- package/src/cli/utils.ts +3 -2
- package/src/core/summarizer.ts +106 -51
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,54 @@ All notable changes to glance-cli will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.16.0] - 2026-01-06
|
|
9
|
+
|
|
10
|
+
### 🌐 Added: Enhanced Browse Mode
|
|
11
|
+
- **Interactive Link Navigation**: Browse websites interactively with automatic summarization
|
|
12
|
+
- **Enhanced Commands**: Navigate with options like `3 --tldr`, `5 --read -l fr`, `1 --eli5 -m gemini`
|
|
13
|
+
- **Automatic Summaries**: Every navigation shows a TLDR summary by default (like normal glance)
|
|
14
|
+
- **File Output Support**: Save summaries with `3 --output file.md --format markdown` or `3 --output data.json --format json`
|
|
15
|
+
- **Smart UX Design**:
|
|
16
|
+
- Last command and results show at bottom before prompt (no scrolling needed)
|
|
17
|
+
- Clear screen refresh on each iteration for clean interface
|
|
18
|
+
- Simple separator design with consistent formatting
|
|
19
|
+
- **Seamless Navigation**: Browse mode continues after enhanced commands without exit bugs
|
|
20
|
+
- **Command Categories**:
|
|
21
|
+
- Navigation: `1-24` (navigate to link), `n` (nav links), `e` (external), `a` (all)
|
|
22
|
+
- Utility: `b` (back), `h` (history), `q` (quit)
|
|
23
|
+
- Enhanced: All glance options work with link numbers
|
|
24
|
+
|
|
25
|
+
### 🐛 Fixed
|
|
26
|
+
- **Browse Mode Exit Bug**: Fixed spinners interfering with readline interface using `discardStdin: false`
|
|
27
|
+
- **File Output Confirmation**: Now shows `✅ Content saved to filename` instead of generic "completed"
|
|
28
|
+
- **Regular Navigation Summary**: Fixed missing summaries when just typing link numbers
|
|
29
|
+
|
|
30
|
+
### 🚀 Enhanced from v0.15.0: Comprehensive Local Model Support
|
|
31
|
+
- **Fixed gpt-oss model compatibility**: Added special handling for gpt-oss models that use "thinking" field in responses
|
|
32
|
+
- **Tested and verified 7 Ollama models**:
|
|
33
|
+
- ✅ llama3:latest - Fast, reliable general-purpose model
|
|
34
|
+
- ✅ gemma3:4b - Lightweight, efficient for quick summaries
|
|
35
|
+
- ✅ mistral:7b / mistral:latest - Excellent quality responses
|
|
36
|
+
- ✅ gpt-oss:20b - Advanced local model with reasoning capabilities
|
|
37
|
+
- ✅ gpt-oss:120b-cloud - Largest model for complex tasks
|
|
38
|
+
- ✅ deepseek-r1:latest - Strong reasoning and analysis
|
|
39
|
+
- **100% test success rate**: All models work with --tldr, --key-points, and --eli5 modes
|
|
40
|
+
- **Improved response parsing**: Better extraction of meaningful content from various model response formats
|
|
41
|
+
|
|
42
|
+
### 📝 Documentation
|
|
43
|
+
- Added comprehensive browse mode usage examples
|
|
44
|
+
- Updated README with interactive navigation features
|
|
45
|
+
- Included enhanced command syntax and options
|
|
46
|
+
|
|
47
|
+
## [0.14.0] - 2026-01-06
|
|
48
|
+
|
|
49
|
+
### ✨ Added: Clipboard Copy Feature
|
|
50
|
+
- **New --copy/-c flag**: Copy summaries directly to clipboard
|
|
51
|
+
- **Cross-platform support**: Works on macOS, Windows, and Linux via clipboardy package
|
|
52
|
+
- **Smart formatting**: Copies raw text for terminal output, formatted for JSON/markdown
|
|
53
|
+
- **Updated documentation**: Added examples and help text for copy feature
|
|
54
|
+
- **Fixed metadata display**: Now shows actual extracted values instead of placeholders
|
|
55
|
+
|
|
8
56
|
## [0.13.1] - 2026-01-05
|
|
9
57
|
|
|
10
58
|
### 📦 Optimized: Package Size (Breaking: Major Size Reduction)
|
package/README.md
CHANGED
|
@@ -2,193 +2,156 @@
|
|
|
2
2
|
|
|
3
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
|
-
- **100% FREE by default** – Uses local Ollama (no API keys needed!)
|
|
6
|
-
- **Auto language detection** – Detects English, French, Spanish, Haitian Creole
|
|
7
|
-
- **No tracking** – Your browsing history stays private
|
|
8
|
-
- **Voice-enabled** – Read articles aloud with multilingual support
|
|
9
|
-
- **File output** – Save summaries as markdown, JSON, or plain text
|
|
10
|
-
- **Lightning fast** – Built with Bun and TypeScript
|
|
11
|
-
|
|
12
|
-
Turn any webpage into terminal-friendly insights with AI summaries or full content, read it, listen to it, or export it.
|
|
13
|
-
|
|
14
5
|
[](https://www.npmjs.com/package/glance-cli)
|
|
15
6
|
[](https://www.npmjs.com/package/glance-cli)
|
|
16
7
|
[](https://opensource.org/licenses/MIT)
|
|
17
8
|
|
|
18
9
|
---
|
|
19
10
|
|
|
20
|
-
##
|
|
11
|
+
## Why glance-cli?
|
|
12
|
+
|
|
13
|
+
- ✅ **100% FREE** – Uses local Ollama (no API keys needed)
|
|
14
|
+
- 🌍 **Auto language detection** – English, French, Spanish, Haitian Creole
|
|
15
|
+
- 🔒 **Privacy first** – Your browsing history stays local
|
|
16
|
+
- 🎤 **Voice-enabled** – Read articles aloud with multilingual support
|
|
17
|
+
- 💾 **Multiple formats** – Save as markdown, JSON, or plain text
|
|
18
|
+
- ⚡ **Lightning fast** – Built with Bun and TypeScript
|
|
21
19
|
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Quick Start
|
|
22
23
|
```bash
|
|
23
24
|
# Install
|
|
24
|
-
|
|
25
|
+
npm install -g glance-cli
|
|
25
26
|
|
|
26
27
|
# Use immediately
|
|
27
|
-
glance https://
|
|
28
|
-
glance https://
|
|
29
|
-
glance https://news.com --
|
|
30
|
-
glance https://news.com --copy # Copy to clipboard
|
|
28
|
+
glance https://news.com # Get AI summary
|
|
29
|
+
glance https://news.com --read # Read aloud
|
|
30
|
+
glance https://news.com --browse # Interactive navigation
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
**For 100% free local AI:**
|
|
34
34
|
```bash
|
|
35
|
-
# One-time setup (~4GB)
|
|
36
35
|
curl -fsSL https://ollama.com/install.sh | sh
|
|
37
36
|
ollama pull llama3
|
|
38
|
-
|
|
39
|
-
# Now completely free forever
|
|
40
37
|
glance https://techcrunch.com --tldr --read
|
|
41
38
|
```
|
|
42
39
|
|
|
43
40
|
---
|
|
44
41
|
|
|
45
|
-
##
|
|
42
|
+
## Core Features
|
|
46
43
|
|
|
47
|
-
###
|
|
44
|
+
### 🌐 Interactive Browse Mode
|
|
45
|
+
Navigate websites interactively with AI summaries on demand.
|
|
48
46
|
```bash
|
|
49
|
-
glance
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
glance https://news.ycombinator.com --browse
|
|
48
|
+
|
|
49
|
+
# Inside browse mode:
|
|
50
|
+
1 # Navigate to link 1
|
|
51
|
+
3 --tldr # Navigate + get summary
|
|
52
|
+
5 --read # Navigate + read aloud
|
|
53
|
+
1 --output file.md # Navigate + save to file
|
|
54
|
+
n # Show navigation links
|
|
55
|
+
e # Show external links
|
|
56
|
+
b # Go back
|
|
57
|
+
q # Quit
|
|
56
58
|
```
|
|
57
59
|
|
|
58
|
-
###
|
|
60
|
+
### 📝 Read & Summarize
|
|
61
|
+
Extract content with AI summaries in multiple styles.
|
|
59
62
|
```bash
|
|
60
|
-
glance <url>
|
|
61
|
-
glance <url> --
|
|
62
|
-
glance <url> --
|
|
63
|
-
glance <url>
|
|
63
|
+
glance <url> # AI summary (default)
|
|
64
|
+
glance <url> --tldr # One sentence
|
|
65
|
+
glance <url> --key-points # Bullet points
|
|
66
|
+
glance <url> --eli5 # Simple explanation
|
|
67
|
+
glance <url> --full # Full content (no summary)
|
|
68
|
+
glance <url> --copy # Copy to clipboard
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 🎤 Voice & Audio
|
|
72
|
+
Listen to articles with natural voice synthesis.
|
|
73
|
+
```bash
|
|
74
|
+
glance <url> --read # Read aloud (auto-detects language)
|
|
75
|
+
glance <url> --audio-output audio.mp3 # Save as MP3
|
|
76
|
+
glance <url> --voice nova --read # Choose specific voice
|
|
77
|
+
glance <url> -l fr --read # French voice
|
|
64
78
|
|
|
65
|
-
glance --list-voices
|
|
79
|
+
glance --list-voices # See available voices
|
|
66
80
|
```
|
|
67
81
|
|
|
68
82
|
**Voice Options:**
|
|
69
|
-
- **Free**: System TTS (macOS
|
|
70
|
-
- **Premium**: ElevenLabs (natural voices, requires
|
|
83
|
+
- **Free**: System TTS (macOS/Windows/Linux)
|
|
84
|
+
- **Premium**: ElevenLabs (natural voices, requires API key)
|
|
71
85
|
|
|
72
|
-
###
|
|
86
|
+
### 💾 Save & Export
|
|
87
|
+
Save content in multiple formats.
|
|
73
88
|
```bash
|
|
74
|
-
glance
|
|
75
|
-
glance
|
|
76
|
-
glance <url> --
|
|
77
|
-
|
|
78
|
-
# Auto-detection: Detects language from URL patterns and content
|
|
79
|
-
# Supported: en, fr, es, ht (Haitian Creole)
|
|
80
|
-
# Override: Use --language flag to force specific language
|
|
89
|
+
glance <url> --output summary.md # Save as markdown
|
|
90
|
+
glance <url> --output data.json # Save as JSON
|
|
91
|
+
glance <url> --format plain -o file # Save as plain text
|
|
81
92
|
```
|
|
82
93
|
|
|
83
|
-
###
|
|
94
|
+
### 🌍 Auto Language Detection
|
|
95
|
+
Automatically detects and adapts to content language.
|
|
84
96
|
```bash
|
|
85
|
-
|
|
86
|
-
glance
|
|
87
|
-
|
|
88
|
-
# Premium cloud AI (optional, requires API keys)
|
|
89
|
-
glance <url> --model gpt-4o-mini # OpenAI
|
|
90
|
-
glance <url> --model gemini-2.0-flash-exp # Google Gemini
|
|
91
|
-
|
|
92
|
-
# Model management
|
|
93
|
-
glance --list-models # Show available local models
|
|
94
|
-
glance --check-services # Show AI/voice service status
|
|
95
|
-
glance <url> --free-only # Never use paid APIs
|
|
97
|
+
glance https://lemonde.fr --tldr # Auto-detects French
|
|
98
|
+
glance https://news.es --read # Auto-detects Spanish + voice
|
|
99
|
+
glance <url> -l es --read # Override to Spanish
|
|
96
100
|
```
|
|
97
101
|
|
|
98
|
-
|
|
102
|
+
Supported: English, French, Spanish, Haitian Creole
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
---
|
|
101
105
|
|
|
106
|
+
## Common Use Cases
|
|
102
107
|
```bash
|
|
103
108
|
# Morning news with audio
|
|
104
109
|
glance https://news.ycombinator.com --tldr --read
|
|
105
110
|
|
|
106
111
|
# Quick copy for sharing
|
|
107
|
-
glance https://
|
|
112
|
+
glance https://article.com --tldr --copy
|
|
108
113
|
|
|
109
|
-
#
|
|
110
|
-
glance https://
|
|
114
|
+
# Interactive research
|
|
115
|
+
glance https://en.wikipedia.org/wiki/AI --browse
|
|
111
116
|
|
|
112
117
|
# Study while coding
|
|
113
118
|
glance https://tutorial.com --full --read
|
|
114
119
|
|
|
115
|
-
#
|
|
116
|
-
glance https://
|
|
120
|
+
# Save documentation
|
|
121
|
+
glance https://docs.python.org --output guide.md
|
|
117
122
|
|
|
118
|
-
# Multilingual
|
|
119
|
-
glance https://lemonde.fr --
|
|
120
|
-
|
|
121
|
-
# Save in different formats
|
|
122
|
-
glance https://news.com --output summary.md # Markdown format
|
|
123
|
-
glance https://api-docs.com --output data.json # JSON format
|
|
124
|
-
glance https://article.com --format plain --output content.txt # Plain text
|
|
125
|
-
|
|
126
|
-
# Batch processing
|
|
127
|
-
for url in $(cat urls.txt); do
|
|
128
|
-
glance "$url" --tldr --output "$(basename $url).md"
|
|
129
|
-
done
|
|
123
|
+
# Multilingual content
|
|
124
|
+
glance https://lemonde.fr --read # Auto-detects French voice
|
|
130
125
|
```
|
|
131
126
|
|
|
132
127
|
---
|
|
133
128
|
|
|
134
|
-
##
|
|
129
|
+
## AI Models
|
|
135
130
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
--full # Full content (no summary)
|
|
142
|
-
--ask "question" # Custom Q&A
|
|
143
|
-
```
|
|
131
|
+
**Local (Free)** – via Ollama:
|
|
132
|
+
- `llama3:latest` – Fast, reliable (recommended)
|
|
133
|
+
- `gemma3:4b` – Lightweight, efficient
|
|
134
|
+
- `mistral:7b` – Excellent quality
|
|
135
|
+
- `deepseek-r1:latest` – Strong reasoning
|
|
144
136
|
|
|
145
|
-
|
|
137
|
+
**Cloud (Optional)** – requires API keys:
|
|
138
|
+
- `gpt-4o-mini` – OpenAI
|
|
139
|
+
- `gemini-2.0-flash-exp` – Google Gemini
|
|
146
140
|
```bash
|
|
147
|
-
--
|
|
148
|
-
--
|
|
149
|
-
|
|
150
|
-
--list-voices # Show available voices
|
|
151
|
-
-l, --language <code> # Output language (en, fr, es, ht)
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### **AI Models**
|
|
155
|
-
```bash
|
|
156
|
-
--model <name> # AI model (llama3, gpt-4o-mini, gemini-2.0-flash-exp)
|
|
157
|
-
--list-models # Show local models
|
|
158
|
-
--check-services # Show service status
|
|
159
|
-
--free-only # Never use paid APIs
|
|
160
|
-
--prefer-quality # Use premium if available
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### **Output & File Saving**
|
|
164
|
-
```bash
|
|
165
|
-
--format <type> # Output format: md, json, plain (default: terminal)
|
|
166
|
-
--output, -o <file> # Save to file (auto-detects format from extension)
|
|
167
|
-
--copy, -c # Copy summary to clipboard
|
|
168
|
-
--stream # Live streaming output
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### **Advanced**
|
|
172
|
-
```bash
|
|
173
|
-
--screenshot <file> # Capture screenshot
|
|
174
|
-
--full-render # Render JavaScript (for SPAs)
|
|
175
|
-
--metadata # Show page metadata
|
|
176
|
-
--links # Extract all links
|
|
177
|
-
-v, --verbose # Detailed logs
|
|
178
|
-
-h, --help # Show help
|
|
179
|
-
-V, --version # Show version
|
|
141
|
+
glance <url> --model llama3 # Use specific model
|
|
142
|
+
glance --list-models # Show available models
|
|
143
|
+
glance <url> --free-only # Never use paid APIs
|
|
180
144
|
```
|
|
181
145
|
|
|
182
146
|
---
|
|
183
147
|
|
|
184
|
-
##
|
|
185
|
-
|
|
148
|
+
## Configuration
|
|
186
149
|
```bash
|
|
187
150
|
# AI Providers (optional)
|
|
188
151
|
export OPENAI_API_KEY=...
|
|
189
152
|
export GEMINI_API_KEY=...
|
|
190
153
|
|
|
191
|
-
# Voice (optional, for premium)
|
|
154
|
+
# Voice (optional, for premium voices)
|
|
192
155
|
export ELEVENLABS_API_KEY=...
|
|
193
156
|
|
|
194
157
|
# Ollama (optional, auto-detected)
|
|
@@ -197,66 +160,65 @@ export OLLAMA_ENDPOINT=http://localhost:11434
|
|
|
197
160
|
|
|
198
161
|
---
|
|
199
162
|
|
|
200
|
-
##
|
|
201
|
-
|
|
163
|
+
## All Options
|
|
202
164
|
```bash
|
|
203
|
-
#
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
#
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
#
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
#
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
#
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
#
|
|
219
|
-
|
|
165
|
+
# Content
|
|
166
|
+
--browse # Interactive navigation
|
|
167
|
+
--tldr # One sentence summary
|
|
168
|
+
--key-points, -k # Bullet points
|
|
169
|
+
--eli5 # Simple explanation
|
|
170
|
+
--full # Full content
|
|
171
|
+
--ask "question" # Custom Q&A
|
|
172
|
+
|
|
173
|
+
# Voice & Audio
|
|
174
|
+
--read, -r # Read aloud
|
|
175
|
+
--audio-output <file> # Save as MP3
|
|
176
|
+
--voice <name> # Choose voice
|
|
177
|
+
--list-voices # Show available voices
|
|
178
|
+
-l, --language <code> # Output language (en, fr, es, ht)
|
|
179
|
+
|
|
180
|
+
# AI Models
|
|
181
|
+
--model <name> # Choose AI model
|
|
182
|
+
--list-models # Show local models
|
|
183
|
+
--free-only # Never use paid APIs
|
|
184
|
+
|
|
185
|
+
# Output
|
|
186
|
+
--format <type> # Format: md, json, plain
|
|
187
|
+
--output, -o <file> # Save to file
|
|
188
|
+
--copy, -c # Copy to clipboard
|
|
189
|
+
--stream # Live streaming output
|
|
190
|
+
|
|
191
|
+
# Advanced
|
|
192
|
+
--screenshot <file> # Capture screenshot
|
|
193
|
+
--full-render # Render JavaScript
|
|
194
|
+
--metadata # Show page metadata
|
|
195
|
+
--links # Extract all links
|
|
196
|
+
-v, --verbose # Detailed logs
|
|
220
197
|
```
|
|
221
198
|
|
|
222
199
|
---
|
|
223
200
|
|
|
224
|
-
##
|
|
225
|
-
|
|
226
|
-
- **Fast**: ~5 seconds with local AI (Ollama)
|
|
227
|
-
- **Efficient**: Cheerio-based content extraction
|
|
228
|
-
- **Lightweight**: ~8MB bundle size
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## 🤝 Contributing
|
|
201
|
+
## Contributing
|
|
233
202
|
|
|
234
203
|
Contributions welcome! Check out our [Contributing Guide](CONTRIBUTING.md).
|
|
235
|
-
|
|
236
204
|
```bash
|
|
237
205
|
git clone https://github.com/jkenley/glance-cli.git
|
|
238
206
|
cd glance-cli
|
|
239
207
|
bun install
|
|
240
|
-
bun dev https://
|
|
208
|
+
bun dev https://example.com
|
|
241
209
|
```
|
|
242
210
|
|
|
243
211
|
---
|
|
244
212
|
|
|
245
|
-
##
|
|
213
|
+
## Support
|
|
246
214
|
|
|
247
|
-
|
|
215
|
+
If you find glance-cli useful, consider [buying me a coffee](https://ko-fi.com/jkenley) ☕
|
|
248
216
|
|
|
249
217
|
[](https://ko-fi.com/jkenley)
|
|
250
218
|
|
|
251
219
|
---
|
|
252
220
|
|
|
253
|
-
##
|
|
254
|
-
|
|
255
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## 🔗 Links
|
|
221
|
+
## Links
|
|
260
222
|
|
|
261
223
|
- **GitHub**: [github.com/jkenley/glance-cli](https://github.com/jkenley/glance-cli)
|
|
262
224
|
- **NPM**: [npmjs.com/package/glance-cli](https://www.npmjs.com/package/glance-cli)
|
|
@@ -264,6 +226,6 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
264
226
|
|
|
265
227
|
---
|
|
266
228
|
|
|
267
|
-
**Built with ❤️ by [Kenley Jean](https://github.com/jkenley)**
|
|
229
|
+
**Built with ❤️ by [Kenley Jean](https://github.com/jkenley)** • MIT License
|
|
268
230
|
|
|
269
231
|
*Star ⭐ the repo if you find it useful!*
|