Quickstart
Install
Section titled “Install”wacz-validator is a pnpm workspace of seven packages. Build them, then register the binaries globally:
pnpm install --frozen-lockfilepnpm build
pnpm --dir packages/validate-cli add -g . # wacz-validator-validatepnpm --dir packages/tui add -g . # wacz-validatorpnpm --dir packages/daemon add -g . # wacz-validator-daemon (only for a long-running daemon)After that the names work from anywhere, inside the repository or out.
The third line is optional. wacz-validator starts a daemon by itself, so you only
need wacz-validator-daemon on PATH to run one that outlives a single session — a
dependency’s binary is not linked globally, so installing the TUI alone does not
give you that name.
Validate one archive
Section titled “Validate one archive”wacz-validator-validate samples/wikipedia.waczThat is the non-interactive path: it prints a report and exits with a code you can branch on in CI.
The same command validates an archive on an S3-compatible store, not just a local file. For a WACZ in the bundled SeaweedFS, point the AWS SDK’s default chain at it:
export AWS_ENDPOINT_URL_S3=http://seaweedfs.crawler-storage:8333export AWS_REGION=us-east-1export AWS_ACCESS_KEY_ID=wacz-validator AWS_SECRET_ACCESS_KEY=wacz-validator
wacz-validator-validate --s3-force-path-style s3://wacz-validator/wikipedia.wacz--s3-force-path-style is needed for stores that only answer path-style
addressing, such as SeaweedFS and MinIO (WACZ_VALIDATOR_S3_FORCE_PATH_STYLE=true
does the same). Apart from source becoming
{ "kind": "s3", "uri": "s3://…" }, the report is the same as for a local
file.
Starting the store and uploading an archive to it is covered in Container.
Pass a URL
Section titled “Pass a URL”To validate without holding any keys, pass the URL itself. A signed URL (an S3 presigned URL, say) is fine too — its query never reaches the report.
wacz-validator-validate "https://example.com/archives/wikipedia.wacz"It reads by range GET: only the ZIP central directory and the entries the
rules need, so nothing downloads the whole file. It does not use HEAD — a
presigned URL’s signature is made for GET, and HEAD comes back 403. The total
size is read from the Content-Range of the first range GET.
The report’s source becomes { "kind": "http", "url": "https://…" } — with
the query stripped.
For an interactive read of the same report, use the TUI:
wacz-validator samples/wikipedia.waczwacz-validator starts wacz-validator-daemon as a child process and talks to it over
WebSocket, so nothing above involves a port.
To attach to a daemon that outlives the session instead, start one on a port you choose:
wacz-validator-daemon --port 7333 &It prints the URL it is listening on:
wacz-validator-daemon ws://127.0.0.1:7333Pass that URL through:
wacz-validator --server ws://127.0.0.1:7333 samples/wikipedia.waczThe same daemon answers over plain HTTP too — the same handlers, one route each:
POST /validate, and windows onto an archive’s contents (POST /lines, /line,
/records, /record, and /record/body for the bytes of a raster image). Every
request carries the archive’s URI, so the daemon keeps nothing between calls. In the
TUI, tab switches to the layout, enter opens a file (lines) or a WARC (records),
and enter again opens one line split into fields, or one record.
Choose how strict to be
Section titled “Choose how strict to be”The default profile is spec. An archive that exits 0 under it is expected to
replay correctly in ReplayWeb.page.
wacz-validator-validate --profile browserhive samples/wikipedia.wacz # stricterwacz-validator-validate --profile browserhive@2.1.0 samples/wikipedia.wacz # pin the producer versionwacz-validator-validate --profile lenient samples/wikipedia.wacz # triage modeProfiles only re-grade producer-specific and stylistic rules; they never suppress a check the spec requires. See Profiles.
Machine-readable output
Section titled “Machine-readable output”wacz-validator-validate always writes JSON to stdout; there is no flag to switch.
wacz-validator-validate samples/wikipedia.wacz | jq '.summary'The shape is stable and documented in JSON report.