Skip to content

tinydiffs/gator

Repository files navigation

gator

Boot.dev Guided Project- Blog AggreGator

Gator is a command-line RSS feed aggregator written in Go. It continuously fetches posts from configured feeds, stores them in Postgres, and lets you browse and manage feeds from the terminal.


Prerequisites

To run gator, you must have the following installed:

  • Go (1.21 or newer recommended)
  • PostgreSQL (14 or newer recommended)

Make sure both go and psql are available in your PATH.


Installation

Install the gator CLI using go install:

go install github.com/ppllama/gator@latest

After installation, ensure $GOPATH/bin (or $HOME/go/bin) is in your PATH:

export PATH="$PATH:$HOME/go/bin"

You should now be able to run:

gator

Database Setup

Create a Postgres database for gator:

CREATE DATABASE gator;

Configuration

Gator uses a config file located at:

~/.gatorconfig.json

Example config:

{
  "db_url": "postgres://user:password@localhost:5432/gator?sslmode=disable",
  "current_user": "alice"
}
  • db_url – Postgres connection string
  • current_user – the active gator user

Usage

Create a user

gator register alice

Add a feed

gator addfeed "Hacker News" https://news.ycombinator.com/rss

Follow a feed

gator follow https://news.ycombinator.com/rss

Fetch posts (runs continuously)

gator agg 1h

Browse posts

gator browse 10

Available Commands

  • register
  • login
  • users
  • addfeed
  • feeds
  • follow
  • unfollow
  • following
  • agg
  • browse
  • reset (dangerous- resets the database)

About

Boot.dev Guided Project- Blog AggreGator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages