{"slug": "show-hn-local-hn-brief", "title": "Show HN: Local HN-Brief", "summary": "A developer released HN-Brief, an open-source tool that uses a Cloudflare Worker running every 2 hours to pull the top 20 Hacker News stories from the HN Algolia API, summarize each article and its discussion through an LLM (OpenRouter by default, with Cebras, Nvidia NIM and Xiaomi MiMo as fallbacks), and publish a daily digest as a static site. The Worker commits the generated markdown files to GitHub, triggering a Cloudflare Pages redeploy, and the project ships a Bun-based CLI (v1.0+) with flags for date selection, article-only or digest-only runs, and repair of low-quality stories by HN ID. A separate private pipeline runs once a day in Podman and writes retained JSON, Markdown and LLM traces to a host directory, where agents read latest.json to find the newest briefing.", "body_md": "**AI-powered daily summaries of Hacker News stories and discussions.**\n\nToo busy to scroll through Hacker News every day? HN-Brief automatically fetches the top 20 stories, summarizes each article and its discussion using AI, and generates a cohesive daily digest all hosted as a simple static site.\n\n🔗 **Live site**: [hn-brief.com](https://hn-brief.com)\n\n1. **Fetch** — A Cloudflare Worker runs every 2 hours, pulling the top stories from the[HN Algolia API](https://hn.algolia.com/api) .\n2. **Summarize** — Each story + its comments are sent to an LLM (via[OpenRouter](https://openrouter.ai) by default, with Cebras/Nvidia/Xiaomi as fallbacks).\n3. **Digest** — All summaries are combined into a single, flowing narrative for quick reading.\n4. **Publish** — The Worker commits the markdown files directly to GitHub, triggering a Cloudflare Pages redeploy.\n\n- **Article Mode** : Per-story summaries with article + discussion breakdown\n- **Digest Mode** : All stories summarized into one cohesive narrative\n- **Daily Archive** : Browse summaries from previous days via calendar picker\n- **HN Aesthetic** : Classic Hacker News styling with Verdana font\n- **Zero Framework** : Pure HTML/CSS/JS frontend\n\n- [Bun](https://bun.sh/) (v1.0+)\n- API key for summarization (Cebras, Nvidia NIM, Xiaomi MiMo, OpenRouter, or OpenAI-compatible)\n\n```\n# Clone the repository\ngit clone https://github.com/jnd0/hn-brief.git\ncd hn-brief\n\n# Install dependencies\nbun install\n\n# Copy environment variables\ncp .env.example .env\n# Edit .env with your API keys\n# Serve the static site\nbunx serve .\n```\n\nVisit `http://localhost:3000`\n\n```\n# Generate today's summaries (Article + Digest modes)\nbun run summarize\n\n# Show all CLI options\nbun run summarize -- --help\n```\n\n| Option | Short | Description | \n|---|---|---|\n| `--date <YYYY-MM-DD>` | `-d` | Run for a specific date (default: today) | \n| `--articles` | `-a` | Generate only article summaries | \n| `--digest` | `-g` | Generate only digest summary | \n| `--repair` | `-r` | Repair low-quality stories in an existing article file | \n| `--id <HN_ID>` | - | Repair a specific story ID (repeatable, with `--repair` ) | \n| `--help` | `-h` | Show help message | \n\n```\n# Generate both modes for today\nbun run summarize\n\n# Generate for a specific date\nbun run summarize -- --date 2025-12-25\n\n# Generate only articles\nbun run summarize -- --articles\n\n# Generate only digest for a specific date\nbun run summarize -- -d 2025-12-25 -g\n\n# Auto-repair broken stories for a date\nbun run summarize -- -r -d 2026-02-06\n\n# Repair a specific story by HN ID\nbun run summarize -- -r -d 2026-02-06 --id 46911869\n```\n\nA separate, private pipeline runs once a day in Podman and writes retained JSON, Markdown, and LLM traces to a host directory. Agents read `latest.json` in that directory to find the newest briefing. See [docs/local-data-pipeline.md](https://github.com/5L-Labs/hn-brief/blob/main/docs/local-data-pipeline.md) for setup, scheduling, failure inspection, and pruning. The upstream Cloudflare Worker documentation below still applies.\n\n| Variable | Description | Required | \n|---|---|---|\n| `OPENROUTER_API_KEY` | OpenRouter API key (preferred) | Yes (or one of below) | \n| `OPENROUTER_MODEL` | OpenRouter model override | No | \n| `CEBRAS_API_KEY` | Cebras API key (fallback) | Yes (or one of below) | \n| `CEBRAS_API_URL` | Cebras API URL override | No | \n| `CEBRAS_API_MODEL` | Cebras model (default: `qwen-3-235b-a22b-instruct-2507` ) | No | \n| `NVIDIA_API_KEY` | Nvidia NIM API key (fallback) | Yes (or one of below) | \n| `NVIDIA_MODEL` | Nvidia model override (default: `moonshotai/kimi-k2.5` ) | No | \n| `XIAOMI_API_KEY` | Xiaomi MiMo API key (fallback) | Yes (or one of below) | \n| `XIAOMI_API_URL` | Xiaomi API URL override | No | \n| `XIAOMI_MODEL` | Xiaomi model override (default: `mimo-v2-flash` ) | No | \n| `OPENAI_API_KEY` | OpenAI-compatible API key | Yes (or another key) | \n| `LLM_MODEL` | Legacy model override for OpenRouter/Nvidia/OpenAI-compatible | No | \n| `LLM_API_URL` | Override LLM API URL (OpenRouter/Nvidia/OpenAI-compatible) | No | \n| `LLM_THINKING_FORCE` | Force thinking mode for providers that support it ( `true` /`false` ) | No | \n| `LLM_THINKING` | Alias for `LLM_THINKING_FORCE` | No | \n| `GITHUB_TOKEN` | GitHub PAT for automated commits | For Worker only | \n| `REPO_OWNER` | GitHub username | For Worker only | \n| `REPO_NAME` | Repository name | For Worker only | \n| `MAX_COMMENT_CHARS` | Character budget for comments (default: 15000) | No | \n| `MAX_COMMENTS_PER_ROOT` | Max comments per top-level thread (default: 3) | No | \n\nWhen using Nvidia NIM, article summaries run in Instant mode (temp 0.6) and digest runs in Thinking mode (temp 1.0). Set `LLM_THINKING_FORCE` to force both.\n\n```\nhn-brief/\n├── index.html          # Frontend (Article/Digest toggle)\n├── assets/\n│   ├── style.css       # HN-style CSS\n│   ├── app.js          # Frontend JavaScript\n│   └── favicon.png     # Site favicon\n├── pages/\n│   ├── faq.html        # FAQ page\n│   └── about.html      # About page\n├── scripts/\n│   └── summarizer.ts   # Bun script for local generation\n├── worker/\n│   ├── index.ts        # Cloudflare Worker\n│   └── wrangler.jsonc  # Worker config\n└── summaries/          # Generated summaries (organized by year/month)\n    ├── archive.json    # Index of available dates (see below)\n    └── YYYY/\n        └── MM/\n            ├── DD.md\n            └── DD-digest.md\n```\n\nSee [CONTRIBUTING.md](https://github.com/5L-Labs/hn-brief/blob/main/CONTRIBUTING.md) for guidelines.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-local-hn-brief", "canonical_source": "https://github.com/5L-Labs/hn-brief", "published_at": "2026-11-29 08:55:59+00:00", "updated_at": "2026-11-29 09:14:04.069006+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "developer-tools", "generative-ai"], "entities": ["HN-Brief", "Hacker News", "Cloudflare Workers", "Cloudflare Pages", "OpenRouter", "Cebras", "Nvidia NIM", "Xiaomi MiMo"], "also_reported_by": [], "takeaway": "HN-Brief's Bun CLI supports --date, --articles, --digest and --repair (with repeatable --id) flags, and defaults summarization to OpenRouter with Cebras, Nvidia NIM and Xiaomi MiMo as fallbacks.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-local-hn-brief", "markdown": "https://wpnews.pro/news/show-hn-local-hn-brief.md", "text": "https://wpnews.pro/news/show-hn-local-hn-brief.txt", "jsonld": "https://wpnews.pro/news/show-hn-local-hn-brief.jsonld"}}