Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

news.sh

A hackable personalized news reader in Bash. It filters RSS feeds based on your interests. Use it as a template for your own news-reading process.

Requirements

You need uv, jq, bat and pandoc installed.

# macOS
brew install uv jq pandoc bat

You also need a Gemini API key, or configure a different LLM supported by Simon Willison's awesome llm tool.

export GEMINI_API_KEY="your-key"

Setup: Create Your Interests Gist

Create a new private gist with a file describing your interests (filename doesn't matter):

I am a recent immigrant to Germany, living in Munich.
I'm interested in:
- Systems programming, Rust, Go
- Apple hardware and macOS internals
- European politics
- Distributed systems
- NOT crypto, NOT AI hype

Copy the Gist ID from the URL: https://gist.github.com/username/<GIST_ID>

Usage

export GIST_ID="your-gist-id"
./news.sh

Or edit the script and hardcode your Gist ID:

GIST_ID="${GIST_ID:-"your_gist_id"}"

Customize feeds

Edit the feeds call at the bottom of the script:

feeds \
    https://hnrss.org/best \
    https://your-favorite-feed.com/rss \
    &

Graceful Degradation

No pandoc? No bat? Remove them from the pipeline in the format() function.

Translation Settings

Non-English entries are auto-wrapped with a translation link. There are two places to customize:

  1. Change the translation service (top of the script)
# Default: Perplexity
TRANSLATION="https://www.perplexity.ai/search/?q=Summarize+the+webpage+in+English:+"

# Google Translate
TRANSLATION="https://translate.google.com/translate?sl=auto&tl=en&u="
  1. Change which languages get translated (jq filter in format())
# Default: translate everything except English
if (.lang == "en") then . else .link = ($prefix + .link) end

# Translate only Chinese and Russian:
if (.lang | IN("zh", "ru")) then .link = ($prefix + .link) else . end
  1. Change translation behavior in the prompt:
Translate all non-English titles into English.
# or
Keep all titles in their original language.

Environment Variables

Variable Default Description
GIST_ID (required) Your interests Gist ID
LLM_MODEL gemini-3-flash-preview Model to use
GEMINI_API_KEY (required) Your Gemini API key
DEBUG (unset) Set to any value to enable debug mode

About

Hackable personal news reader in Bash

Resources

Stars

28 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages