🟢 Hacker News, but typed
You get: the front page as structured data. Pairs with: your terminal greeting, a Slack webhook, breakfast.
tabstack extract json https://news.ycombinator.com
--schema '{"type":"object","properties":{"stories":{"type":"array","items":{
"type":"object","properties":{"title":{"type":"string"},
"url":{"type":"string"},"points":{"type":"number"}}}}}}'
| jq -r '.stories[:5][] | "(.points)▲ (.title)"' What it does
Extracts the front page into structured JSON matching your schema, then formats the top 5 stories with their point counts. No HTML parsing, no selector maintenance, no dependency on HN’s unofficial API.
Actual output
790▲ Show HN: Homebrew 6.0.0
375▲ MiMo Code is now released and open-source
279▲ Petition to Withdraw Canada's Bill C-22
81▲ Shall we play a game? – LLMs use tactical nukes in 95% of simulations
23▲ Show HN: FablePool – pool money behind a prompt, and Fable builds it in public Why it works
extract json + --schema tells the API what shape you want. It reads the page, reasons about the content, and returns data matching your types. The schema is standard JSON Schema — same format you’d use for API validation.
Make it recurring
# Add to crontab — morning digest at 8am
0 8 * * * tabstack extract json https://news.ycombinator.com
--schema '...' | jq -r '.stories[:10][] | .title'
| mail -s "HN digest" you@example.com Go further
Extend the schema to include comments, author, or domain, then filter by domain to track when a site you care about hits the front page:
tabstack extract json https://news.ycombinator.com
--schema '{"type":"object","properties":{"stories":{"type":"array","items":{
"type":"object","properties":{"title":{"type":"string"},
"url":{"type":"string"},"domain":{"type":"string"},"points":{"type":"number"}}}}}}'
| jq '.stories[] | select(.domain == "yoursite.com")'