getapex is a simple command-line tool written in Go that extracts the apex domain from a given URL. It supports reading input URLs from standard input and outputs the apex domain, which is the primary registered domain name.
To install getapex, make sure you have Go installed and run:
go install github.com/vitorfhc/getapex@latestgetapex reads URLs from standard input, so you can pipe in a list of URLs or type them in manually:
echo "example.com" | getapexOutput:
example.com
You can also pass multiple URLs from a file:
cat file.txt | getapexOutput:
example.com
domain.com
google.com