CLI Reference

The waratah binary is the developer orchestrator. Every subcommand below is defined by clap in waratah_bin/src/main.rs; run --help on any of them for the authoritative flag list.

Global

Option Meaning

--build-info

Print compile-time build provenance (workspace semver, git describe --long --tags --dirty, commit, branch, timestamps, rustc/target) and exit. --version prints the bare semver.

waratah start

Start the S/P/O partitions, the string registry, and a compute node as child processes over gRPC. The command daemonizes itself by default: it returns once the server is up (or reports "still starting" when a first-boot index auto-rebuild is running), stdout and stderr are appended to {data_dir}/logs/output.txt and error.txt — the working directory for the memory backend, which also writes its waratah-dev.pid pidfile there — and storage children inherit the same redirected streams. --debug traces go to {data_dir}/logs/debug.txt (./debug.txt for the memory backend), freshly truncated per start. --foreground keeps the process attached to the terminal instead (stderr stays stderr). --query and --no-http imply --foreground: a one-shot query’s results and the REPL need the calling terminal. Stop a daemon with waratah stop.

The pidfile is a start’s claim on its stop handle: a start refuses to run when the pidfile already names a live cluster (the file would otherwise be overwritten and the running cluster left unstoppable), while a stale pidfile from a crashed run — a dead pid — is overwritten normally. On exit a run removes the pidfile only when it still names itself.

Option Meaning

--config PATH

Five-process address table (TOML) at an explicit path. Without it, {config-dir}/cluster.toml is used when present, otherwise the 127.0.0.1:7001-7005 defaults.

--bin-dir DIR

Directory holding waratah-partition / waratah-registry; defaults to this binary’s directory.

--foreground

Stay attached to this terminal (the historical behavior). Without it the cluster daemonizes: the command returns after reporting the pid, URLs, and log paths.

--config-dir PATH

Directory where cluster.toml, notebooks.toml, and later other config files are looked up. Defaults to the platform search path — Linux ~/.config/waratah then /etc/waratah; macOS ~/Library/Application Support/waratah then /Library/Application Support/waratah; Windows %APPDATA%\waratah then %PROGRAMDATA%\waratah. Given explicitly, ONLY that directory is searched.

--data-dir DIR

Persist partitions to RocksDB under DIR/main/{s,p,o,registry} instead of memory. Daemon log files go to DIR/logs/; the pidfile to DIR/waratah-dev.pid.

--load-demo

Load the weather/city demo dataset before serving queries.

--query SPARQL

Run one SPARQL query and exit instead of starting the HTTP server. Implies --foreground.

--http ADDR

RDF4J HTTP listen address (default 127.0.0.1:8080).

--no-http

Skip the HTTP server and use the stdin SPARQL REPL instead. Implies --foreground.

--debug

Log SPARQL query text, timings, and client-facing errors: stderr in foreground mode; when daemonized, {data_dir}/logs/debug.txt (or ./debug.txt for the memory backend).

--seat-by-total-cost

Seat inner-join arms and choose the inner-join association by total seating cost instead of the default driver_cost rule (the join-cost comparator promoted to a decision). Divergent seats log as join-seat-totals, and the association’s two-start choice as join-seat-assoc, at debug level.

--force-semi

Benchmark switch: stamp Semi on joins whose only refusal is the per-page cost verdict. Semantic semi refusals (right payload, row multiplicity, plain COUNT(*), key binding, specialized scan, multi-key) are unchanged. Off by default; see the optimization catalog, section 2.15.

--describe-mode star|cbd|scbd

SPARQL DESCRIBE algorithm (default star).

--default-union

SPARQL default graph is the union of all named and unnamed graphs.

--strict-sparql

Strict SPARQL 1.1 adherence: gate Waratah’s documented deviations behind spec-strict behavior (currently gYear-family ordering comparisons become type errors).

--ingest-dir DIR

Staging parent for HTTP ingest. Files live in {ingest_dir}/{repository}; repository is main. Defaults to {data_dir}/ingest, otherwise ./ingest.

--spill-dir DIR

Root for query spill files (external ORDER BY runs, Grace join partitions, parked pages, DISTINCT seen-sets). Defaults to {data_dir}/spill; without a data dir, the system temp dir is used — RAM-backed (tmpfs) on many systems, with a startup warning.

--with-notebooks

Enable the Jupyter notebook service: a jupyter-server sidecar (one per compute) reverse-proxied at /jupyter, WebSocket kernel channels included. Requires the HTTP server.

