Skip to content

dbprint CLI reference

Complete --help for every command, captured verbatim. This file is generated from the CLI itself — do not edit it by hand. Run just docs to regenerate it after changing a command's docstring, options, or help sections.

dbprint

Usage: dbprint [OPTIONS] COMMAND [ARGS]...
dbprint - offline database prints (DDL + column statistics) for AI agents.
A print is a portable, git-committed snapshot of a database's structure and column-level data
distributions, consumable offline by humans, AI coding agents, and CI.
The commands below scaffold a project, profile the database, and verify or consume the committed
prints.
Typical workflow: init -> generate -> annotate (per table) -> diff (ad-hoc) or check (CI gate).
Run dbprint COMMAND --help for per-command usage. The on-disk format is specified in SPEC.md,
which ships inside the package and is published at
https://github.com/jakubro/dbprint/blob/main/docs/format/v1/SPEC.md
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --version Show the version and exit. │
│ --debug Print full tracebacks on error. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ annotate Print an authoring brief for one table's annotations, or check them. │
│ check Verify committed prints are well-formed, fresh, and meet assertions. │
│ config Inspect .dbprint.yaml: how its defaults, connections and rules resolve for a table. │
│ context Emit an agent-ready context fragment for committed tables. │
│ diff Compare committed prints against the live database (read-only). │
│ docs Browse a committed print as an HTML site: serve it live, or build it static. │
│ generate Profile the live database; write prints and a structured diff. │
│ init Scaffold a new dbprint project in the current directory. │
│ list Summarise committed prints offline (no database connection). │
│ serve Run a read-only MCP server over the committed prints. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint init

Usage: dbprint init [OPTIONS]
Scaffold a new dbprint project in the current directory.
Writes .dbprint.yaml (project config), creates the prints/ output root, and writes a
~/.dbprint/connections.yaml credentials template when one does not already exist. Idempotent:
.dbprint.yaml is kept unless --force is given; the credentials stub is always kept once it exists,
--force or not, since it is machine-wide rather than project-local. Prints one outcome line per
file (wrote / kept / created).
Exit codes:
• 0: always (init has no failure path)
Examples:
• dbprint init: scaffold; keep anything that already exists
• dbprint init --force: overwrite .dbprint.yaml; credentials untouched
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --force Overwrite an existing .dbprint.yaml. Never touches the creds stub - │
│ ~/.dbprint/connections.yaml is shared by every project on the host and is written │
│ only when absent. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint config

Usage: dbprint config [OPTIONS] COMMAND [ARGS]...
Inspect .dbprint.yaml: how its defaults, connections and rules resolve for a table.
Read-only. Nothing here writes a file or, without --online, opens a connection.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ explain Print the profile one table resolves to, each value commented with where it came from. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint config explain

