A command-line RSS aggregator built in Go that allows you to manage RSS feeds, follow feeds, and browse posts from your terminal.
Before running Gator, you'll need to have the following installed:
-
Go (version 1.19 or later)
- Download from golang.org
- Verify installation:
go version
-
PostgreSQL
- Download from postgresql.org
- Make sure PostgreSQL is running and accessible
- You'll need a database created for Gator
Install the Gator CLI using Go:
go install github.com/yasseresi/Gator@latestMake sure your $GOPATH/bin (or $GOBIN) is in your $PATH to run the Gator command from anywhere.
- Create a PostgreSQL database for Gator
- Run the database migrations (you may need to use a migration tool like Goose)
Create a configuration file at ~/.gatorconfig.json with the following structure:
{
"db_url": "postgres://username:password@localhost:5432/gator?sslmode=disable",
"current_user_name": ""
}Replace the database URL with your PostgreSQL connection details:
username: Your PostgreSQL usernamepassword: Your PostgreSQL passwordlocalhost:5432: Your PostgreSQL host and portgator: Your database name
The current_user_name field will be automatically managed by the application.
-
register <username>- Register a new userGator register john_doe
-
login <username>- Login as an existing userGator login john_doe
-
users- List all registered users and show the current userGator users
-
reset- Reset the database (removes all users, feeds, and posts)Gator reset
-
addfeed <name> <url>- Add a new RSS feed (requires login)Gator addfeed "Tech News" "https://example.com/feed.xml"
-
feeds- List all available feeds in the systemGator feeds
-
follow <feed_name>- Follow an existing feed (requires login)Gator follow "Tech News" -
following- List all feeds you're currently following (requires login)Gator following
-
unfollow <feed_name>- Unfollow a feed (requires login)Gator unfollow "Tech News"
-
agg <duration>- Run the RSS aggregator to fetch new posts from all feedsGator agg 30s # Fetch every 30 seconds Gator agg 5m # Fetch every 5 minutes Gator agg 1h # Fetch every 1 hour
-
browse [limit]- Browse posts from feeds you follow (requires login)Gator browse # Show 2 posts (default) Gator browse 10 # Show 10 posts
-
Install and setup (see Installation and Configuration sections above)
-
Register a user:
Gator register your_username
-
Add some feeds:
Gator addfeed "Go Blog" "https://go.dev/blog/feed.atom" Gator addfeed "Hacker News" "https://hnrss.org/newest"
-
Follow the feeds:
Gator follow "Go Blog" Gator follow "Hacker News"
-
Run the aggregator to fetch posts:
Gator agg 1m
(This will run continuously. Stop it with Ctrl+C after some posts are fetched)
-
Browse your posts:
Gator browse 5
- Multi-user support: Multiple users can use the same Gator instance
- Feed management: Add, follow, and unfollow RSS feeds
- Automatic aggregation: Continuously fetch new posts from RSS feeds
- Post browsing: View posts with titles, descriptions, URLs, and publication dates
- Duplicate handling: Automatically handles duplicate posts
- Multiple date formats: Supports various RSS date formats
To build from source:
git clone https://github.com/yasseresi/Gator.git
cd Gator
go build
./Gator --helpThe application uses PostgreSQL with the following main tables:
users- User accountsfeeds- RSS feed informationfeed_follows- User-feed relationshipsposts- Individual RSS posts