Getting Started
WebSketch CLI consumes WebSketch IR captures — structured JSON representations of web page layouts — and lets you render, diff, fingerprint, and bundle them from the terminal.
Installation
Section titled “Installation”pnpm add -g @mcptoolshop/websketchOr run without installing:
npx @mcptoolshop/websketch render-ascii capture.jsonWhat is WebSketch?
Section titled “What is WebSketch?”WebSketch is a system for creating structured, machine-readable representations of web page layouts. Instead of working with screenshots (pixel grids), WebSketch produces an Intermediate Representation (IR) that describes what elements exist on the page, where they are positioned, what role they serve, and what text they contain.
The CLI can:
- Render a capture as ASCII art that fits in a terminal or LLM context window
- Fingerprint a page’s structure into a short hash for change detection
- Diff two captures to produce a ranked list of layout and content changes
- Bundle captures into a single portable file for sharing
Creating captures
Section titled “Creating captures”WebSketch CLI works with capture files created by:
- websketch-extension — Chrome extension for one-click page capture
- @mcptoolshop/websketch-ir — Build captures programmatically in TypeScript
Quick example
Section titled “Quick example”# Validate a capture filewebsketch validate capture.json
# Render as ASCII artwebsketch render-ascii capture.json
# Get a structural fingerprintwebsketch fingerprint capture.json
# Compare two captureswebsketch diff before.json after.json