This is RSS feed aggregator in Go!
For this CLI tool to work you will have to install GO(obviously..😜)
You will need to install Go(version 1.23+), you can follow this [installation instruction ]
If you’re getting a “command not found” error after following installation, it’s most likely because the directory containing the go
program isn’t in yout PATH
. You need to add the directory to your PATH
by modifying your shell’s configuration file. First, you need to know where the go
command was installed. It might be in:
/usr/local/go/bin
(official installation)
Somewhere else?
You can ensure it exists by attempting to run go using its full filepath. For example, if you think it’s in ~/.local/opt/go/bin, you can run ~/.local/opt/go/bin/go version. If that works, then you just need to add ~/.local/opt/go/bin to your PATH and reload your shell:
# For Linux/WSL
echo 'export PATH=$PATH:$HOME/.local/opt/go/bin' >> ~/.bashrc
# next, reload your shell configuration
source ~/.bashrc
Use can install the gator by using go install
command:
go install github.com/Vikuuu/gator
Gator is a multi-user CLI application. There’s no server(other than the database), so it’s only intended for local user.
~/.gatorconfig.json
in your root directory, and add the following:{
"db_url": "postgres://postgres:postgres@localhost:5432/gator",
}
For this you should have PostgreSQL installed.
[!NOTE] You will have to create the database gator manually. Steps are shown here
sudo apt update
sudo apt install postgresql postgresql-contrib
psql --version
sudo passwd postgres
You can add the postgres
as password so that you won’t forget.
sudo service postgresql start
psql
client
sudo -u postgres psql
You should see a new prompt that looks like this:
postgres=#
gator
database in your postgresql
postgres=# CREATE DATABASE gator;
postgres=# \c gator
postgres=# \dt
gator register <name>
gator login <username>
gator addfeed <feedName> <feedURL>
You can run the command help
to get the information on all the available commands:
gator help