https://github.com/simonw/llm-hacker-news
LLM plugin for pulling content from Hacker News
https://github.com/simonw/llm-hacker-news
Last synced: 2 months ago
JSON representation
LLM plugin for pulling content from Hacker News
- Host: GitHub
- URL: https://github.com/simonw/llm-hacker-news
- Owner: simonw
- License: apache-2.0
- Created: 2025-04-07T23:54:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-05T17:10:45.000Z (about 1 year ago)
- Last Synced: 2025-12-15T07:26:23.825Z (6 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 122
- Watchers: 1
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llm-hacker-news
[](https://pypi.org/project/llm-hacker-news/)
[](https://github.com/simonw/llm-hacker-news/releases)
[](https://github.com/simonw/llm-hacker-news/actions/workflows/test.yml)
[](https://github.com/simonw/llm-hacker-news/blob/main/LICENSE)
LLM plugin for pulling content from Hacker News
For background on how this works:
- [Long context support in LLM 0.24 using fragments and template plugins](https://simonwillison.net/2025/Apr/7/long-context-llm/)
- [Blog post announcing llm-hacker-news](https://simonwillison.net/2025/Apr/8/llm-hacker-news/)
## Installation
Install this plugin in the same environment as [LLM](https://llm.datasette.io/).
```bash
llm install llm-hacker-news
```
## Usage
You can feed a full conversation thread from [Hacker News](https://news.ycombinator.com/) into LLM using the `hn:` [fragment](https://llm.datasette.io/en/stable/fragments.html) with the ID of the conversation. For example:
```bash
llm -f hn:43615912 'summary with illustrative direct quotes'
```
Item IDs can be found in the URL of the conversation thread.
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd llm-hacker-news
python -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
python -m pytest
```