ogpk is a simple CLI tool written in Go that fetches OpenGraph data from a given URL. If the optional dependency timg is installed, ogpk can also display the og:image directly in the terminal.
On macOS:
brew tap almonk/ogpk
brew install ogpkOn linux:
- Go to the releases page and download the latest release for your platform.
- Extract the archive and move the executable to a directory in your
PATH(e.g./usr/local/bin) - Make the executable executable, e.g.:
chmod +x /usr/local/bin/ogpkTo fetch OpenGraph data from a website:
ogpk [URL]For example:
ogpk https://example.comTo display the og:image in the terminal (requires timg):
ogpk [URL] --pOutput data as JSON:
ogpk [URL] --jsonClone this repository:
git clone https://github.com/almonk/ogpk.gitNavigate to the cloned directory:
cd ogpkBuild the tool:
go build -o ogpkThis will produce an executable named ogpk in the current directory.
ogpk has an optional dependency on timg, a terminal image viewer. If timg is installed and available in the PATH, ogpk can display the og:image directly in the terminal when the --p flag is used.
To install timg, refer to its official documentation.
