Gator is a command-line tool written in Go that allows you to interact with feeds and follow them using a Postgres database.
Before you begin, ensure you have the following installed:
- Go (version 1.20+ recommended)
- PostgreSQL
Gator requires a configuration file. Create a .gatorconfig.json file in your home directory with the following structure:
{ "db_url": "postgres://username:password@localhost:5432/dbname?sslmode=disable" }
register <username>– Register a new user.login <username>– Log in as an existing user.reset– Reset the database (dangerous, use with caution).users– List all registered users.agg <time_between_reqs>– Run the feed aggregator to pull in the latest posts.addfeed <title> <url>– Add a new feed by title and URL (requires login).feeds– List all feeds in the system.follow <url>– Follow a feed by its url (requires login).following– List feeds the logged-in user is following.unfollow <url>– Unfollow a feed by its Url (requires login).browse [number of post u see]– Browse recent posts from the feeds you follow (requires login).
go build -o gator ./gator