gator is a command-line RSS feed aggregator that lets you follow, fetch, and browse RSS feeds directly from your terminal. It supports background aggregation, user logins, and stores posts in a PostgreSQL database for easy viewing later.
- User login & registration
- Add and follow RSS feeds (e.g. TechCrunch, Hacker News)
- Background aggregation loop (
agg) that fetches new posts periodically - Stores posts in PostgreSQL with deduplication by URL
- Browse followed feed posts in the terminal
To run gator, you’ll need:
- Go 1.20 or newer
- PostgreSQL installed and running
Clone the repo and install the CLI:
git clone https://github.com/your-username/gator.git
cd gator
go installCreate a .gatorconfig file in your home directory with the following content:
toml Copy Edit
# ~/.gatorconfig
db_url = "postgres://user:password@localhost:5432/gator?sslmode=disable"
current_user_name = ""
Replace the db_url with your actual PostgreSQL connection string.
gator register yourusername
gator login yourusernamegator addfeed techcrunch https://techcrunch.com/feed/
gator follow https://techcrunch.com/feed/gator agg 30sgator browse # default: show 2 recent posts
gator browse 5 # show 5 recent postsRun commands directly for testing:
go run . addfeed dev https://blog.boot.dev/index.xml
go run . browse 3This project uses goose for schema migrations.
Install goose (if you haven’t already):
go install github.com/pressly/goose/v3/cmd/goose@latestApply migrations:
goose postgres "postgres://user:pass@localhost:5432/gator?sslmode=disable" up.
├── internal/
│ ├── config/ # Config loader
│ ├── database/ # sqlc-generated DB layer
│ └── rss/ # RSS feed fetching
├── sql/
│ ├── queries/ # Config loader
│ ├── schema/ # DB migrations (goose)
├── main.go # CLI entry point
└── README.md