agent-rss

module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: MIT

README

agent-rss

中文文档

CLI RSS tool for AI agents. Subscribe to feeds, fetch RSS/Atom content, and filter by time or keywords.

Installation

npm
npm install -g @atopos31/agent-rss
Go
go install github.com/atopos31/agent-rss/cmd/agent-rss@latest
From Source
git clone https://github.com/atopos31/agent-rss.git
cd agent-rss
go build -o agent-rss ./cmd/agent-rss

Usage

Subscription Management
# Add a feed
agent-rss add hn https://news.ycombinator.com/rss

# List all feeds
agent-rss list

# Get a specific feed
agent-rss get hn

# Update a feed
agent-rss update hn --src https://news.ycombinator.com/rss

# Remove a feed
agent-rss remove hn
Fetching RSS
# Fetch a specific feed
agent-rss fetch --name hn

# Fetch all feeds
agent-rss fetch --all

# Output as JSON array (default is NDJSON)
agent-rss fetch --all --format json
Filtering
# Filter by relative time (past hours/days/minutes)
agent-rss fetch --all --since 1h      # past 1 hour
agent-rss fetch --all --since 2d      # past 2 days
agent-rss fetch --all --since 30m     # past 30 minutes

# Filter by absolute time
agent-rss fetch --all --since 2026-03-12
agent-rss fetch --all --since 2026-03-12T08:00:00+08:00 --until 2026-03-12T18:00:00+08:00

# Filter by title keyword
agent-rss fetch --all --title "AI"

# Filter by content keyword
agent-rss fetch --all --content "machine learning"

# Combine filters
agent-rss fetch --all --since 1d --title "Go" --title "Rust"
Global Options
# Use a custom feeds file
agent-rss --file /path/to/feeds.txt list

Best Practices for AI Agents

Many AI agent environments (like Claude Code, OpenClaw, etc.) have output size limits for bash commands. When fetching RSS feeds with lots of content, the output may be truncated.

Recommended approach: Write output to a file, then use the agent's file reading capability to access the full content.

# Write RSS output to a temporary file
agent-rss fetch --all --since 2026-03-12 > /tmp/rss-output.json

# Then use the agent's Read tool to access the complete content
# The agent can read /tmp/rss-output.json without size limitations

This pattern ensures:

  • No truncation of RSS content
  • Full access to all fetched items
  • Better handling of large feeds

Feeds File Format

Feeds are stored in ~/.config/agent-rss/feeds.txt:

# Comments start with #
hn https://news.ycombinator.com/rss
golang https://blog.golang.org/feed.atom

Output Format

NDJSON (default)
{"name":"hn","src":"https://...","time":"2026-03-12T15:30:00+08:00","title":"...","content":"...","link":"...","id":"..."}
{"name":"hn","src":"https://...","time":"2026-03-12T14:20:00+08:00","title":"...","content":"...","link":"...","id":"..."}
JSON
[
  {"name":"hn","src":"https://...","time":"2026-03-12T15:30:00+08:00","title":"...","content":"...","link":"...","id":"..."},
  {"name":"hn","src":"https://...","time":"2026-03-12T14:20:00+08:00","title":"...","content":"...","link":"...","id":"..."}
]

Find RSS Feeds

Looking for RSS feeds to subscribe? Check out awesome-rsshub-routes for a curated list of RSS feeds across various categories.

License

MIT

Directories

Path Synopsis
cmd
agent-rss command
Command agent-rss is a CLI RSS tool for AI agents.
Command agent-rss is a CLI RSS tool for AI agents.
internal
cli
Package cli provides the command-line interface using urfave/cli/v3.
Package cli provides the command-line interface using urfave/cli/v3.
config
Package config provides configuration and path management.
Package config provides configuration and path management.
filter
Package filter provides time and keyword filtering for RSS items.
Package filter provides time and keyword filtering for RSS items.
output
Package output provides JSON and NDJSON serialization for items.
Package output provides JSON and NDJSON serialization for items.
rss
Package rss provides RSS/Atom feed fetching and parsing.
Package rss provides RSS/Atom feed fetching and parsing.
storage
Package storage provides feed subscription file management.
Package storage provides feed subscription file management.
pkg
model
Package model defines the core data structures for agent-rss.
Package model defines the core data structures for agent-rss.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL