A terminal-first RSS aggregator built in Go.
Gator lets you subscribe to RSS feeds, aggregate posts into PostgreSQL, browse articles from the command line, search content, manage subscriptions, and read posts through an interactive TUI.
Originally built as part of the Boot.dev's curriculum and now actively extended with additional features, architectural improvements, and experiments in Go CLI development.
- User management and login system
- RSS feed subscription management
- Background feed aggregation
- Concurrent feed fetching
- Follow and unfollow feeds
- Browse posts from followed feeds
- Interactive terminal UI (TUI)
- Search posts by keyword
- Like and unlike posts
- View liked posts
- Pagination, filtering, and sorting support
- PostgreSQL-backed persistence
- Go 1.22+
- PostgreSQL 14+
go install github.com/danielmiranda22/gator@latestVerify the installation:
gatorCreate a configuration file at:
~/.gatorconfig.jsonExample:
{
"db_url": "postgres://username:password@localhost:5432/gator?sslmode=disable"
}For local PostgreSQL development,
sslmode=disableis typically required.
Create a PostgreSQL database:
CREATE DATABASE gator;Run the migrations:
goose postgres "postgres://username:password@localhost:5432/gator?sslmode=disable" upOr apply the SQL migration files manually from:
sql/schema/
gator register john wick
gator login john wickgator addfeed "Hacker News" https://hnrss.org/frontpageFeeds added by a user are automatically followed.
gator follow https://hnrss.org/frontpageRun in a separate terminal:
gator agg 1mFetch feeds every minute using a single worker.
Multiple workers can be used:
gator agg 1m 5This fetches feeds concurrently using 5 workers.
Show the latest posts:
gator browseShow more posts:
gator browse --limit 10Browse older posts first:
gator browse --sort oldestFilter by title:
gator browse --filter golangPaginate results:
gator browse --page 2Combine options:
gator browse --limit 10 --sort oldest --page 3Show help:
gator browse --helpLaunch the terminal UI:
gator browse tuiView liked posts in the TUI:
gator browse liked tuiSearch posts from feeds you follow:
gator search golangLike a post:
gator like <post_id>Remove a like:
gator unlike <post_id>View liked posts:
gator browse likedList all feeds:
gator feedsList followed feeds:
gator followingUnfollow a feed:
gator unfollow <feed_url>List users:
gator usersReset all users:
gator reset| Command | Description |
|---|---|
register <name> |
Create a user |
login <name> |
Log in as a user |
users |
List all users |
reset |
Delete all users |
addfeed <name> <url> |
Add a feed |
feeds |
List all feeds |
follow <url> |
Follow a feed |
following |
List followed feeds |
unfollow <url> |
Unfollow a feed |
agg <duration> [workers] |
Run feed aggregation |
browse |
Browse posts |
browse tui |
Launch TUI |
browse liked |
Show liked posts |
browse liked tui |
Show liked posts in TUI |
search <term> |
Search posts |
like <post_id> |
Like a post |
unlike <post_id> |
Remove a like |
internal/
├── app/
├── commands/
├── config/
├── database/
├── handlers/
├── rss/
├── service/
ui/
├── colors.go
├── render.go
└── tui.go
Potential future improvements:
- OPML import/export
- Feed categories and tags
- Read/unread tracking
- Full-text search improvements
- Saved searches
- Multi-feed filtering
- Web UI companion
- Docker deployment
MIT