An RSS feed aggregator for your terminal
Quick Start β’ Features β’ Commands β’ Configuration
$ gator register alice
User `alice` registered successfully
$ gator addfeed "Go Blog" "https://go.dev/blog/feed.atom"
FEED ADDED and FOLLOWED
$ gator browse 3
Found 3 posts for user alice:
Title: Go 1.22 Released
URL: https://go.dev/blog/go1.22
Published: 2024-02-06
---
Prerequisites: Go 1.21+ and PostgreSQL
# Create database
sudo -u postgres createdb gator
# Install Goose & run migrations
go install github.com/pressly/goose/v3/cmd/goose@latest
git clone https://github.com/ifeanyibatman/Gator.git && cd Gator
goose -dir sql/schema postgres "postgres://postgres:postgres@localhost:5432/gator" upcat > ~/.gatorconfig.json << 'EOF'
{
"db_url": "postgres://postgres:postgres@localhost:5432/gator?sslmode=disable"
}
EOF
β οΈ Edit the connection string if your PostgreSQL username/password differs frompostgres:postgres
go install github.com/ifeanyibatman/gator@latest
gator register yourname
gator addfeed "Hacker News" "https://hnrss.org/frontpage"
gator agg 5m & # Start aggregating in background
gator browse 10 # View posts| Feature | Description |
|---|---|
| π‘ Multi-Feed Tracking | Follow unlimited RSS/Atom feeds |
| π Background Aggregation | Auto-fetch posts at configurable intervals |
| π₯ Multi-User | Shared installation with per-user follows |
| π Browse | View latest posts with optional verbose mode |
| β‘ Lightweight | Single binary, minimal dependencies |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLI (main.go) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Commands: register β login β addfeed β follow β browse β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
ββββββββββββββββ΄βββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Config File β β PostgreSQL β
β ~/.gatorconfig β β (gator db) β
βββββββββββββββββββ βββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
β users βββββββββΊβ feeds βββββββββΊβ posts β
ββββββββββββ ββββββββββββ ββββββββββββ
β β
ββββββββββ¬ββββββββββββ
βΌ
βββββββββββββββββββ
β feed_follows β
βββββββββββββββββββ
| Command | Usage | Description |
|---|---|---|
register |
gator register <name> |
Create new user & log in |
login |
gator login <name> |
Switch to existing user |
users |
gator users |
List all users (β = current) |
| Command | Usage | Description |
|---|---|---|
addfeed |
gator addfeed "<name>" "<url>" |
Add & auto-follow feed |
feeds |
gator feeds |
List all available feeds |
follow |
gator follow "<url>" |
Follow existing feed |
following |
gator following |
List your followed feeds |
unfollow |
gator unfollow "<url>" |
Stop following feed |
| Command | Usage | Description |
|---|---|---|
agg |
gator agg <interval> |
Fetch feeds continuously (e.g., 30s, 5m, 1h) |
browse |
gator browse [limit] [--verbose] |
View latest posts (default: 2) |
| Command | Usage | Description |
|---|---|---|
reset |
gator reset |
Config file: ~/.gatorconfig.json
{
"db_url": "postgres://user:pass@localhost:5432/gator?sslmode=disable",
"current_user_name": "alice"
}postgres://USERNAME:PASSWORD@HOST:PORT/DATABASE?sslmode=disable
ββββββ¬ββββββββββ¬ββββ βββ¬βββββ¬βββββββ¬ββββ
β β β β βββ Your database name
β β β βββ Default: 5432
β β βββ Default: localhost
β βββ Your PostgreSQL password
βββ Your PostgreSQL username
Common connection strings:
# Default postgres user (no password)
postgres://postgres:@localhost:5432/gator?sslmode=disable
# With password
postgres://postgres:mypassword@localhost:5432/gator?sslmode=disable
# Custom user
postgres://gatoruser:secretpass@localhost:5432/gator?sslmode=disableβ "connection refused" error
PostgreSQL isn't running. Start it:
sudo systemctl start postgresqlβ "password authentication failed"
Wrong credentials in your connection string. Verify your PostgreSQL password:
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'newpassword';"Then update ~/.gatorconfig.json.
β "relation does not exist"
Migrations haven't run. Run them:
goose -dir sql/schema postgres "YOUR_CONNECTION_STRING" upβ "no such file: .gatorconfig.json"
Create the config file:
echo '{"db_url": "postgres://postgres:@localhost:5432/gator?sslmode=disable"}' > ~/.gatorconfig.json# Clone
git clone https://github.com/ifeanyibatman/Gator.git
cd Gator
# Install dependencies
go mod download
# Run locally
go run . register testuser
# Build
go build -o gator .MIT Β© ifeanyiBatman
Built with β€οΈ and Go