gator

Gator 🐊

This is RSS feed aggregator in Go!

Feature

Installing 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 ]

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

Installing Gator

Use can install the gator by using go install command:

go install github.com/Vikuuu/gator

Config

Gator is a multi-user CLI application. There’s no server(other than the database), so it’s only intended for local user.

{
    "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

Installing PostgreSQL

  1. Linux/WSL(Debian):
    sudo apt update
    sudo apt install postgresql postgresql-contrib
    
  2. Ensure it is installed by running the following command:
    psql --version
    
  3. Update postgres password(Linux only):
    sudo passwd postgres
    

    You can add the postgres as password so that you won’t forget.

  4. Start the Postgres server in the background
    • Linux: sudo service postgresql start
  5. Connect to the server, simply using psql client
    • Linux: sudo -u postgres psql

You should see a new prompt that looks like this:

postgres=#
  1. Now create the gator database in your postgresql
    postgres=# CREATE DATABASE gator;
    
  2. You can move to your database by using:
    postgres=# \c gator
    
  3. Check the table in the gator database.
    postgres=# \dt
    

Using the CLI

You can run the command help to get the information on all the available commands:

gator help