--with-text

Enable the text plugin: FILTER text:query, indexed STRSTARTS / STRENDS / anchored REGEX, and the Tantivy index the O partition maintains. Also settable as enabled = true in {config-dir}/text.toml. Off by default. The first start with it enabled builds the index before serving. Also on waratah import (the loader then maintains the index and stamps its epoch) and waratah standalone.

--notebooks-dir DIR

Contents root for the notebook service. Defaults to {data_dir}/notebooks, otherwise ./notebooks.

--notebooks-python PATH

Python interpreter for the sidecar; skips auto-provisioning. Default: a pinned venv auto-created at {data_dir}/notebooks-venv on first start.

--notebooks-bind ADDR

Loopback bind for the notebook sidecar (default 127.0.0.1:0, engine-assigned). Also settable as bind in {config-dir}/notebooks.toml.

--notebooks-token TOKEN

Jupyter auth token (default: minted at startup).

--notebooks-cull-idle-secs N

Kernel idle culling timeout in seconds (default 3600). Also settable as cull_idle_secs in {config-dir}/notebooks.toml.

--geo-min-level / --geo-max-level / --geo-max-cells

GeoSPARQL S2 covering parameters, defaults 0 / 24 / 40 (process-local). Changing them requires waratah geo rebuild-index afterward — see the cluster-uniform caveat in the GeoSPARQL section of ARCH.md.

--geo-densify-step DEG

Planar edge densification step in degrees, default 0.1: polygon and line-string edges longer than this are subdivided before the S2 covering so the geospatial index covers the planar (WKT) region too. 0 or false disables densification; values below 0.0001 are rejected (finer than the covering’s cell resolution buys no accuracy, only covering time). Same rebuild requirement as the other geo flags.

waratah standalone

Open S/P/O and the registry in this process — no child processes, no gRPC — and run compute in the foreground. Takes the same flags as waratah start except the spawn-only ones: no --config (there is nothing to address), no --bin-dir (nothing to locate), and no --foreground / daemonization (always foreground). The pidfile is written when --data-dir is given. See the table above for the shared flag meanings.

waratah stop

Stop a running cluster (SIGTERM via its pidfile). Storage children and the notebook sidecar go with it.

Option Meaning

--data-dir DIR

Data dir of the cluster to stop; the pidfile is {data_dir}/waratah-dev.pid. Optional: without it the working directory’s waratah-dev.pid is used — where a memory-backend daemon writes its pidfile.

waratah import

Stream an RDF file into a RocksDB data directory (or a running cluster). Formats: Turtle, TriG, N-Triples, N-Quads, RDF/XML; .gz is fine.

Option Meaning

FILE (positional)

The RDF file to load.

--data-dir DIR

RocksDB directory to write (created if missing; existing data is kept). Required unless --connect.

--timestamp N

Commit timestamp for every imported quad (default: current unix millis).

--compact

Force a full-range compaction after flush. Online: once at the end. Offline always compacts after load so statistics land in SST properties.

--offline

In-process load: no gRPC. Exclusive with --connect.

--connect

Attach to a running cluster via --config; do not spawn or kill children.

--disable-wal

Skip the write-ahead log for the hexastore and dictionary stores (offline only). The blob index is excluded: its commits are synchronous by design, so this flag never applies to it.

--direct-sst

Ingest via SstFileWriter (offline only; not implemented yet).

--config PATH

Static five-process address table (TOML); defaults to 127.0.0.1:7001-7005.

--bin-dir DIR

Directory holding waratah-partition / waratah-registry; defaults to this binary’s directory.

waratah explain

Print SPARQL parse / Sparopt / planned algebra — no cluster required. This is the offline twin of the HTTP explain endpoint.

Option Meaning

-q, --query SPARQL

The query to optimize (SELECT, ASK, CONSTRUCT, or DESCRIBE).

-f, --format FORMAT

sse (default; parse-only Jena SSE), optimised / optimised-sparql (aliases optimized / optimized-sparql; Sparopt + VALUES-into-UNION), planned / planned-sparql (fully lowered plan), estimate (alias estimates; planned SSE plus row estimates, domains, and broadcast annotations).

-p, --pretty

Pretty-print S-expression and *-sparql output.

--default-union

SPARQL default graph is the union of all named and unnamed graphs.

--seat-by-total-cost

