Gator is a command-line RSS feed aggregator and reader with user management and feed following features. It uses a PostgreSQL database for storage and is written in Go.
- Go (version 1.24+)
- PostgreSQL (running and accessible)
-
Clone the repository:
git clone https://github.com/d-darac/gator.git cd gator -
Install the CLI:
go install ./...This will build and install the
gatorCLI binary to your$GOPATH/bin(make sure this is in your$PATH).
Before running gator, you need a config file specifying your PostgreSQL connection string and current user.
-
Create a config file in your HOME directory (
~/.gatorconfig.json):{ "db_url": "postgres://username:password@localhost:5432/gator_db?sslmode=disable", "current_user_name": "" }- Replace
username,password, andgator_dbwith your actual PostgreSQL credentials and database name. current_user_namevalue will be set when you register a new user.
- Replace
-
Run database migrations
(You can use a tool like goose or run the SQL files insql/schema/manually.)
Run the CLI with:
gator <command> [args...]
-
Register a new user:
gator register alice -
Login as a user:
gator login alice -
Add a new feed:
gator addfeed "Feed Name" "https://example.com/rss" -
Follow an existing feed:
gator follow "https://example.com/rss" -
Aggregate feeds (fetch new posts periodically):
gator agg 10m(Fetches new posts every 10 minutes.)
-
Browse your feed posts:
gator browse 5 -
List all users:
gator users
- You must be logged in to add feeds, follow/unfollow feeds, or browse posts.
- The config file tracks the current user.
- All data is stored in PostgreSQL; make sure your database is running and accessible.