og-checker
v0.0.1
Published
CLI + local web inspector for Open Graph and Twitter metadata validation.
Maintainers
Readme
og-checker
CLI and local web app to validate Open Graph and Twitter metadata for any URL.
Install
pnpm add -D og-checkerOr run without installing:
npx og-checker https://example.comCLI Usage
# plain-text report
og-checker https://example.com
# machine-readable output for CI
og-checker https://example.com --json
# write a visual HTML preview report
og-checker https://example.com --html ./og-report.htmlFlags
--json: print JSON report--timeout <ms>: request timeout (default10000)--no-color: disable ANSI colors--html <file>: write an HTML report with OG/Twitter image previews
Exit codes
0: no blocking OG errors1: request/parsing failure or missing required OG tags
Web App Usage
og-checker-webThen open http://127.0.0.1:4014.
Features:
- Paste many URLs (one per line)
- Load URLs from
sitemap.xml(supports sitemap indexes) - See all pages in a responsive grid
- View OG/Twitter image previews + metadata + warnings/errors
Optional flags:
og-checker-web --host 127.0.0.1 --port 4014 --timeout 10000Local Development
pnpm install
pnpm check -- https://example.com
pnpm webSplit This Folder Into Its Own Repo
From this project root:
mkdir -p ../og-checker
rsync -av --delete tools/og-checker/ ../og-checker/
cd ../og-checker
git init
pnpm installPublish to npm
pnpm pack
pnpm publish --access publicAfter publish, global usage:
npx og-checker https://example.com
npx -p og-checker og-checker-web