Usage: dbprint config explain [OPTIONS] [CONNECTION] [TABLE]
Print the profile one table resolves to, each value commented with where it came from.
Walks defaults, the connection and every rule in order, as generate does, and prints the result as
a YAML profile: block whose comments name the layer that set each value - built-in default,
defaults.profile, the connection, or a rule by its config path - with every rule's matcher and
whether it applied. Never writes. Size rules are evaluated offline against the row count the print
last recorded; a table the print does not hold is matched by name alone, which the output says.
Arguments:
• CONNECTION: connection to explain; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection). A single argument that names no connection is read as TABLE.
• TABLE: fully qualified name, e.g. arboretum.seedbank.accession, matched case-insensitively, as
rules are. Omitted, the connection's own profile and its rule list are printed.
Exit codes:
• 0: printed
• 1: the config fails to load, or the connection is unknown or ambiguous
• 4: --online could not reach the database
Examples:
• dbprint config explain: the connection-level profile and its rules
• dbprint config explain warehouse arboretum.seedbank.accession: one table, offline
• dbprint config explain arboretum.seedbank.accession --online: against the live estimate
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is .dbprint.yaml, │
│ that .dbprint.yaml file itself, or a git address (a forge URL, an SSH │
│ remote, or <git-url>#<ref>:<subpath>). No upward walk, no downward scan. │
│ Omit it to walk up from the working directory instead. │
│ --online Ask the database for the table's current row-count estimate instead of the │
│ count the print last recorded; size rules (min_rows) are evaluated against │
│ it. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint generate

Usage: dbprint generate [OPTIONS] [CONNECTION]
Profile the live database; write prints and a structured diff.
Connects to each resolved connection, scans the tables matched by the include/exclude selectors,
extracts DDL + column statistics + relationships, and writes one print per table plus a
prints/<connection>/diff.yaml describing what changed. A run's writes land together when it
finishes, and a run that ends early leaves the committed print as it was. A user-authored
description.md or statistics.annotations.yaml is never touched. A table the database no longer has
loses its producer-written files; its user-authored files are kept. Auto connections run
sequentially, each isolated so one failure does not block the rest. Writes one run log to
~/.dbprint/logs/<project-slug>/, keeping the 3 most recent.
Selector patterns are fnmatch globs over lowercased FQNs (* spans dots, ? matches one character);
--include intersects and --exclude unions, so both only ever narrow scope.
Arguments:
• CONNECTION: connection to profile; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection).
Exit codes:
• 0: ok (also when every matched table was already current, so nothing was profiled)
• 1: generic (also when the committed manifest.yaml cannot be read or followed, or is missing
beside existing prints; nothing is written)
• 3: schema drift (a table, column or relationship moved relative to the baseline; a first run
has no baseline, so every table is added). Column defaults, indexes and comments are not
compared: v1 records them only in ddl.sql, which the diff does not read. Statistics that moved
are recorded in diff.yaml but do not set this code; dbprint check --online reports both
• 4: connection (also when the target lists none of the committed tables in scope, a wrong path
or missing grants; --confirm-all-removed records a real total removal)
• 5: partial (some tables failed, others succeeded or were skipped; or every table succeeded but
the sketch pass that runs after them did not)
• 7: total failure (no table was profiled)
When several apply - within a connection or across connections - the exit code is the first of 1,
4, 7, 5, 3 that does.
Examples:
• dbprint generate: all auto connections
• dbprint generate warehouse: one connection
• dbprint generate --include '*.public.*': narrow scope for this run
• dbprint generate --dry-run: preview plan + diff, write nothing
• dbprint generate --fail-fast: stop at the first table failure
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git address │
│ (a forge URL, an SSH remote, or <git-url>#<ref>:<subpath>). No │
│ upward walk, no downward scan. Omit it to walk up from the │
│ working directory instead. │
│ --force Re-profile every matched table, bypassing the freshness skip. │
│ --dry-run Compute everything; write nothing to disk. │
│ --include TEXT Narrow scope to tables also matching PATTERN (intersects │
│ tables.include); repeatable. e.g. --include '*.public.*' │
│ --exclude TEXT Also drop tables matching PATTERN (unions tables.exclude); │
│ repeatable. e.g. --exclude '*.audit_*' │
│ --confirm-all-removed Record every committed table as removed when the target lists │
│ none of them. Without it, such a run exits 4 and writes │
│ nothing. │
│ --fail-fast Stop at the first table failure instead of profiling the rest. │
│ Use when a target is failing systemically, to avoid repeating │
│ one doomed query per table. │
│ --tui/--no-tui Force TTY (Rich) or piped (plain-text) rendering. │
│ --quiet -q Silence stderr progress (footer / tree / streaming / summary) - │
│ generate writes nothing to stdout. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint diff

Usage: dbprint diff [OPTIONS] [CONNECTION]
Compare committed prints against the live database (read-only).
Re-extracts the live schema + statistics and diffs them against the committed prints, emitting the
same structured diff that generate writes - without touching disk on either side. Differences are
reported, not failures: a successful comparison always exits 0. Progress goes to stderr so the
diff payload on stdout stays clean for piping. Writes one run log to
~/.dbprint/logs/<project-slug>/, keeping the 3 most recent, unaffected by --quiet (which silences
stderr progress only).
Selector patterns are fnmatch globs over lowercased FQNs (* spans dots); --include intersects and
--exclude unions, so both only ever narrow scope.
Arguments:
• CONNECTION: connection to compare; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection).
Exit codes:
• 0: ran (differences are not failures)
• 1: no baseline or invalid connection
• 4: connection (also when the target lists none of the committed tables in scope - generate
--confirm-all-removed records a real total removal)
• 5: partial extraction
When several apply across connections, the exit code is the first of 1, 4, 5 that does.
Examples:
• dbprint diff: compare all auto connections
• dbprint diff warehouse --format json: machine-readable diff
• dbprint diff --threshold 0.05: ignore statistic moves under 5%
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git │
│ address (a forge URL, an SSH remote, or │
│ <git-url>#<ref>:<subpath>). No upward walk, no downward │
│ scan. Omit it to walk up from the working directory │
│ instead. │
│ --include TEXT Narrow scope to tables also matching PATTERN (intersects │
│ tables.include); repeatable. e.g. --include '*.public.*' │
│ --exclude TEXT Also drop tables matching PATTERN (unions │
│ tables.exclude); repeatable. │
│ --format [human|json|yaml] Output format. │
│ [default: human] │
│ --output FILE Write the diff to FILE instead of stdout. │
│ --threshold FLOAT Minimum relative drift (0-1) before a statistic counts as │
│ changed; raises this run's noise floor. Human format │
│ only. e.g. 0.05 = ignore moves under 5%. │
│ --tui/--no-tui Force TTY (Rich) or piped (plain-text) rendering; also │
│ drives stderr progress. │
│ --quiet -q Silence stderr progress (footer / tree / streaming / │
│ summary); stdout payload unaffected. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint list

Usage: dbprint list [OPTIONS] [CONNECTION]
Summarise committed prints offline (no database connection).
Reads prints/<connection>/manifest.yaml and reports connection metadata, the table count,
freshness buckets (live / stale / dormant) relative to each table's own max_age_days, and how many
tables carry a user-authored description.md. Never connects to the database.
Arguments:
• CONNECTION: connection to summarize; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection).
Exit codes:
• 0: ok
• 1: a connection could not be summarised - its manifest is missing or unparseable. Other
connections are still summarised
Examples:
• dbprint list: all auto connections
• dbprint list warehouse: one connection
• dbprint list --format json: machine-readable summary
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git │
│ address (a forge URL, an SSH remote, or │
│ <git-url>#<ref>:<subpath>). No upward walk, no downward │
│ scan. Omit it to walk up from the working directory │
│ instead. │
│ --format [human|json|yaml] Output format. │
│ [default: human] │
│ --tui/--no-tui Force TTY (Rich) or piped (plain-text) rendering. Human │
│ format only. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint check

Usage: dbprint check [OPTIONS] [CONNECTION]
Verify committed prints are well-formed, fresh, and meet assertions.
CI gate over the committed prints.
• Offline (default): the manifest is present and conformance-valid, every print is within
--max-age, and statistic assertions hold.
• Online (--online): additionally re-extracts the live database to detect drift - both a change
of shape and a moved statistic - and evaluate SQL assertions.
--online writes one run log to ~/.dbprint/logs/<project-slug>/, keeping the 3 most recent; the
offline default writes nothing.
Arguments:
• CONNECTION: connection to check; resolved from .dbprint.yaml when omitted (the auto: true set,
or the sole connection).
Exit codes:
• 0: ok
• 1: generic - a malformed print, a .dbprint.yaml that fails to load, or a column the current
redact rules would publish otherwise than the print does (privacy.redaction-not-applied)
• 2: staleness
• 3: drift (--online) - the committed print no longer matches the database, including a statistic
that moved (generate sets this code for a change of shape only). Column defaults, indexes and
comments are not compared
• 4: connection (--online, the database could not be reached, or it lists none of the committed
tables in scope - generate --confirm-all-removed records a real total removal)
• 5: partial extraction - the committed manifest names a table the last generate run could not
profile, or (--online) the connection was reached but some tables could not be re-extracted;
the ones that did are still compared and reported normally
• 6: assertion failure
When several apply - within a connection or across connections - the exit code is the first of 1,
4, 5, 6, 3, 2 that does.
Examples:
• dbprint check: offline CI gate (no credentials)
• dbprint check --max-age 24h: fail if any print is older than a day
• dbprint check --online: add live drift + SQL assertions
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git │
│ address (a forge URL, an SSH remote, or │
│ <git-url>#<ref>:<subpath>). No upward walk, no downward │
│ scan. Omit it to walk up from the working directory │
│ instead. │
│ --max-age TEXT Max staleness before a print is stale (exit 2), applied │
│ to every table. Duration Nd/Nh/Nm/Ns - e.g. 7d, 12h, 30m; │
│ no compound forms like 1d12h. Default: the threshold each │
│ table's own print records, falling back to what its rules │
│ resolve to for a print that records none - offline, only │
│ rules matching by name apply. │
│ --online Verify against the live database: schema and statistics │
│ drift + SQL assertions. │
│ --format [human|json|yaml] Output format. │
│ [default: human] │
│ --tui/--no-tui Force TTY (Rich) or piped (plain-text) progress │
│ rendering, on stderr. │
│ --quiet -q Silence stderr progress (footer / tree / streaming / │
│ summary); stdout payload unaffected. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint context

Usage: dbprint context [OPTIONS] [TARGET] [CONNECTION]
Emit an agent-ready context fragment for committed tables.
Assembles per-table artifacts (DDL, statistics, relationships, description, annotations) into a
single prompt-ready block and writes it to stdout or --output. Offline - reads only committed
prints. Select one table by FQN, a set by fnmatch pattern, or every table with --all. Markdown by
default; --budget caps the output, charging the table's identity first and skipping any later
section that does not fit.
Arguments:
• TARGET: table FQN (e.g. arboretum.seedbank.accession), an fnmatch pattern (e.g. *.public.*), or
omit and pass --all for every table.
• CONNECTION: connection scope; resolved from .dbprint.yaml when omitted (the auto: true set, or
the sole connection).
Exit codes:
• 0: ok
• 1: no match, missing manifest, or budget too small
Examples:
• dbprint context arboretum.seedbank.accession: one table, full Markdown
• dbprint context '*.public.*': every public table (pattern)
• dbprint context --all --no-ddl: every table, skip DDL
• dbprint context accession --budget 4000: cap output near 4000 tokens
• dbprint context accession --purpose query: DDL, join paths, definitions and value lists, for
writing SQL against the table
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child │
│ is .dbprint.yaml, that .dbprint.yaml file itself, or a │
│ git address (a forge URL, an SSH remote, or │
│ <git-url>#<ref>:<subpath>). No upward walk, no downward │
│ scan. Omit it to walk up from the working directory │
│ instead. │
│ --all Render every table in the manifest. │
│ --format [md|json|yaml] Output format. json and yaml omit each column's sketch │
│ payload; the table's own statistics.yaml carries it. │
│ [default: md] │
│ --purpose [profile|query] What the fragment is for. profile describes the data: │
│ DDL, a per-column Notes summary of the statistics, │
│ relationships. query is for writing SQL against the │
│ table: DDL, the join paths, a data dictionary, the │
│ value lists a predicate can be written from, with │
│ counts and coverage, and each nullable column's null │
│ share. │
│ [default: profile] │
│ --no-ddl Omit the DDL section. │
│ --no-relationships Omit the Relationships section (profile) or the Joins │
│ list (query). │
│ --no-description Omit the Description section. │
│ --no-annotations Omit the Annotations section. │
│ --no-stats Omit the Cardinality table. No effect under --purpose │
│ query, which carries none. │
│ --budget INTEGER Soft output cap in tokens (approx chars/4); the table's │
│ identity is charged first, the Terms legend next, and a │
│ section that does not fit is skipped, never truncated - │
│ the legend among them. e.g. 4000 │
│ --output FILE Write output to FILE instead of stdout. │
│ --tui/--no-tui Force TTY (syntax-highlighted) or piped (plain-text) │
│ rendering. md format only. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint annotate

Usage: dbprint annotate [OPTIONS] TABLE [CONNECTION]
Print an authoring brief for one table's annotations, or check them.
The brief is the annotation skill's steps, the table's --purpose query context, and the open
questions the print measured but cannot answer - each naming the file it is answered in. Pipe it
into an agent CLI or paste it into a chat; dbprint launches no program and calls no model. --check
then lists every finding on the table's annotation files.
Arguments:
• TABLE: one table FQN (e.g. arboretum.seedbank.accession), not a pattern.
• CONNECTION: connection scope; resolved from .dbprint.yaml when omitted (the auto: true set, or
the sole connection).
Exit codes:
• 0: ok; with --check, no annotation finding
• 1: unknown table, missing manifest, a table in several connections with no CONNECTION, or
--check found annotation findings
Examples:
• dbprint annotate arboretum.seedbank.accession: the brief, for reading or pasting
• dbprint annotate arboretum.seedbank.accession | claude -p: hand it to an agent CLI
• dbprint annotate arboretum.seedbank.accession --check: the table's annotation findings
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git address (a │
│ forge URL, an SSH remote, or <git-url>#<ref>:<subpath>). No upward │
│ walk, no downward scan. Omit it to walk up from the working directory │
│ instead. │
│ --check List this table's annotation findings instead of printing the brief; │
│ exit 1 if there are any. │
│ --tui/--no-tui Force TTY (syntax-highlighted) or piped (plain-text) rendering of the │
│ brief. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint serve

Usage: dbprint serve [OPTIONS] [CONNECTION]
Run a read-only MCP server over the committed prints.
Exposes the committed prints as Model Context Protocol resources and tools for editor and agent
integration. Requires the [mcp] extra (pip install dbprint[mcp]); exits 1 with an install hint
when it is missing. Serves the resolved connection set read-only - no database connection. stdio
transport by default; HTTP binds to loopback only and answers only a loopback Host. The project
resolves from the working directory unless --project names another.
Arguments:
• CONNECTION: connection(s) to serve; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection).
Exit codes:
• 0: clean shutdown
• 1: missing [mcp] extra, bad transport args, or unresolved connection
Examples:
• dbprint serve: stdio (editor / agent)
• dbprint serve --transport http --port 8765: loopback HTTP server
• dbprint serve --project /srv/arboretum: a project outside the working directory
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct │
│ child is .dbprint.yaml, that .dbprint.yaml file │
│ itself, or a git address (a forge URL, an SSH │
│ remote, or <git-url>#<ref>:<subpath>). No upward │
│ walk, no downward scan. Omit it to walk up from │
│ the working directory instead. │
│ --transport [stdio|http] Wire transport. stdio for editor/agent │
│ integration; http for local sockets. │
│ [default: stdio] │
│ --host TEXT HTTP transport bind address. Must be loopback │
│ (127.0.0.1, ::1, or localhost). │
│ [default: 127.0.0.1] │
│ --port INTEGER HTTP transport TCP port. Required when --transport │
│ http. │
│ --read-only/--no-read-only Read-only over committed prints; no other mode is │
│ supported. │
│ [default: read-only] │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint docs

Usage: dbprint docs [OPTIONS] COMMAND [ARGS]...
Browse a committed print as an HTML site: serve it live, or build it static.
Renders the whole print - column statistics, relationships, DDL, human annotations - as pages a
reader clicks through, rather than opening statistics.yaml by hand. Requires the [docs] extra (pip
install dbprint[docs]); both subcommands exit 1 with an install hint when it is missing.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ build Write the docs site as static files - servable by any host that resolves path/index.html. │
│ serve Serve the docs site live over HTTP, re-reading the print on every request. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint docs serve

Usage: dbprint docs serve [OPTIONS] [CONNECTION]
Serve the docs site live over HTTP, re-reading the print on every request.
Binds loopback only. Answers only a Host of 127.0.0.1, localhost or [::1] - any other gets 400 -
so a web page cannot reach it by rebinding its name to loopback. Re-reads every artifact from disk
on each request, so a page reflects the latest generate without restarting the server.
Arguments:
• CONNECTION: connection(s) to serve; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection). Pass --all for completeness instead.
Exit codes:
• 0: clean shutdown
• 1: missing [docs] extra, a non-loopback --host, a port already in use, or an unresolved
connection
Examples:
• dbprint docs serve: the resolved connection set on 127.0.0.1:8765
• dbprint docs serve --all --port 9000: every connection, custom port
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is .dbprint.yaml, │
│ that .dbprint.yaml file itself, or a git address (a forge URL, an SSH │
│ remote, or <git-url>#<ref>:<subpath>). No upward walk, no downward scan. │
│ Omit it to walk up from the working directory instead. │
│ --all Serve every connection. │
│ --host TEXT Bind address. Must be loopback (127.0.0.1, ::1, or localhost). │
│ [default: 127.0.0.1] │
│ --port INTEGER TCP port to bind. │
│ [default: 8765] │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

dbprint docs build

Usage: dbprint docs build [OPTIONS] [CONNECTION]
Write the docs site as static files - servable by any host that resolves path/index.html.
Recreates --output from scratch on every run, so a page for a table the print no longer has never
lingers. Refuses to recreate a directory it did not itself create, unless --force is passed.
Arguments:
• CONNECTION: connection(s) to build; resolved from .dbprint.yaml when omitted (the auto: true
set, or the sole connection). Pass --all for completeness instead.
Exit codes:
• 0: ok
• 1: missing [docs] extra, an unresolved connection, --output exists without this tool's marker
and --force was not passed, or at least one route returned non-200 and was not written
Examples:
• dbprint docs build: the resolved connection set to ./dbprint-docs/
• dbprint docs build --all --output /tmp/site: every connection to a chosen path
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --project TEXT Exact project locator: a directory whose direct child is │
│ .dbprint.yaml, that .dbprint.yaml file itself, or a git address (a │
│ forge URL, an SSH remote, or <git-url>#<ref>:<subpath>). No upward │
│ walk, no downward scan. Omit it to walk up from the working directory │
│ instead. │
│ --all Build every connection. │
│ --output DIRECTORY Output directory. Recreated from scratch each run. │
│ [default: dbprint-docs] │
│ --force Recreate --output even if it exists without a prior build's marker. │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