Skip to main content
Category: GTM Intelligence · Version: 1.0.0 · Author: OpenDirectory · Compatibility: All targets (claude, codex, opencode, gemini, anti-gravity, openclaw, hermes)
hackernews-intel Monitor Hacker News for keywords. Get a Slack alert every time a new post matches your topics, without duplicates. Run it manually, on a cron schedule, or via GitHub Actions.

Install

What It Does

  • Fetches new posts from HN using the free Algolia search API (no API key needed)
  • Checks each match against a local SQLite cache and never alerts on the same post twice
  • Sends a Slack notification with title, URL, points, and comment count
  • Supports dry-run mode to preview matches without sending alerts
  • Configurable lookback window, minimum points threshold, and comment inclusion

Requirements

No API key needed for Hacker News. The HN Algolia API is free and public.

Setup

1. Set up dependencies

2. Configure environment variables

Edit .env:

3. Create a Slack webhook

  1. Go to https://api.slack.com/apps and create or select your app
  2. Enable “Incoming Webhooks” in the app settings
  3. Add a webhook to your workspace and select the target channel
  4. Copy the webhook URL (starts with https://hooks.slack.com/services/)
  5. Set it as SLACK_WEBHOOK in .env

How to Use

Preview the last 7 days without sending alerts:
Live run:
Schedule via cron (every 4 hours):
Schedule via GitHub Actions:
Add HN_KEYWORDS and SLACK_WEBHOOK as repository secrets.

Slack Alert Format

Each alert looks like:

Options

CLI Flags

GitHub Actions Note

GitHub Actions does not persist files between workflow runs. The SQLite cache resets on each run, and the script re-fetches the last 1 day of posts every time. Posts from the previous run will be alerted again. To fix this, either:
  • Store hn-intel.db in an S3 bucket and download/upload it around the script run
  • Use a self-hosted runner with persistent storage
  • Use a cron job on your own machine instead

Project Structure

License

MIT