Seat inner-join arms by total seating cost so EXPLAIN shows the seat a server started with --seat-by-total-cost would run.

waratah catalog rebuild

Scan SPOG and write Present for each distinct named graph (skipping the default graph) into the S-axis named-graph catalog.

Option Meaning

--data-dir DIR

RocksDB data directory ({data_dir}/main/s is opened).

waratah geo rebuild-index

Wipe and recompute every O-axis S2 posting under the CURRENT coverer config. Required after changing --geo-min-level / --geo-max-level / --geo-max-cells / --geo-densify-step, or after a covering algorithm change. The O partition never runs the coverer; this is the compute/offline side.

Option Meaning

--data-dir DIR

RocksDB data directory ({data_dir}/main/o is opened; blobs come from {data_dir}/main/blobs).

waratah geo census

Read-only per-level census of the O-axis S2 posting store: posting counts by cell level, envelope coverage, and the statistics histogram’s incidence mass. Use it to diagnose geo window-estimate over-counting — it is the tool that exposed the level-8 coarse-side histogram move.

Option Meaning

--data-dir DIR

RocksDB data directory ({data_dir}/main/o is opened read-only).

--window WKT

Estimate + drain-truth decomposition for one query window given as WKT (the same literal form a geof:* conjunct carries). Builds the postings-exact histogram from the live postings, runs the same estimate ladder the planner runs over the window’s merged L11 ranges, and reports it next to what the storage scan would actually fetch (candidate postings, distinct candidate terms, postings-per-term, the estimate/candidates factor). The report is ground truth: the engine’s live estimate instead reads the rolled-up (wire-trimmed) profile histogram, so compare the printed total against EXPLAIN to attribute the gap.

--geo-min-level N
--geo-max-level N
--geo-max-cells N
--geo-densify-step DEG

Coverer configuration for the window’s query covering (defaults match waratah start; the densify step accepts the same spellings — 0 or false disables). Only meaningful with --window; the postings themselves were built by the config live at ingest.

waratah temporal rebuild-index

Wipe and recompute every O-axis temporal posting (partition-side walk). Required after changing the temporal covering parameters, and the manual path for what compute startup auto-triggers when the epoch is missing.

Option Meaning

--data-dir DIR

RocksDB data directory ({data_dir}/main/o is opened in-process).

--temporal-min-level N

Minimum covering node level (temporal index). Default 0.

--temporal-max-level N

Maximum covering node level (temporal index; instants bypass the covering entirely). Default 110.

--temporal-max-nodes N

Maximum nodes per interval (temporal index). Default 32.

waratah text rebuild-index

Wipe and rebuild the O-axis text index from the hexastore (offline). The manual path for what compute startup auto-builds when the index epoch is missing, and the required path after changing the analyzer or seed length in {config-dir}/text.toml. The Tantivy index directory is single-writer: stop the cluster first.

--data-dir DIR

RocksDB data directory ({data_dir}/main/o and its registry are opened in-process).

--config-dir DIR

Configuration directory for text.toml (analyzer, seed length). Without it the defaults apply.

waratah text status

Print the text index sidecar’s stored settings (analyzer, seed length, fingerprint), its trust state (epoch stamped, fingerprint matching the resolved config), and the live document count.

--data-dir DIR

RocksDB data directory ({data_dir}/main/o-text-index is read).

--config-dir DIR

Configuration directory for text.toml.

waratah compact

Flush and compact the targets of an existing RocksDB data directory (offline).

Option Meaning

--data-dir DIR

RocksDB data directory ({data_dir}/main/{s,p,o,registry} are opened; the registry target also opens {data_dir}/main/blobs, flushing and compacting its blob index after the dictionary).

TARGETS…

Targets to compact (s, p, o, registry — the last covers the dictionary plus the blob index; case-insensitive). Default: all of them, sequentially.

waratah blob verify

Integrity scan of the registry’s content-addressed blob store at {data_dir}/main/blobs (waratah_bin/src/blob.rs). Checks that every inline index payload hashes to its own key, that every segment record’s declared length, CRC32 and payload identity match its locator, and counts segment records no locator references (orphan census). The store is opened through the same recovery path a registry open runs first — this is not a raw read-only pass. Exits non-zero when any problem is found; orphan records alone are reported as information.

Option Meaning

--data-dir DIR

RocksDB data directory whose {data_dir}/main/blobs is scanned. A data dir with no blob store prints "nothing to verify" and exits 0.

