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 ogpk
On linux:
PATH (e.g. /usr/local/bin)chmod +x /usr/local/bin/ogpk
To fetch OpenGraph data from a website:
ogpk [URL]
For example:
ogpk https://example.com
To display the og:image in the terminal (requires timg):
ogpk [URL] --p
Output data as JSON:
ogpk [URL] --json
Clone this repository:
git clone https://github.com/almonk/ogpk.git
Navigate to the cloned directory:
cd ogpk
Build the tool:
go build -o ogpk
This will produce an executable named ogpk in the current directory.
timgogpk 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.