Preview URLs, files, logs, and command output in your terminal.
OpenPreview is a docs browser, API inspector, log triage tool, and diff viewer for the terminal.
Instead of switching between terminal and browser, you can inspect APIs, docs, and output right where you’re already working.
curl -fsSL https://raw.githubusercontent.com/treadiehq/openpreview/main/install.sh | bashThen run:
preview https://opencode.aiCurrent release targets:
- macOS Apple Silicon
- Linux x64
bun install
bun run dev -- https://planetscale.comIf you want a built CLI:
bun run build
bun link
preview https://privateconnect.copreview <url>
preview <file>
preview --cmd gh pr view 123
preview diff before.json after.json
<command> | preview
<command> | preview --follow
preview skill <url>
preview --mode docs <url>
preview --inspect <url>
preview --explain <url>- HTML normally opens in Docs mode.
- Dashboard mode is only used for pages that look like real metrics or status dashboards.
- Aligned CLI output and
.csv/.tsvfiles open in Table mode. - Log output and
.logfiles open in Log mode. - If auto-detection gets it wrong, force the mode with
--mode.
Examples:
preview --mode docs https://resend.com
preview --cmd curl https://api.example.com/users
preview diff https://docs.example.com/v1 https://docs.example.com/v2
preview --mode dashboard ./fixtures/sample-dashboard.html
ps aux | preview
docker logs app | preview
docker logs -f app | preview --followqorEsc: quit/: searchTab: switch panesEnter: follow the selected link or drill into JSONy: copy the current section, row, code block, error group, or linkY: copy the full extracted contentb: go back in docs or JSON navigationo: open the current URL in your browserF: jump to the first error in logssthenk: export a skill bundle when the current content supports iti: inspect fetch and detection details?: show help
preview --cmd gh pr view 123
preview --cmd kubectl get pods -o json
preview --cmd docker logs api
ps aux | preview
docker logs app | preview
docker logs -f app | preview --followUse --cmd when you want Preview to run the command for you. Use pipes when you already have the output in your shell flow.
preview https://docs.example.com
preview diff before.json after.json
preview diff --left-cmd "kubectl get pods -o json" snapshots/pods.json
preview --mode table ./fixtures/sample-table.txt
preview --mode log ./fixtures/sample-log.txt--follow is for live stdin only. It keeps rendering new output and retains the last 10 MB in memory.
Docs mode keeps link history in-app, follows links with caching, and lets you copy the selected code block or link directly. JSON mode supports drill-down with path-aware copy. Log mode collapses repeats, filters by severity, and jumps to the first failure.
preview skill <url>
preview skill <file>
cat notes.md | preview skillSupported content:
- Docs pages
- Markdown
- GitHub PR text
- Table output
- Log output
- Plain text
Each export is saved under ./openpreview-exports/ and includes:
SKILL.mdreferences/source.md
preview update
preview update --checkTry these in order:
preview --mode docs <url>
preview --inspect <url>
preview --explain <url>--inspect opens the in-app debug view. --explain prints a plain-text report with the detected mode, parser, bytes fetched, truncation status, and detection signals.
bun test
bun run build
bun run preview:planetscale
bun run preview:privateconnectManual test fixtures live in fixtures/.