@brianlovin/hn-cli 0.4.2 → 0.4.3
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 +45 -38
- package/dist/cli.js +24 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A terminal UI for browsing Hacker News, modeled after the HN reader on my [personal website](https://brianlovin.com/hn).
|
|
4
4
|
|
|
5
|
+
<img width="2634" height="1814" alt="Screen Shot 2026-01-26 at 08 34 02@2x" src="https://github.com/user-attachments/assets/1db5a3e2-138e-45da-9cbd-64b3515c7e0c" />
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -46,15 +48,20 @@ bun run start
|
|
|
46
48
|
#### TL;DR Summaries
|
|
47
49
|
|
|
48
50
|
Press `t` on any story to generate an AI-powered summary. The AI reads the article and all comments, then provides:
|
|
51
|
+
|
|
49
52
|
- A concise summary of the article
|
|
50
53
|
- Key takeaways from the discussion
|
|
51
54
|
|
|
52
55
|
Summaries are cached locally, so you can revisit them without regenerating.
|
|
53
56
|
|
|
57
|
+
<img width="2634" height="1814" alt="Screen Shot 2026-01-26 at 08 35 01@2x" src="https://github.com/user-attachments/assets/69ad54eb-3b6d-4ae9-bfa3-71aa75a2c414" />
|
|
58
|
+
|
|
54
59
|
#### Chat
|
|
55
60
|
|
|
56
61
|
Press `c` to start a conversation with an AI about the story. The AI has full context of the article and all comments, so you can ask follow-up questions, get clarification, or dive deeper into specific topics.
|
|
57
62
|
|
|
63
|
+
<img width="2634" height="1814" alt="Screen Shot 2026-01-26 at 08 34 20@2x" src="https://github.com/user-attachments/assets/7c5e118c-325b-45cd-872c-bca8eea67a03" />
|
|
64
|
+
|
|
58
65
|
#### Bring Your Own API Key
|
|
59
66
|
|
|
60
67
|
The chat feature requires an API key from either Anthropic or OpenAI. On first use, you'll be prompted to choose a provider and enter your key.
|
|
@@ -71,7 +78,44 @@ export OPENAI_API_KEY=sk-...
|
|
|
71
78
|
|
|
72
79
|
**Option 2: In-app setup**
|
|
73
80
|
|
|
74
|
-
Press `
|
|
81
|
+
Press `s` to open settings and you'll be guided through the setup. Your key is stored locally at `~/.config/hn-cli/config.json`.
|
|
82
|
+
|
|
83
|
+
## Settings
|
|
84
|
+
|
|
85
|
+
Press `s` at any time to open the settings panel.
|
|
86
|
+
|
|
87
|
+
<img width="2634" height="1814" alt="Screen Shot 2026-01-26 at 08 34 34@2x" src="https://github.com/user-attachments/assets/9446753c-2b94-4fa4-9457-5706a461f36e" />
|
|
88
|
+
|
|
89
|
+
### AI Provider
|
|
90
|
+
|
|
91
|
+
- Switch between Anthropic and OpenAI
|
|
92
|
+
- Change the model (Claude Opus/Sonnet/Haiku, GPT-5 Nano/GPT-5 Mini/GPT-5.2)
|
|
93
|
+
- Add or clear API keys
|
|
94
|
+
|
|
95
|
+
### Story Filtering
|
|
96
|
+
|
|
97
|
+
These settings control which stories appear in your feed:
|
|
98
|
+
|
|
99
|
+
| Setting | Default | Description |
|
|
100
|
+
| ------------ | ------- | --------------------------------------- |
|
|
101
|
+
| Max Stories | 24 | Maximum number of stories to display |
|
|
102
|
+
| Time Window | 24h | Only show stories from the last N hours |
|
|
103
|
+
| Min Points | 50 | Minimum points required |
|
|
104
|
+
| Min Comments | 20 | Minimum comments required |
|
|
105
|
+
|
|
106
|
+
### Comment Display
|
|
107
|
+
|
|
108
|
+
| Setting | Default | Description |
|
|
109
|
+
| -------------- | ------- | ------------------------------------------- |
|
|
110
|
+
| Root Comments | 12 | Maximum root-level comments shown per story |
|
|
111
|
+
| Child Comments | 8 | Maximum replies shown per comment |
|
|
112
|
+
| Nesting Depth | 3 | Maximum levels of nested replies |
|
|
113
|
+
|
|
114
|
+
Settings are stored locally at `~/.config/hn-cli/config.json`.
|
|
115
|
+
|
|
116
|
+
## Design decisions
|
|
117
|
+
|
|
118
|
+
The default settings match my HN reader on my [personal website](https://brianlovin.com/hn). I made these choices so that it's easier for me to keep up with the most interesting stories throughout the day without getting sucked too deep into long comment threads or the flood of new submissions.
|
|
75
119
|
|
|
76
120
|
---
|
|
77
121
|
|
|
@@ -125,43 +169,6 @@ bun run debug highlighted-comment # Test comment highlighting
|
|
|
125
169
|
- `src/types.ts` - TypeScript types for HN data structures
|
|
126
170
|
- `src/test/` - Test suite
|
|
127
171
|
|
|
128
|
-
## Settings
|
|
129
|
-
|
|
130
|
-
Press `s` at any time to open the settings panel. Use `j`/`k` to navigate, `←`/`→` or `Enter` to adjust values, and `r` to reset all settings to defaults.
|
|
131
|
-
|
|
132
|
-
### AI Provider
|
|
133
|
-
|
|
134
|
-
- Switch between Anthropic and OpenAI
|
|
135
|
-
- Change the model (Claude Sonnet/Haiku, GPT-4o/4o-mini)
|
|
136
|
-
- Add or clear API keys
|
|
137
|
-
|
|
138
|
-
### Story Filtering
|
|
139
|
-
|
|
140
|
-
These settings control which stories appear in your feed:
|
|
141
|
-
|
|
142
|
-
| Setting | Default | Description |
|
|
143
|
-
| ------------ | ------- | ------------------------------------------ |
|
|
144
|
-
| Max Stories | 24 | Maximum number of stories to display |
|
|
145
|
-
| Time Window | 24h | Only show stories from the last N hours |
|
|
146
|
-
| Min Points | 50 | Minimum upvotes required (OR min comments) |
|
|
147
|
-
| Min Comments | 20 | Minimum comments required (OR min points) |
|
|
148
|
-
|
|
149
|
-
### Comment Display
|
|
150
|
-
|
|
151
|
-
| Setting | Default | Description |
|
|
152
|
-
| -------------- | ------- | ------------------------------------------- |
|
|
153
|
-
| Root Comments | 12 | Maximum root-level comments shown per story |
|
|
154
|
-
| Child Comments | 8 | Maximum replies shown per comment |
|
|
155
|
-
| Nesting Depth | 3 | Maximum levels of nested replies |
|
|
156
|
-
|
|
157
|
-
Settings are stored locally at `~/.config/hn-cli/config.json`.
|
|
158
|
-
|
|
159
|
-
## Design decisions
|
|
160
|
-
|
|
161
|
-
The default settings match my HN reader on my [personal website](https://brianlovin.com/hn). I made these choices so that it's easier for me to keep up with the most interesting stories throughout the day without getting sucked too deep into long comment threads or the flood of new submissions.
|
|
162
|
-
|
|
163
|
-
All defaults are now customizable via the settings panel (`s`).
|
|
164
|
-
|
|
165
172
|
## Telemetry
|
|
166
173
|
|
|
167
174
|
This CLI collects anonymous usage data to help understand how people use it and what features to improve. No personal information or content is ever collected.
|