Commands
validate
Section titled “validate”Check that a capture file conforms to the WebSketch IR schema.
websketch validate capture.jsonReturns exit code 0 on success, 1 on validation failure.
render-ascii
Section titled “render-ascii”Render a capture to ASCII art — an LLM-readable box-drawing layout.
# Default 80x24 gridwebsketch render-ascii capture.json
# LLM-optimized format with metadata and legendwebsketch render-ascii --llm capture.json
# Custom dimensionswebsketch render-ascii --width 120 --height 40 capture.json
# Minimal structure-only viewwebsketch render-ascii --structure capture.jsonThe --llm flag produces metadata-rich output designed for agent consumption, including URL, viewport dimensions, and a legend explaining the shorthand notation.
fingerprint
Section titled “fingerprint”Compute a structural fingerprint for comparison.
# Full fingerprint (includes text)websketch fingerprint capture.json# Output: e33442b6
# Layout-only fingerprint (ignores text changes)websketch fingerprint --layout-only capture.jsonThe layout-only mode is useful for detecting structural shifts while ignoring content updates.
Compare two captures and report changes.
# Human-readable diff reportwebsketch diff before.json after.json
# JSON output for CI pipelineswebsketch diff --json before.json after.json
# Layout-only (ignore text changes)websketch diff --layout-only before.json after.json
# Custom match thresholdwebsketch diff --threshold 0.7 before.json after.jsonChanges are ranked by significance: added, removed, moved, resized, text changed.
bundle
Section titled “bundle”Package one or more captures into a single shareable .ws.json file. When exactly two captures are provided, the bundle automatically includes a diff summary.
websketch bundle capture.json -o bundle.ws.jsonwebsketch bundle before.json after.json -o bundle.ws.json