CLI reference¶
schemaguru — Automated schema intelligence for data warehouses.
Exit codes: 0 ok · 1 review-class findings (refresh, lint) or a refused path · 2 invalid input · 3 errors or nothing measured.
Global options¶
Given before or after the command.
| Option | Meaning |
|---|---|
--version |
show program's version number and exit |
--url URL |
warehouse URL (or $SCHEMAGURU_URL) |
--store STORE |
store path (default .schemaguru/default.db) |
--config CONFIG |
a schemaguru.config.yaml (else environment) |
--format FORMAT |
output format (json: parseable on stdout; diagnostics go to stderr); one of text, json, markdown; default text |
init¶
write a commented overlay skeleton and config file
| Argument | Meaning |
|---|---|
--dir DIR |
directory to write into (default .) |
--warehouse WAREHOUSE |
warehouse name for the overlay |
--force |
overwrite existing files |
crawl¶
index the catalog (metadata only)
| Argument | Meaning |
|---|---|
--include INCLUDE |
glob to include; repeatable |
--exclude EXCLUDE |
glob to exclude; repeatable |
measure¶
measure tables (default: drain the queue)
| Argument | Meaning |
|---|---|
targets (optional) |
table names or globs |
--all |
measure every live table, hottest first |
--max-bytes MAX_BYTES |
total byte budget for this run |
--max-probes MAX_PROBES |
probe budget for this run |
--max-seconds MAX_SECONDS |
wall-clock budget |
draft¶
draft table meaning with an LLM
| Argument | Meaning |
|---|---|
targets (one or more) |
table names or globs |
--provider PROVIDER |
one of anthropic, openai; default anthropic |
--model MODEL |
model id (default: config llm_model) |
--budget-tokens BUDGET_TOKENS |
token cap for this run |
--no-verify |
skip checking drafted claims |
review¶
walk drafts: y(es) n(o) e(dit) s(kip) q(uit)
| Argument | Meaning |
|---|---|
--table TABLE |
only drafts for this table |
--write-overlay WRITE_OVERLAY |
also append accepted facts here |
accept¶
accept drafts by fact id
| Argument | Meaning |
|---|---|
ids (one or more) |
drafted fact ids |
--write-overlay WRITE_OVERLAY |
also append accepted facts here |
export-drafts¶
write drafts to a reviewable overlay file
| Argument | Meaning |
|---|---|
path (optional) |
default schemaguru/drafts.yaml |
import-dbt¶
import descriptions and tests from a dbt manifest
| Argument | Meaning |
|---|---|
manifest |
path to target/manifest.json |
context¶
print the question-scoped view an agent reads
| Argument | Meaning |
|---|---|
question |
|
--budget-tokens BUDGET_TOKENS |
default 4000 |
--profile PROFILE |
default agent |
search¶
ranked tables for a text query
| Argument | Meaning |
|---|---|
query |
|
-k K |
default 10 |
path¶
measured join routes between two tables (1 if none)
| Argument | Meaning |
|---|---|
a |
|
b |
refresh¶
recrawl, re-measure, classify changes (exit code = report)
| Argument | Meaning |
|---|---|
--label LABEL |
snapshot label |
report¶
summarise the store: tables, facts, spend, feedback
No arguments besides the global options.
lint¶
load overlays and report problems (exit 1 on findings)
| Argument | Meaning |
|---|---|
paths (optional) |
overlay files/directories (default schemaguru*) |
serve¶
run the HTTP server (schemaguru[server])
| Argument | Meaning |
|---|---|
--host HOST |
default 127.0.0.1 |
--port PORT |
default 8080 |
mcp¶
run the MCP server on stdio (schemaguru[mcp])
No arguments besides the global options.
doctor¶
check connectivity, FTS5, FactLang, extras, budgets
No arguments besides the global options.
worker¶
drain the measurement queue in a loop
| Argument | Meaning |
|---|---|
--interval INTERVAL |
seconds between drains; default 30.0 |
--once |
drain once and exit |