Runtime environment variables

These are read by the engine processes at startup. The first group is operator-facing; the rest are internal tuning knobs whose authoritative documentation lives beside their definition in the crate sources.

Variable Effect

WARATAH_STORAGE_BACKEND

Selects the storage backend at runtime: unset / rocksdb (default) → RocksDB; memory → in-memory backend (fast tests, no disk).

WARATAH_DOMAIN_SEEK_UNION

Removed knob: setting it warns once and is ignored. The seek-union mode (one shared iterator across all constraints) was removed after measurement showed it indistinguishable from legacy — domain scans are legacy or WARATAH_DOMAIN_WALKS=K parallel, both walking with per-constraint bounded iterators.

WARATAH_DOMAIN_WALKS

Domain scans: parallel worker count. On by default at the storage worker pool’s width in slices; = 0 or = 1 runs legacy — the same confined per-constraint walk on the calling thread; = <K> (K ≥ 2, also bounded by the pool width and by 64) sets the slice count. Both modes emit in key order.

WARATAH_COUNT_WALKS

Pattern counts: parallel worker slices over the count walk. On by default at the storage worker pool’s width in slices (the pool is unpinned by default; WARATAH_SERVE_CORES=<list> narrows it to the list length). = 0 or = 1 forces serial; = <K> (K ≥ 2) sets the slice count (also bounded by the pool width and by 64).

WARATAH_COUNT_WALKS_DEBUG

Pattern counts: print the per-slice row occupancy to stderr on parallel counts (benchmark discipline; see WARATAH_COUNT_WALKS).

WARATAH_REGISTRY_WALKS

Registry seek walk: parallel worker slice count. On by default at min(8, the storage worker pool’s width) slices — the cap reflects a point-lookup walk, which stops scaling before the pool width does; = 0 or = 1 forces the serial walk; = <K> (K ≥ 2, also bounded by the pool width and by 64) sets the slice count.

WARATAH_STORAGE_POOL_THREADS

Width of the storage worker pool — the fixed-resident threads that serve parallel storage walks (registry seek walk, domain scans). Default: the WARATAH_SERVE_CORES set length when the process is pinned, otherwise available_parallelism().

WARATAH_BLOB_CACHE_BYTES

Overrides the blob cache byte budget.

WARATAH_SERVE_CORES

Serve-core affinity. Unset or off/false (case-insensitive): no pinning anywhere — the stock scheduler for every command, serving and batch alike (0.4.0 benchmarking measured static pinning slower and spikier than the scheduler; see ARCH.md’s serve-core entry). A core list (e.g. = 4-7) opts in: runtime threads pin 1:1 onto it, storage-worker pool threads pin round-robin over it, and start confines each storage child to the same set (waratah_bin/src/affinity.rs).

WARATAH_SST_FILTER

Per-SST prefix bloom filters on the spog / sopg / tsg column families. = 1 builds the filter blocks at flush/compaction AND loads and consults them at open — arming is a property of the opening process: a gate-off server on an armed store neither benefits nor truncates. Off by default (armed serving accelerated wide-constraint domain scans −26.8% / −15.7% on yago, but cold start +12.6 s and RSS +2 GB at 76 GB). Safe to arm: the head walks carry total_order_seek and the domain walks are prefix-aligned, both pinned by armed regression tests. Strip an armed store with a gate-off waratah compact.

Internal tuning knobs (see the storage, partition, and compute crate sources for semantics and defaults): WARATAH_PIN_INDEX, WARATAH_WARM_CACHE, WARATAH_SCAN_ASYNC_IO, WARATAH_ITERATOR_READAHEAD_SIZE, WARATAH_RESOLVE_MULTIGET, WARATAH_RESOLVE_CACHE_ENTRIES, WARATAH_MEMTABLE_BATCH_LOOKUP, WARATAH_SCAN_DISPATCH_ROW_THRESHOLD (row-estimate ceiling, default 1024, 0 disables, at or below which a scan runs on the calling thread instead of a blocking-pool worker — unary round trips, streaming drains, counts, and predicate-keyed domain scans alike — from exact stats), WARATAH_GRACE_SERIAL (1/true forces the Grace bucket loop down the serial path for A/B batteries; parallel is the default), and the console-artifact overrides WARATAH_CONSOLE_DIST, WARATAH_CONSOLE_STUB, WARATAH_CONSOLE_MISSING_SW.