Skip to content
quarry Documentation
Login

Documentation

Summary

quarry ui [PATH] serves the one zit repository at PATH (default: the checkout the command runs in) on a loopback port, with no OLTP database, no accounts, no tokens, and derived data in a throwaway directory, and opens a browser tab on the timeline. zit ui is a launcher for it: find the binary, run it, say what to install when it is absent. Together they give a person what fossil ui gives — timeline with a graph, side-by-side diffs, file browser, annotate, branches, wiki, tickets, forum — from one command, on one machine, for one repository.

Everything the page shows is derived from the store through zit's read verbs exactly as quarry serve derives it. Local mode is a profile of serve, not a second server: the same ingest, the same renderers, the same ops layer, with the fleet, the OLTP, and the auth gates switched off at the door.

Motivation

RFC 0001 chose a separate binary over browser pages inside zit so the forge could scale and change without zit. The cost of that choice, unpaid until now, is the single-developer case: fossil ui is the largest single reason people name for staying with Fossil, and it costs them nothing — no data directory, no user table, no port to pick. zit's answer has been "run quarry", which means quarry serve, which means a data directory, an OLTP file, and a listen address. Most of that is fleet furniture. A person looking at their own repository needs none of it.

zit#165 weighed three shapes and rejected two: a browser inside zit serve (a second timeline renderer, forever slightly behind) and static renders alone (diff --by and timeline -F html shipped; they cover the two pages opened most and no more). This RFC is the third: the real pages, from the real renderer, with the configuration removed rather than hidden.

Guide-level explanation

$ zit ui
quarry ui: serving /Users/me/proj on http://127.0.0.1:52173/ (Ctrl-C stops)

The browser opens on the timeline. Every page quarry serve renders for a repository renders here. Writes that need an author — a wiki edit, a new ticket, a forum post — are made as the local operator ($USER, or zit's user setting when set) with no password asked, because the only person who can reach a loopback port is the one who started the process.

When quarry is not installed:

$ zit ui
zit ui: quarry is not on PATH; the browser view is quarry's single-repository local mode
install it from https://github.com/danmestas/quarry, or set ZIT_QUARRY to the binary
meanwhile: 'zit diff --by' renders a side-by-side page and 'zit timeline -F html' renders the timeline

Stopping the process removes everything it made: the derived data lived under the system temporary directory and is deleted on exit. Starting again re-derives it from the store. That is the whole recovery story, and it is the same story quarry serve has — only the directory is shorter-lived.

Reference-level explanation

1. quarry ui

quarry ui [PATH] [--addr ADDR] [--data DIR] [--no-open] [--user NAME]

Everything else in serve's flag set is off and unavailable: no --nats (embedded only), no --notify, no --dagnats (CI status still renders when the store carries verdict tags per RFC 0009; nothing is triggered), no mirrors, no bulk operations, no analytics store, no error log file, no --tracker, no --forum-hook.

2. What is switched off, and how

3. zit ui (the launcher, zit#165)

zit ui [ARGS...] runs quarry ui <checkout root> ARGS... with stdio inherited and returns quarry's exit status. The binary is $ZIT_QUARRY when set, else quarry on PATH. When it cannot be started the verb prints the three-line explanation above and exits 1; when it runs, zit adds nothing — every line on the terminal is quarry's.

zit keeps no knowledge of quarry's flags: ARGS pass through verbatim, so a new quarry flag never needs a zit release. The only zit-side contract is the positional PATH and the exit status.

4. Disposability (§11), applied

Local mode's data directory is the §11 test's step 2 (rm -rf the data directory) performed on every exit. The mode therefore adds one row to the §11 corpus run: serve a fixture store in local mode, snapshot every page class, restart, snapshot again, semantically diff. Nothing local mode renders may come from anywhere but the store and the derived directory.

Drawbacks

Rationale and alternatives

Prior art

Unresolved questions

Future possibilities